:root {
  color-scheme: light;
  --primary: #1677ff;
  --primary-soft: #e8f0fe;
  --bg: #fbfbfc;
  --sidebar: #ffffff;
  --surface: #ffffff;
  --soft: #f6f7f9;
  --hover: #f0f1f4;
  --text: #00142c;
  --muted: #59647a;
  --faint: #98a1b3;
  --border: #e4e7ec;
  --border-strong: #d5dbe5;
  --dark: #06271b;
  --dark-panel: #113826;
  --blue: #13c56b;
  --blue-soft: #e6f8ef;
  --purple: #0b8f55;
  --purple-soft: #e9f8f0;
  --green: #0aae60;
  --green-soft: #e4f8ee;
  --amber: #a15c00;
  --amber-soft: #fff4df;
  --red: #c62828;
  --red-soft: #ffebeb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.entry-page {
  display: grid;
  align-content: center;
  gap: 36px;
  min-height: 100vh;
  padding: 56px clamp(24px, 7vw, 108px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72)),
    url("./login-bg.svg") center / cover no-repeat,
    linear-gradient(135deg, #ffffff 0%, #f5fbf8 54%, #eaf8f1 100%);
}

.entry-header {
  display: grid;
  gap: 18px;
  max-width: 820px;
}

.entry-header p {
  max-width: 720px;
  margin: 0;
  color: #526074;
  font-size: 17px;
  line-height: 1.75;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.entry-card {
  display: grid;
  align-content: space-between;
  gap: 24px;
  min-height: 420px;
  padding: 30px;
  border: 1px solid rgba(10, 174, 96, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
}

.entry-card.app-card {
  background:
    linear-gradient(145deg, rgba(6, 39, 27, 0.96), rgba(11, 143, 85, 0.9)),
    #06271b;
  color: #ffffff;
}

.entry-card.client-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 247, 0.92)),
    #ffffff;
}

.entry-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 23px;
  font-weight: 900;
}

.app-card .entry-card-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.client-card .entry-card-icon {
  background: #edf5ff;
  color: #2f80ed;
}

.entry-kicker {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.app-card .entry-kicker {
  color: #c8f8de;
}

.entry-card h1 {
  margin: 10px 0 0;
  font-size: 32px;
  line-height: 1.2;
}

.entry-card p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #526074;
  font-size: 15px;
  line-height: 1.8;
}

.app-card p {
  color: rgba(255, 255, 255, 0.78);
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.entry-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(10, 174, 96, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.app-card .entry-tags span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.entry-button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
}

.app-card .entry-button {
  background: #ffffff;
  color: var(--dark);
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  padding: 56px clamp(32px, 8vw, 112px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    url("./login-bg.svg") center / cover no-repeat,
    radial-gradient(circle at 15% 22%, rgba(10, 174, 96, 0.18), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f5fbf8 48%, #eef9f3 100%);
}

.login-brand {
  display: grid;
  gap: 22px;
  max-width: 760px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.login-logo img {
  width: 64px;
  height: auto;
  object-fit: contain;
}

.login-brand h1 {
  max-width: 680px;
  color: var(--text);
  font-size: 44px;
  line-height: 1.16;
}

.login-brand p {
  max-width: 640px;
  color: #526074;
  font-size: 17px;
  line-height: 1.8;
}

.login-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-highlights span {
  padding: 8px 12px;
  border: 1px solid rgba(10, 174, 96, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
}

.login-card-head {
  margin-bottom: 4px;
}

.login-card-head h2 {
  font-size: 24px;
}

.login-card-head p {
  margin-top: 6px;
  color: #667085;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.login-card input,
.login-card select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.captcha-row button {
  min-height: 42px;
  border: 1px solid rgba(10, 174, 96, 0.28);
  border-radius: 9px;
  background:
    repeating-linear-gradient(-18deg, rgba(10, 174, 96, 0.1) 0 6px, rgba(255, 255, 255, 0.92) 6px 12px),
    #ffffff;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
}

.login-options label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.login-options input {
  width: auto;
  min-height: auto;
}

.login-options button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.login-submit {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
}

.login-back {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  color: #344054;
  font-weight: 850;
}

.claw-login-page {
  min-height: 100vh;
  padding: 42px clamp(18px, 5vw, 72px);
  background:
    linear-gradient(180deg, rgba(247, 248, 250, 0.92), rgba(238, 242, 246, 0.96)),
    url("./login-bg.svg") center / cover no-repeat,
    #f1f3f6;
}

.client-window {
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  min-height: calc(100vh - 84px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.14);
}

.client-titlebar {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: #f7f8fa;
}

.client-titlebar strong {
  justify-self: center;
  color: #071326;
  font-size: 15px;
  font-weight: 900;
}

.client-titlebar button {
  justify-self: end;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1d2738;
  font-size: 20px;
  line-height: 1;
}

.client-titlebar button:hover {
  background: #eaedf2;
}

.window-controls {
  display: flex;
  gap: 8px;
}

.window-controls span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d7dce5;
}

.window-controls span:nth-child(1) {
  background: #ff6b67;
}

.window-controls span:nth-child(2) {
  background: #ffbd4a;
}

.window-controls span:nth-child(3) {
  background: #31c65b;
}

.client-login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  background:
    linear-gradient(90deg, #ffffff 0%, rgba(255, 255, 255, 0.82) 58%, #f4f7f6 100%),
    radial-gradient(circle at 18% 22%, rgba(10, 174, 96, 0.14), transparent 36%);
}

.client-login-hero {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.client-login-hero .login-logo img {
  width: 52px;
}

.client-login-hero h1 {
  max-width: 640px;
  margin: 6px 0 0;
  color: #071326;
  font-size: 42px;
  line-height: 1.16;
}

.client-login-hero p {
  max-width: 580px;
  margin: 0;
  color: #59647a;
  font-size: 16px;
  line-height: 1.75;
}

.client-preview {
  position: relative;
  max-width: 720px;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid #dde3eb;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 252, 0.96)),
    #ffffff;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.1);
}

.preview-orbit {
  position: absolute;
  inset: 34px 50px;
  border: 1px dashed rgba(10, 174, 96, 0.28);
  border-radius: 28px;
}

.preview-orbit::before,
.preview-orbit::after {
  content: "";
  position: absolute;
  background: rgba(10, 174, 96, 0.22);
}

.preview-orbit::before {
  top: 50%;
  left: 9%;
  right: 9%;
  height: 1px;
}

.preview-orbit::after {
  top: 12%;
  bottom: 12%;
  left: 50%;
  width: 1px;
}

.preview-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 176px;
  height: 132px;
  padding: 18px;
  border: 1px solid rgba(10, 174, 96, 0.24);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  transform: translate(-50%, -50%);
}

.preview-core img {
  width: 54px;
  height: auto;
}

.preview-core strong {
  color: #071326;
  font-size: 17px;
  font-weight: 900;
}

.preview-core span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.preview-node {
  position: absolute;
  z-index: 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: min(272px, 42%);
  min-height: 86px;
  padding: 14px;
  border: 1px solid #e0e6ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.preview-node i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
}

.preview-node strong {
  display: block;
  color: #071326;
  font-size: 15px;
  font-weight: 900;
}

.preview-node span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.node-agent {
  top: 34px;
  left: 34px;
}

.node-workspace {
  top: 34px;
  right: 34px;
}

.node-skills {
  bottom: 34px;
  left: 34px;
}

.node-tools {
  right: 34px;
  bottom: 34px;
}

.node-workspace i {
  background: #edf5ff;
  color: #2f80ed;
}

.node-skills i {
  background: #fff4df;
  color: #a15c00;
}

.node-tools i {
  background: #f0edff;
  color: #7442d6;
}

.client-login-card {
  display: grid;
  gap: 15px;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.client-login-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.client-login-card label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.client-login-card input,
.client-login-card select {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
}

.client-login-card input:focus,
.client-login-card select:focus {
  outline: 2px solid rgba(10, 174, 96, 0.2);
  border-color: rgba(10, 174, 96, 0.55);
}

.client-login-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.client-login-row label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.client-login-row input {
  width: auto;
  min-height: auto;
}

.client-login-submit {
  min-height: 46px;
}

.claw-shell {
  min-height: 100vh;
  background: #f7faf9;
}

.claw-shell-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.claw-shell-header .login-logo img {
  width: 46px;
}

.claw-standalone-content {
  padding: 28px clamp(18px, 4vw, 56px) 48px;
}

.login-note {
  color: #98a2b3;
  font-size: 12px;
  text-align: center;
}

.login-note.error {
  color: var(--red);
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell.no-sidebar {
  grid-template-columns: 0px minmax(0, 1fr);
}
.app-shell.no-sidebar .sidebar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 12px;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  transition: width 0.2s ease;
}

nav.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 36px;
  margin: 0 0 34px 8px;
}

.logo span {
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.logo img {
  display: block;
  width: 54px;
  height: auto;
  object-fit: contain;
}

.sidebar-toggle {
  position: absolute;
  top: 26px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: #667085;
  font-size: 18px;
  line-height: 1;
}

.app-shell.sidebar-collapsed .sidebar {
  align-items: center;
  padding-left: 10px;
  padding-right: 10px;
}

.app-shell.sidebar-collapsed .logo {
  justify-content: center;
  width: 44px;
  margin-left: 0;
}

.app-shell.sidebar-collapsed .logo span,
.app-shell.sidebar-collapsed .nav-title,
.app-shell.sidebar-collapsed .nav-group-title,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-badge,
.app-shell.sidebar-collapsed .workspace-meta,
.app-shell.sidebar-collapsed .switch-button {
  display: none;
}

.app-shell.sidebar-collapsed .logo img {
  width: 42px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  right: -13px;
  transform: rotate(180deg);
}

.app-shell.sidebar-collapsed .nav {
  width: 100%;
}

.app-shell.sidebar-collapsed .nav button {
  justify-content: center;
  padding: 10px;
}

.app-shell.sidebar-collapsed .nav-main {
  justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-footer {
  width: 100%;
  justify-content: center;
}

.nav-title {
  margin: 0 12px 8px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-group {
  display: grid;
  gap: 4px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}

.nav-group:last-child {
  border-bottom: 0;
}

.nav-group-title {
  padding: 8px 12px 3px;
  color: #98a1b3;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.8px;
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 35px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-weight: 750;
}

.nav button:hover,
.nav button.active {
  background: #f0f1f3;
  color: var(--text);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  color: #667085;
  font-size: 14px;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-back-wrap {
  margin-top: auto;
  padding: 12px 8px;
  border-top: 1px solid var(--border-color);
}

.nav-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-back-btn:hover {
  background: var(--green-light);
  color: var(--green-dark);
  border-color: var(--green-primary);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 10px 8px 0;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-weight: 800;
}

.workspace-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-meta strong,
.workspace-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-meta span {
  color: var(--muted);
  font-size: 12px;
}

.switch-button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #98a1b3;
  font-size: 18px;
}

.logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  width: 100%;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background: #ffffff;
  color: #344054;
  font-weight: 850;
}

.logout-button:hover {
  border-color: rgba(10, 174, 96, 0.28);
  background: #f4fbf7;
  color: var(--green);
}

.logout-button span {
  font-size: 15px;
  line-height: 1;
}

.app-shell.sidebar-collapsed .sidebar-account {
  grid-template-columns: 42px;
  justify-content: center;
}

.app-shell.sidebar-collapsed .logout-button {
  width: 42px;
  padding: 0;
}

.app-shell.sidebar-collapsed .logout-button strong {
  display: none;
}

.main {
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 57px;
  padding: 0 34px 0 24px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.topbar-left {
  color: var(--text);
  font-size: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #566176;
}

.role-select {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.page {
  width: 100%;
  margin: 0;
  padding: 16px 20px 48px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.page-head.hidden {
  display: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0;
}

h2 {
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0;
}

h3 {
  font-size: 13px;
}

.page-head p {
  margin-top: 6px;
  color: #4d5873;
}

.content {
  display: grid;
  gap: 20px;
}

.prototype-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.claw-page {
  display: grid;
  justify-items: center;
  min-height: calc(100vh - 121px);
  padding: 18px 0 28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(10, 174, 96, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfcff 0%, #f5f7fb 100%);
}

.claw-app-device {
  position: relative;
  display: grid;
  grid-template-rows: 44px 46px minmax(0, 1fr) auto;
  overflow: hidden;
  width: min(390px, 100%);
  min-height: 760px;
  border: 1px solid #e2e8f4;
  border-radius: 30px;
  background:
    linear-gradient(32deg, transparent 0 37%, rgba(226, 235, 255, 0.66) 37% 45%, transparent 45% 100%),
    linear-gradient(150deg, #fbfdff 0%, #f4f8ff 44%, #ffffff 100%);
  box-shadow: 0 28px 90px rgba(23, 40, 80, 0.14);
}

.claw-phone-status,
.claw-app-top,
.claw-bottom-nav span,
.claw-composer-toolbar button,
.claw-quick-grid button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.claw-phone-status {
  justify-content: space-between;
  padding: 0 22px;
  color: #111827;
  font-size: 13px;
}

.claw-app-top {
  justify-content: space-between;
  padding: 0 14px 0 18px;
}

.claw-app-top strong {
  max-width: 260px;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claw-app-top button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #1f2937;
  font-size: 17px;
  font-weight: 900;
}

.claw-app-scroll {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 64px 14px 18px;
}

.claw-brand-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 0;
  border: 1px solid #bfd2ff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(67, 112, 255, 0.14);
}

.claw-brand-mark img {
  width: 44px;
  height: auto;
}

.claw-app-scroll > h2 {
  color: #242936;
  font-size: 19px;
  text-align: center;
}

.claw-home-subtitle {
  max-width: 270px;
  margin: -8px auto 10px;
  color: #718096;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.claw-task {
  display: grid;
  gap: 14px;
  margin-top: -46px;
}

.claw-user-attachment {
  display: grid;
  justify-items: end;
  gap: 7px;
  margin: 0 0 18px;
}

.claw-drawing-thumb {
  position: relative;
  width: 76px;
  height: 56px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 9px, rgba(148, 163, 184, 0.16) 10px, transparent 11px),
    linear-gradient(transparent 9px, rgba(148, 163, 184, 0.16) 10px, transparent 11px),
    #ffffff;
  background-size: 14px 14px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.claw-drawing-thumb span,
.claw-drawing-thumb i,
.claw-drawing-thumb b {
  position: absolute;
  display: block;
  border: 1px solid #94a3b8;
  border-radius: 2px;
}

.claw-drawing-thumb span {
  top: 14px;
  left: 13px;
  width: 26px;
  height: 15px;
}

.claw-drawing-thumb i {
  top: 27px;
  right: 12px;
  width: 22px;
  height: 12px;
}

.claw-drawing-thumb b {
  right: 11px;
  bottom: 8px;
  width: 18px;
  height: 4px;
  border-color: #60a5fa;
}

.claw-task-tag {
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.claw-user-attachment p {
  max-width: 210px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #e9edf5;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.45;
}

.claw-task-log {
  display: grid;
  gap: 12px;
}

.claw-task-step {
  display: grid;
  gap: 8px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(226, 232, 240, 0.84);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  color: #1f2937;
}

.claw-task-output {
  display: grid;
  gap: 10px;
}

.claw-task-output h3 {
  color: #111827;
  font-size: 15px;
  line-height: 1.45;
}

.claw-task-output p,
.claw-task-output li {
  font-size: 13px;
  line-height: 1.65;
}

.claw-task-output ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.claw-task-output strong {
  font-weight: 900;
}

.claw-file-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
  text-decoration: none;
  vertical-align: middle;
}

.claw-file-link::before {
  content: "▦";
  margin-right: 5px;
  color: #3b82f6;
  font-size: 12px;
}

.claw-file-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.claw-task-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 16px;
  color: #8a96a8;
  font-size: 12px;
}

.copy-icon {
  color: #8a96a8;
  font-size: 13px;
}

.claw-task .claw-view-steps {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  justify-self: start;
  min-width: 118px;
  min-height: 30px;
  padding: 0 9px 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  appearance: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.claw-task .claw-view-steps span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
}

.claw-task .claw-view-steps em {
  font-style: normal;
  white-space: nowrap;
}

.claw-task .claw-view-steps b {
  color: #94a3b8;
  font-size: 17px;
  line-height: 1;
}

.claw-task .claw-view-steps:hover {
  border-color: #cbd5e1;
  background: #eef6ff;
  color: #3769d6;
}

.claw-conversation.app {
  display: grid;
  gap: 10px;
}

.claw-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  max-width: 92%;
}

.claw-message.user {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr) 30px;
}

.claw-message.user .claw-avatar {
  order: 2;
  background: #111827;
}

.claw-message p {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.claw-message.user p {
  background: #eff6ff;
  color: #163766;
}

.claw-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.claw-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.claw-quick-grid button {
  flex-direction: column;
  gap: 5px;
  min-height: 66px;
  padding: 8px 4px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.claw-quick-grid button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #edf7f1;
  color: var(--green);
  font-weight: 900;
}

.claw-quick-grid button:nth-child(2n) span {
  background: #edf4ff;
  color: #2f80ed;
}

.claw-quick-grid button:nth-child(5n) span {
  background: #fff3e2;
  color: #ff8a00;
}

.claw-app-bottom {
  padding: 0 14px 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #ffffff 18%);
}

.claw-composer {
  overflow: hidden;
  border: 1.5px solid #7da4ff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(86, 129, 255, 0.09);
}

.claw-composer textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 12px 6px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #27364b;
  font-size: 14px;
  line-height: 1.4;
}

.claw-composer textarea::placeholder {
  color: #b7c0d1;
}

.claw-composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 8px;
}

.claw-tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.claw-tool-group::-webkit-scrollbar {
  display: none;
}

.claw-composer-toolbar button {
  min-width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #33445f;
  font-size: 13px;
  font-weight: 900;
}

.claw-composer-toolbar .icon-only {
  width: 28px;
  color: #3f78ff;
  font-size: 18px;
}

.claw-composer-toolbar .tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  width: auto;
  max-width: 142px;
  padding: 0 8px;
  border-radius: 8px;
  color: #253858;
  font-size: 12px;
  font-weight: 800;
}

.claw-composer-toolbar .tool-chip.model {
  max-width: 190px;
}

.claw-composer-toolbar .tool-chip span {
  color: #6b7a90;
  font-size: 14px;
}

.claw-composer-toolbar .tool-chip em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.claw-composer-toolbar .tool-chip b {
  color: #98a1b3;
  font-size: 10px;
}

.claw-send {
  flex: 0 0 auto;
  width: 28px;
  background: #3f78ff !important;
  color: #ffffff !important;
  font-size: 18px !important;
}

.claw-bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 54px;
  margin-top: 8px;
  border-top: 1px solid #eef2f8;
  background: rgba(255, 255, 255, 0.92);
}

.claw-bottom-nav span {
  flex-direction: column;
  gap: 2px;
  color: #98a1b3;
  font-size: 15px;
  font-weight: 900;
}

.claw-bottom-nav span.active {
  color: #5868ff;
}

.claw-bottom-nav em {
  font-style: normal;
  font-size: 9px;
}

.hero-card {
  overflow: hidden;
  border-radius: 17px;
  background: var(--dark);
  color: #ffffff;
}

.hero-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 25px 12px;
}

.hero-icon {
  color: #c5d2e3;
  font-size: 20px;
}

.version-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: #20364a;
  color: #b7c5d8;
  font-size: 11px;
  font-weight: 800;
}

.hero-copy {
  width: min(620px, 100%);
  padding: 0 25px 22px;
  color: #9fb2c8;
  line-height: 1.55;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-column {
  display: grid;
  gap: 10px;
  padding: 18px 25px 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-column:last-child {
  border-right: 0;
}

.hero-column-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--dark-panel);
  color: #ffffff;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 14px;
}

.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.metric {
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
}

.metric {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 102px;
  padding: 17px;
}

.metric-clickable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.metric-clickable:hover {
  box-shadow: 0 2px 12px rgba(0, 20, 44, 0.06);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.workspace-list-tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.workspace-list-tab-bar .memory-tab-btn {
  position: relative;
}

.recycle-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--danger);
  border-radius: 9px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.empty-state span {
  font-size: 13px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 20px;
}

.metric:nth-child(2n) .metric-icon {
  background: var(--purple-soft);
  color: var(--purple);
}

.metric-label {
  color: #001b45;
  font-size: 13px;
}

.metric-value {
  margin-top: 4px;
  color: #00142c;
  font-size: 24px;
  font-weight: 780;
}

.metric-note {
  margin-top: 5px;
  color: #65708a;
  font-size: 12px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 17px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.detail-toolbar {
  align-items: center;
  min-height: 40px;
  padding: 0 0 10px;
  margin-top: -4px;
  border-bottom: 1px solid var(--border);
}

.detail-toolbar .toolbar-group {
  margin-left: auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #344054;
  font-weight: 800;
}

.back-link:hover {
  color: var(--green);
}

.search {
  width: min(360px, 100%);
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
}

.btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.btn.primary {
  border-color: var(--dark);
  background: var(--dark);
  color: #ffffff;
}

.btn.danger {
  border-color: var(--red-soft);
  background: var(--red-soft);
  color: var(--red);
}

.table-wrap {
  overflow-x: auto;
}

.table-block {
  display: grid;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: #667085;
  font-weight: 750;
  background: #fbfcfd;
}

tr:last-child td {
  border-bottom: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: #fbfcfd;
}

.pagination-meta {
  color: #667085;
  font-size: 12px;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-button,
.page-number {
  min-width: 32px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.page-number.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge.green {
  background: var(--green-soft);
  color: var(--green);
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.badge.gray {
  background: #eef0f3;
  color: #59647a;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.progress.warn span {
  background: #ca7a00;
}

.progress.danger span {
  background: var(--red);
}

.split {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 14px;
}

.tenant-user-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.tenant-tree-card {
  position: sticky;
  top: 76px;
}

.tenant-tree-list {
  display: grid;
  gap: 0;
  padding: 0;
}

.tenant-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.tenant-search input {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.tenant-tree-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 74px;
  padding: 12px 13px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.tenant-tree-item:hover,
.tenant-tree-item.active {
  border-bottom-color: transparent;
  border-radius: 8px;
  background: #ece8ff;
}

.tenant-tree-item span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.tenant-tree-item strong,
.tenant-tree-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-tree-item small {
  color: #6f7193;
  font-size: 12px;
}

.tenant-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #f4f6f8;
  color: var(--green);
  font-weight: 900;
}

.tenant-tree-item.active .tenant-logo {
  background: #ffffff;
}

.user-toolbar {
  padding-bottom: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(15, 23, 42, 0.32);
}

.drawer-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 31;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(680px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
  transform: translate(-50%, -50%);
}

.drawer-resizer {
  display: none;
}

.drawer-resizer::after {
  display: none;
}

.drawer-resizer:hover::after {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  font-size: 18px;
}

.drawer-header p {
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
}

.icon-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.drawer-body {
  overflow-y: auto;
  padding: 18px 22px;
}

.drawer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #fbfcfd;
}

.drawer-form {
  display: grid;
  gap: 14px;
}

.drawer-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.drawer-section h3 {
  margin: 0;
  color: #101828;
  font-size: 14px;
  font-weight: 850;
}

.drawer-field {
  display: grid;
  gap: 7px;
}

.drawer-field span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.drawer-field small {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.drawer-field b {
  color: var(--red);
}

.drawer-field input,
.drawer-field select,
.drawer-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
}

.drawer-field textarea {
  resize: vertical;
}

.drawer-field input:disabled,
.drawer-field select:disabled,
.drawer-field textarea:disabled {
  background: #f3f5f8;
  color: #667085;
  cursor: not-allowed;
}

.readonly-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #f3f5f8;
}

.readonly-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(10, 174, 96, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.readonly-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #f3f5f8;
}

.readonly-value strong {
  padding: 8px 10px;
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

.readonly-value em {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  background: #fbfcfd;
  color: #667085;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.call-record-drawer {
  width: min(900px, calc(100vw - 40px));
}

.model-market {
  display: grid;
  gap: 18px;
}

.model-control-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.model-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 116px;
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 20%, rgba(19, 197, 107, 0.16), transparent 28%),
    linear-gradient(135deg, #ffffff, #f5fbf8);
}

.model-hero h2 {
  font-size: 28px;
}

.model-hero p {
  margin-top: 8px;
  color: #667085;
}

.model-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-searchbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(680px, 100%);
  min-height: 42px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
}

.model-searchbar span {
  color: var(--green);
  font-weight: 900;
}

.model-searchbar input {
  min-height: 32px;
  border: 0;
  outline: 0;
  color: var(--text);
}

.model-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.model-toolbar-actions .btn {
  min-height: 38px;
}

.model-tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.model-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.model-tabs button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #667085;
  font-weight: 800;
}

.model-tabs button.active {
  border-color: var(--green);
  color: var(--text);
}

.model-tabbar {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f7f9;
}

.model-tabbar button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-weight: 850;
}

.model-tabbar button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.model-tabbar span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.model-market-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.model-filter {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 22px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.filter-block h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tags button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f7f8fa;
  color: #4d5873;
  font-weight: 700;
}

.filter-tags button:hover {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.model-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.model-sections {
  display: grid;
  gap: 16px;
}

.model-section {
  display: grid;
  gap: 12px;
}

.model-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

.model-section-head h3 {
  font-size: 15px;
}

.model-section-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.provider-layout {
  align-items: start;
}

.provider-sidebar {
  padding: 0;
  overflow: hidden;
}

.provider-sidebar .filter-block {
  padding: 16px;
}

.provider-sidebar .filter-block h3 {
  margin-bottom: 12px;
  font-size: 14px;
}

.provider-list {
  display: grid;
  gap: 6px;
}

.provider-item {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #f7f8fa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.provider-item:hover {
  background: #eef4ff;
  border-color: #dbeafe;
}

.provider-item.active {
  background: #eef4ff;
  border-color: #3b82f6;
}

.provider-item-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.provider-item-main strong {
  font-size: 13px;
  font-weight: 800;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.provider-badge.cloud {
  background: #eef4ff;
  color: #3b82f6;
}

.provider-badge.local {
  background: #f0fdf4;
  color: #16a34a;
}

.provider-item-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: #667085;
}

.provider-item-meta .cred-status {
  color: #f59e0b;
  font-weight: 700;
}

.provider-detail {
  display: grid;
  gap: 16px;
}

.provider-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.provider-detail-info h3 {
  font-size: 18px;
  font-weight: 900;
}

.provider-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.provider-meta-item {
  font-size: 12px;
  color: #667085;
}

.provider-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.remote-model-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
}

.remote-model-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
}

.remote-model-item:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.remote-model-name {
  font-weight: 800;
}

.remote-model-type {
  font-size: 11px;
  color: #667085;
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #667085;
}

.modal-desc {
  margin-bottom: 12px;
  font-size: 12px;
  color: #667085;
}

.provider-modal-dialog {
  max-width: 560px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #fbfcfd;
  color: #667085;
  font-weight: 800;
}

.skill-market {
  display: grid;
  gap: 18px;
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skill-section {
  display: grid;
  gap: 12px;
}

.skill-tabs {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f7f9;
}

.skill-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-weight: 800;
}

.skill-tabs button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.skill-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
}

.skill-card {
  display: grid;
  gap: 14px;
  min-height: 216px;
  padding: 18px 20px;
  border: 1px solid #edf0f7;
  border-radius: 14px;
  background: #f4f7ff;
  cursor: pointer;
}

.skill-card:nth-child(2n) {
  background: #f5f2ff;
}

.skill-card:hover {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.08);
}

.skill-card:focus-visible {
  outline: 3px solid rgba(19, 197, 107, 0.2);
  outline-offset: 2px;
}

.skill-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.skill-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--text);
  color: #ffffff;
  font-weight: 900;
}

.skill-title h3 {
  overflow: hidden;
  color: #15172f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-title p {
  margin-top: 4px;
  color: #6f7193;
  font-size: 12px;
}

.skill-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  color: #747aa6;
  font-size: 12px;
  white-space: nowrap;
}

.skill-code-preview {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px 14px;
  border: 1px solid #edf0f7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #29315f;
  font-size: 12px;
  line-height: 1.45;
}

.skill-code-preview div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #747aa6;
}

.skill-code-preview div span {
  padding: 3px 7px;
  border-radius: 6px;
  background: #f3f5ff;
}

.skill-code-preview p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.skill-code-preview b {
  color: #adb3d2;
  font-weight: 700;
}

.skill-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.skill-enable-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.skill-actions > div {
  display: flex;
  gap: 8px;
}

.skill-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.skill-detail-metrics div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.skill-detail-metrics span {
  color: #667085;
  font-size: 12px;
}

.skill-detail-metrics strong {
  color: var(--text);
}

.skill-modal {
  width: min(720px, calc(100vw - 40px));
}

.skill-md-block {
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  background: #fbfcfd;
  color: #26304f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.mcp-market {
  display: grid;
  gap: 18px;
}

.mcp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mcp-hero h2 {
  font-size: 24px;
}

.mcp-hero p {
  margin-top: 6px;
  color: #667085;
}

.mcp-main {
  display: grid;
  gap: 18px;
}

.mcp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mcp-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mcp-card {
  display: grid;
  gap: 13px;
  min-height: 188px;
  padding: 18px;
  border: 1px solid #edf0f7;
  border-radius: 14px;
  background: #f5f7fc;
  cursor: pointer;
}

.mcp-card:hover {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.08);
}

.mcp-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 12px;
}

.mcp-card h3 {
  overflow: hidden;
  color: #222343;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mcp-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--green);
  font-weight: 900;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.mcp-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.mcp-tags span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #ffffff;
  color: #536079;
  font-size: 12px;
  font-weight: 750;
}

.mcp-card p {
  display: -webkit-box;
  overflow: hidden;
  color: #78809d;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mcp-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #747aa6;
  font-size: 12px;
}

.mcp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(228, 231, 236, 0.9);
}

.mcp-actions > div:last-child {
  display: flex;
  gap: 7px;
}

.mcp-actions .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.mcp-modal {
  width: min(760px, calc(100vw - 40px));
}

.knowledge-page {
  display: grid;
  gap: 18px;
}

.knowledge-control-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.resource-control-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.knowledge-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.knowledge-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
}

.knowledge-card:hover {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.08);
}

.knowledge-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.knowledge-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.knowledge-card h3 {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-card-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.knowledge-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #4d5873;
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.knowledge-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.knowledge-meta span {
  color: #667085;
  font-size: 12px;
}

.knowledge-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-modal {
  width: min(760px, calc(100vw - 40px));
}

.knowledge-side-drawer {
  top: 0;
  right: 0;
  left: auto;
  width: min(680px, 100vw);
  height: 100vh;
  max-height: 100vh;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: -18px 0 44px rgba(15, 23, 42, 0.22);
  transform: none;
}

.knowledge-side-drawer .drawer-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -5px;
  z-index: 2;
  display: block;
  width: 10px;
  cursor: col-resize;
}

.knowledge-side-drawer .drawer-resizer::after {
  position: absolute;
  top: 50%;
  left: 4px;
  display: block;
  width: 2px;
  height: 56px;
  border-radius: 999px;
  background: #d0d5dd;
  content: "";
  transform: translateY(-50%);
}

.knowledge-side-drawer .drawer-resizer:hover::after,
.resizing-drawer .knowledge-side-drawer .drawer-resizer::after {
  background: var(--green);
}

.knowledge-side-drawer .drawer-body {
  overflow-y: auto;
}

.knowledge-side-drawer .drawer-form {
  gap: 10px;
}

.knowledge-side-drawer .drawer-field {
  gap: 5px;
}

.knowledge-side-drawer .drawer-field span {
  font-size: 12px;
  line-height: 1.2;
}

.knowledge-side-drawer .drawer-field input,
.knowledge-side-drawer .drawer-field select {
  min-height: 34px;
  padding: 6px 9px;
}

.knowledge-side-drawer .drawer-field textarea {
  min-height: 84px;
  padding: 8px 9px;
  line-height: 1.5;
}

.knowledge-side-drawer .drawer-field small {
  margin-top: -2px;
  font-size: 12px;
  line-height: 1.35;
}

.upload-version-drawer .drawer-form {
  gap: 12px;
}

.upload-version-drawer .drawer-field {
  gap: 6px;
}

.upload-version-drawer .drawer-field input[type="file"] {
  min-height: 40px;
  padding: 7px 9px;
}

.upload-version-drawer .drawer-field textarea {
  min-height: 96px;
  max-height: 140px;
}

.upload-version-drawer .drawer-field select {
  min-height: 40px;
}

.upload-version-drawer .drawer-field small {
  margin-top: 0;
}

.resizing-drawer {
  cursor: col-resize;
  user-select: none;
}

.knowledge-compact-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 2px;
}

.knowledge-compact-title h2 {
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.perm-edit-btn {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}

.perm-edit-btn--active,
.perm-edit-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* 内联权限编辑面板 */
.edit-perm-panel {
  margin-top: 0;
}

.edit-perm-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.edit-perm-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.edit-perm-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edit-perm-section.hidden {
  display: none;
}

.edit-perm-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.edit-perm-search {
  position: relative;
}

.edit-perm-search span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
}

.edit-perm-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}

.edit-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.edit-perm-user-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.knowledge-detail-page {
  gap: 10px;
}

.knowledge-detail-page .detail-toolbar {
  min-height: 34px;
}

.knowledge-detail-page .model-info-panel {
  border-radius: 10px;
}

.knowledge-detail-page .model-section-title {
  min-height: 46px;
  padding: 10px 12px;
}

.knowledge-detail-page .model-info-panel th,
.knowledge-detail-page .model-info-panel td {
  padding: 9px 11px;
}

.knowledge-file-head {
  align-items: center;
}

.knowledge-file-title,
.knowledge-file-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.knowledge-file-tools {
  justify-content: flex-end;
  flex: 1;
}

.compact-search {
  grid-template-columns: auto minmax(0, 1fr);
  width: min(360px, 42vw);
  min-height: 36px;
  padding: 3px 10px;
  border-radius: 9px;
}

.compact-search input {
  min-height: 28px;
  font-size: 13px;
}

.rebuild-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 4px;
}

.rebuild-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.rebuild-summary span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.rebuild-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readonly-params {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.readonly-params div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.readonly-params div.wide {
  grid-column: 1 / -1;
}

.readonly-params span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.readonly-params strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
}

.knowledge-readonly-params {
  align-self: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
}

.knowledge-readonly-params div {
  gap: 4px;
  min-height: auto;
}

.knowledge-readonly-params div.wide {
  padding-top: 2px;
}

.knowledge-readonly-params span {
  font-size: 12px;
  line-height: 1.2;
}

.knowledge-readonly-params strong {
  font-size: 13px;
  line-height: 1.45;
}

.knowledge-readonly-params div:not(.wide) strong {
  white-space: nowrap;
}

.file-preview {
  display: grid;
  gap: 14px;
}

.file-preview-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.file-preview p {
  color: #667085;
  line-height: 1.6;
}

.file-preview pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
  color: #26304f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.file-preview.page-preview {
  padding: 18px 20px 20px;
}

.file-preview.page-preview pre {
  max-height: none;
}

.file-detail-page {
  gap: 10px;
}

.file-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 14px;
  align-items: start;
}

.analysis-preview-panel,
.analysis-side-panel section {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
}

.analysis-side-panel details {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
}

.file-summary-panel {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
}

.file-summary-panel .summary-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 16px 14px;
}

.analysis-tabs {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
  background: #f7f8fa;
}

.analysis-tabs button {
  align-self: stretch;
  min-width: 112px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  color: #667085;
  font-weight: 800;
}

.analysis-tabs button.active {
  border-bottom: 2px solid var(--green);
  background: #ffffff;
  color: var(--text);
}

.paper-preview {
  min-height: 560px;
  padding: 34px 54px 50px;
  color: #111827;
  line-height: 1.85;
}

.paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #111827;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.paper-preview h1 {
  margin: 58px 0 18px;
  text-align: center;
  color: #111827;
  font-size: 30px;
  line-height: 1.35;
}

.paper-author {
  text-align: center;
  color: #111827;
  font-size: 17px;
  font-weight: 800;
}

.paper-abstract {
  margin-top: 42px;
}

.analysis-side-panel {
  display: grid;
  gap: 12px;
}

.analysis-summary summary,
.history-record-panel > summary {
  cursor: pointer;
  list-style: none;
}

.analysis-summary summary::-webkit-details-marker,
.history-record-panel > summary::-webkit-details-marker {
  display: none;
}

.analysis-summary summary::after,
.history-record-panel > summary::after {
  color: #98a2b3;
  content: "⌄";
  font-size: 14px;
  transition: transform 0.18s ease;
}

.analysis-summary[open] summary::after,
.history-record-panel[open] > summary::after {
  transform: rotate(180deg);
}

.summary-toggle {
  margin-left: auto;
  color: #98a2b3;
  font-size: 12px;
  font-weight: 700;
}

.summary-block {
  display: grid;
  gap: 7px;
  min-height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}

.summary-block > span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.summary-block p {
  margin: 0;
  padding: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
}

.summary-main,
.summary-keywords {
  display: grid;
  gap: 7px;
}

.summary-keywords {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.summary-main h3,
.summary-keywords h3 {
  margin: 0;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.summary-main p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.65;
}

.file-description-block {
  margin: 0;
}

.file-description-block span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.file-description-block p {
  padding: 0;
}

.summary-keypoints ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 16px;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.version-list {
  display: grid;
  gap: 10px;
}

.version-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.version-card.active {
  border-color: rgba(16, 185, 129, 0.35);
  background: #f7fffb;
}

.version-card-main,
.version-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.version-card-main > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.version-card-main strong {
  color: var(--text);
  font-size: 14px;
}

.version-card-main span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.version-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #667085;
  font-size: 12px;
}

.history-group-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.history-date-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.history-date-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.history-date-group > summary::-webkit-details-marker {
  display: none;
}

.history-date-group > summary b {
  color: #667085;
  font-size: 14px;
}

.history-date-group[open] > summary b {
  transform: rotate(180deg);
}

.history-record-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.history-record-card {
  position: relative;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f3f5f8;
}

.history-record-card.active {
  border-color: rgba(16, 185, 129, 0.3);
  background: #f6fffb;
}

.history-record-top,
.history-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-record-top {
  justify-content: space-between;
  color: #476078;
  font-size: 12px;
}

.history-file-row strong {
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-type-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #2f80ed;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.history-ribbon {
  position: absolute;
  top: 7px;
  right: -28px;
  width: 96px;
  padding: 2px 0;
  background: #536273;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  transform: rotate(45deg);
}

.file-history-page {
  display: grid;
  gap: 12px;
}

.file-history-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #98a2b3;
  font-size: 14px;
  font-weight: 900;
}

.file-history-breadcrumb .back-link {
  padding: 0;
  color: #667085;
}

.file-history-breadcrumb strong {
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
  gap: 18px;
  align-items: start;
}

.history-preview-shell {
  overflow: auto;
  min-height: calc(100vh - 150px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
}

.history-preview-shell .paper-preview {
  min-height: calc(100vh - 152px);
  padding: 52px 82px 80px;
}

.history-page-side {
  position: sticky;
  top: 84px;
  overflow: hidden;
  min-height: calc(100vh - 150px);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #ffffff;
}

.history-page-side .history-record-panel {
  border: 0;
  border-radius: 0;
}

.memory-page {
  display: grid;
  gap: 18px;
}

/* ── 记忆管理 Tab 标签栏（tenant 角色） ── */
.memory-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px 0;
  background: var(--surface, #fff);
  border-bottom: 1.5px solid var(--border, #e5e7eb);
  flex-shrink: 0;
}

.memory-tab-btn {
  position: relative;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary, #666);
  background: transparent;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  bottom: -1.5px;
  border-bottom: 2px solid transparent;
}

.memory-tab-btn:hover {
  color: var(--text-primary, #111);
  background: var(--surface-hover, #f5f5f5);
}

.memory-tab-btn.active {
  color: var(--accent, #22c55e);
  border-bottom: 2px solid var(--accent, #22c55e);
  background: transparent;
}

.memory-explorer-page {
  display: grid;
  gap: 18px;
  color: #101828;
}

.memory-explorer-tabs {
  display: flex;
  align-items: center;
  min-height: 54px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.memory-explorer-tabs button {
  align-self: stretch;
  min-width: 190px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.memory-explorer-tabs button.active {
  border-bottom-color: #0b66e4;
  color: #0b66e4;
}

.memory-explorer-intro {
  display: grid;
  gap: 10px;
}

.memory-explorer-intro p {
  color: #101828;
  font-size: 18px;
  line-height: 1.55;
}

.memory-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.memory-filter-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: min(400px, 100%);
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.memory-filter-row span {
  color: #344054;
  font-weight: 900;
}

.memory-filter-row input {
  border: 0;
  outline: 0;
  color: #101828;
  font-size: 16px;
}

.memory-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.memory-total {
  color: #101828;
  font-size: 18px;
}

.memory-view-switch {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #eef0f2;
}

.memory-view-switch button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #101828;
  font-size: 16px;
  font-weight: 800;
}

.memory-view-switch button.active {
  margin: 4px;
  min-height: 34px;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}

.memory-explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 360px);
  gap: 24px;
  align-items: stretch;
}

.memory-constellation,
.memory-detail-panel {
  min-height: 600px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.memory-constellation {
  position: relative;
  overflow: hidden;
}

.memory-canvas-note {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  color: #98a2b3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.memory-legend {
  position: absolute;
  top: 36px;
  left: 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.memory-legend span {
  width: 178px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #4d8ff7, #69c37d, #ff7b6e);
}

.memory-legend em {
  color: #667085;
  font-style: normal;
  font-weight: 500;
}

.constellation-stage {
  position: absolute;
  inset: 0;
}

.constellation-dot {
  position: absolute;
  z-index: 2;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2f80ed;
  box-shadow: 0 0 24px rgba(47, 128, 237, 0.45);
}

.constellation-dot.main { top: 225px; left: 36%; }
.constellation-dot.d1 { top: 260px; left: 43%; width: 9px; height: 9px; }
.constellation-dot.d2 { top: 292px; left: 40%; width: 7px; height: 7px; }
.constellation-dot.d3 { top: 250px; left: 50%; width: 8px; height: 8px; }

.constellation-line {
  position: absolute;
  z-index: 1;
  height: 2px;
  background: rgba(47, 128, 237, 0.72);
  transform-origin: left center;
}

.constellation-line.l1 { top: 240px; left: 37%; width: 140px; transform: rotate(22deg); }
.constellation-line.l2 { top: 240px; left: 37%; width: 104px; transform: rotate(48deg); }

.constellation-node {
  position: absolute;
  top: 238px;
  left: 30%;
  z-index: 3;
  width: 172px;
  min-height: 78px;
  padding: 10px;
  border: 2px solid #3ba5ff;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 10px 34px rgba(47, 128, 237, 0.2);
}

.constellation-node p {
  display: -webkit-box;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.constellation-popover {
  position: absolute;
  top: 250px;
  left: 40%;
  z-index: 4;
  display: grid;
  gap: 10px;
  width: min(450px, 42vw);
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.popover-title,
.popover-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.popover-title strong {
  color: #0b66e4;
  font-size: 14px;
}

.popover-title span,
.popover-title em,
.popover-meta span {
  color: #98a2b3;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.constellation-popover p {
  color: #344054;
  font-size: 14px;
  line-height: 1.65;
}

.popover-meta {
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.popover-tags,
.detail-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popover-tags span,
.detail-chip-list span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.constellation-popover small {
  color: #98a2b3;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.memory-detail-panel {
  overflow: hidden;
}

.memory-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}

.memory-detail-head h2 {
  color: #101828;
  font-size: 24px;
  line-height: 1.35;
}

.memory-detail-body {
  display: grid;
  gap: 24px;
  padding: 24px;
}

.memory-detail-body h3 {
  margin-bottom: 10px;
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.memory-detail-body p {
  color: #101828;
  font-size: 16px;
  line-height: 1.75;
}

.related-memory-list {
  display: grid;
  gap: 8px;
}

.related-memory-list button {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  color: #344054;
  font-weight: 900;
  text-align: left;
}

.related-memory-list small {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-graph-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.memory-graph-board,
.memory-graph-side,
.memory-result-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.memory-graph-board {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background:
    radial-gradient(circle, #e7edf4 1px, transparent 1px);
  background-size: 20px 20px;
}

.graph-memory-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border: 2px solid #55728c;
  border-radius: 999px;
  background: #87c2ef;
  box-shadow: 0 12px 28px rgba(47, 128, 237, 0.22);
  text-align: center;
}

.graph-memory-node.node-a {
  top: 124px;
  left: 46%;
}

.graph-memory-node.node-b {
  right: 28%;
  bottom: 82px;
  background: #3fa2ef;
}

.graph-memory-node span {
  color: #1f3550;
  font-size: 12px;
  font-weight: 900;
}

.graph-memory-node strong {
  max-width: 100px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.35;
}

.graph-memory-label {
  position: absolute;
  z-index: 3;
  max-width: 520px;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: #344054;
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-memory-label.label-a {
  top: 264px;
  left: 28%;
}

.graph-memory-label.label-b {
  right: 14%;
  bottom: 44px;
}

.graph-arc {
  position: absolute;
  display: block;
  border: 4px solid transparent;
  border-radius: 999px;
}

.graph-arc.arc-blue {
  border-color: #3b9eed;
}

.graph-arc.arc-green {
  border-color: #2fb5aa;
}

.graph-arc.arc-orange {
  border-color: #f9a83b;
}

.graph-arc.a1 {
  top: 78px;
  left: 41%;
  width: 132px;
  height: 118px;
  border-right-color: transparent;
  transform: rotate(-26deg);
}

.graph-arc.a2 {
  top: 210px;
  left: 49%;
  width: 190px;
  height: 180px;
  border-left-color: transparent;
  transform: rotate(68deg);
}

.graph-arc.a3 {
  right: 26%;
  bottom: 138px;
  width: 260px;
  height: 210px;
  border-left-color: transparent;
  transform: rotate(18deg);
}

.graph-arc.a4 {
  top: 150px;
  right: 22%;
  width: 260px;
  height: 260px;
  border-left-color: transparent;
  transform: rotate(30deg);
}

.graph-arrow {
  position: absolute;
  z-index: 3;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.graph-arrow.arrow-a {
  top: 178px;
  left: 52%;
  border-left: 24px solid #f9a83b;
  transform: rotate(165deg);
}

.graph-arrow.arrow-b {
  right: 38%;
  bottom: 190px;
  border-left: 24px solid #2fb5aa;
  transform: rotate(42deg);
}

.memory-graph-side {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.memory-graph-side-head {
  display: grid;
  gap: 4px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.memory-graph-side-head h3 {
  font-size: 16px;
}

.memory-graph-side-head span,
.graph-link-list h4,
.graph-display-control h4,
.graph-performance h4 {
  color: #101828;
  font-size: 12px;
  font-weight: 900;
}

.graph-stat-row,
.graph-link-list,
.graph-display-control,
.graph-performance {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.graph-stat-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.graph-stat-row span,
.graph-link-list div,
.graph-display-control div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #344054;
  font-size: 13px;
}

.dot,
.line {
  display: inline-block;
  flex: 0 0 auto;
}

.dot {
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 999px;
}

.line {
  width: 14px;
  height: 2px;
  margin-right: 8px;
}

.blue { background: #1473e6; }
.green { background: #18a999; }
.orange { background: #f59e0b; }
.purple { background: #7c3aed; }

.graph-link-list div {
  justify-content: flex-start;
}

.graph-link-list div strong {
  margin-left: auto;
}

.graph-performance span,
.graph-performance p {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.memory-result-table {
  overflow: hidden;
}

.memory-result-table .table-block {
  border: 0;
}

.memory-result-table td p {
  margin-top: 4px;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
}

.memory-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.memory-metric-card,
.memory-panel {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
}

.memory-metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.memory-metric-card span,
.memory-panel-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.memory-metric-card strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1;
}

.memory-metric-card p {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.memory-overview-grid,
.memory-intelligence-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
}

.memory-intelligence-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
}

.memory-panel {
  overflow: hidden;
}

.memory-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.memory-panel-head h3 {
  font-size: 15px;
}

.memory-trend-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  height: 156px;
  padding: 18px 18px 14px;
}

.memory-trend-bars i {
  position: relative;
  flex: 1;
  min-height: 32px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #15b873, #dff8ea);
}

.memory-trend-bars b {
  position: absolute;
  right: 0;
  bottom: -18px;
  left: 0;
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.memory-entity-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px;
}

.memory-entity-cloud span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfcfd;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.memory-lifecycle {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.memory-lifecycle span {
  position: relative;
  padding: 7px 10px 7px 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.memory-lifecycle span::before {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d0d5dd;
  content: "";
  transform: translateY(-50%);
}

.memory-lifecycle span.active {
  border-color: rgba(16, 185, 129, 0.35);
  background: #f7fffb;
  color: var(--green);
}

.memory-lifecycle span.active::before {
  background: var(--green);
}

.memory-workspace {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
}

.memory-tabs {
  display: flex;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.memory-tabs button {
  align-self: stretch;
  min-width: 180px;
  padding: 0 24px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.memory-tabs button.active {
  border-bottom-color: var(--green);
  color: #0b66e4;
}

.memory-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.memory-section-head h3 {
  font-size: 16px;
}

.memory-section-head p {
  margin-top: 6px;
  max-width: 820px;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.observation-feed {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.observation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcfd;
}

.observation-card h4 {
  font-size: 14px;
}

.observation-card p {
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.observation-meta {
  display: grid;
  gap: 4px;
  justify-items: end;
  align-content: center;
}

.observation-meta span,
.observation-meta em {
  color: #667085;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.observation-meta strong {
  color: var(--green);
  font-size: 22px;
}

.memory-graph-canvas {
  position: relative;
  min-height: 300px;
  background:
    linear-gradient(#f3f6f9 1px, transparent 1px),
    linear-gradient(90deg, #f3f6f9 1px, transparent 1px);
  background-size: 28px 28px;
}

.graph-node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 84px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.graph-node.center {
  top: 126px;
  left: 50%;
  background: var(--green);
  color: #ffffff;
  transform: translateX(-50%);
}

.graph-node.n1 { top: 42px; left: 34px; }
.graph-node.n2 { top: 42px; right: 38px; }
.graph-node.n3 { bottom: 48px; left: 44px; }
.graph-node.n4 { right: 44px; bottom: 48px; }
.graph-node.n5 { top: 130px; right: 18px; }

.edge {
  position: absolute;
  height: 2px;
  background: rgba(16, 185, 129, 0.35);
  transform-origin: left center;
}

.edge.e1 { top: 94px; left: 112px; width: 146px; transform: rotate(26deg); }
.edge.e2 { top: 96px; right: 126px; width: 142px; transform: rotate(154deg); }
.edge.e3 { bottom: 92px; left: 120px; width: 136px; transform: rotate(-24deg); }
.edge.e4 { right: 128px; bottom: 92px; width: 136px; transform: rotate(204deg); }
.edge.e5 { top: 148px; right: 112px; width: 104px; }

.summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.summary-tags span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fbfcfd;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.compact-section-title {
  min-height: 42px;
  padding: 10px 14px;
}

.chunk-card-list {
  display: grid;
  gap: 10px;
  max-height: 640px;
  overflow-y: auto;
  padding: 12px;
}

.chunk-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #f7f9fb;
}

.chunk-card-head,
.chunk-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chunk-card-head strong {
  color: var(--text);
  font-size: 13px;
}

.chunk-card-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.chunk-card p {
  margin: 0;
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
}

.skill-description-row {
  display: grid;
  gap: 8px;
  padding: 0 20px 20px;
}

.skill-description-row span {
  color: #667085;
  font-size: 12px;
}

.skill-description-row p {
  color: var(--text);
  line-height: 1.7;
}

.skill-create-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f6f7f9;
}

.skill-create-tabs button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-weight: 800;
}

.skill-create-tabs button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.upload-note,
.skill-type-note {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.model-card {
  display: grid;
  gap: 14px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
}

.model-card:hover {
  border-color: var(--green);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.08);
}

.model-card:focus-visible {
  outline: 3px solid rgba(19, 197, 107, 0.2);
  outline-offset: 2px;
}

.model-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.model-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

.model-card h3 {
  font-size: 16px;
}

.model-card p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.model-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 2px 0 0;
}

.model-summary div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.model-summary span,
.detail-kv-grid span {
  color: #667085;
  font-size: 12px;
}

.model-summary strong,
.detail-kv-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-detail-page {
  display: grid;
  gap: 14px;
}

.model-info-panel {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
}

.model-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.model-section-title h2 {
  font-size: 15px;
}

.detail-kv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 26px;
  padding: 18px 20px 22px;
}

.detail-kv-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
}

.detail-kv-grid div.wide {
  grid-column: span 2;
}

.model-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: start;
}

.model-info-panel .table-block {
  border-top: 0;
}

.model-info-panel .table-wrap {
  overflow-x: auto;
}

.model-info-panel table {
  min-width: 560px;
}

.model-info-panel th,
.model-info-panel td {
  padding: 11px 13px;
}

.model-info-panel .pagination {
  min-height: 46px;
}

.call-record-drawer .drawer-body {
  padding: 0;
}

.call-record-drawer .table-block {
  height: 100%;
}

.call-record-drawer table {
  min-width: 620px;
}

.model-info-panel td:last-child,
.model-info-panel th:last-child {
  text-align: right;
}

.model-info-panel td:last-child .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.model-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ===== Model Card V2 (screenshot style) ===== */
.model-card-v2 {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.model-card-v2:hover {
  border-color: var(--green);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.08);
}
.mcv2-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}
.mcv2-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #e6f4ea;
  color: #34a853;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.mcv2-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mcv2-title-row h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}
.mcv2-meta {
  margin-top: 3px;
  font-size: 12px;
  color: #667085;
}
.mcv2-desc {
  margin-top: 2px;
  font-size: 13px;
  color: #4d5873;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.mcv2-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mcv2-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.mcv2-badge--enterprise {
  background: #e8f0fe;
  color: #1677ff;
}
.mcv2-badge--personal {
  background: #fff4df;
  color: #a15c00;
}
.mcv2-badge--normal {
  background: #e6f4ea;
  color: #34a853;
}
.mcv2-badge--limit {
  background: #fff4df;
  color: #a15c00;
}
.mcv2-badge--disabled {
  background: #fee2e2;
  color: #ef4444;
}
.mcv2-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.mcv2-btn {
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
}
.mcv2-btn-disable {
  background: #fef2f2;
  color: #ef4444;
  border-color: #fecaca;
}
.mcv2-btn-disable:hover {
  background: #fee2e2;
}
.mcv2-btn-enable {
  background: #e6f4ea;
  color: #34a853;
  border-color: #bbf7d0;
}
.mcv2-btn-enable:hover {
  background: #dcfce7;
}
.mcv2-btn-detail {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}
.mcv2-btn-detail:hover {
  background: #f6f7f9;
}
.mcv2-btn-edit {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border-strong);
}
.mcv2-btn-edit:hover {
  background: #f6f7f9;
}

/* ===== Model Table (list view) ===== */
.model-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.model-table th {
  padding: 12px 16px;
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 750;
  color: #667085;
  text-transform: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.model-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13px;
}
.model-table tbody tr:last-child td {
  border-bottom: none;
}
.model-table-row:hover {
  background: #f9fafb;
}
.model-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.model-name-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e6f4ea;
  color: #34a853;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.model-name-text {
  font-weight: 700;
  color: var(--text);
}
.model-td-provider .model-provider {
  color: #667085;
  font-size: 13px;
}
.model-td-desc .model-desc-text {
  color: #4d5873;
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-width: 320px;
}
.model-td-actions {
  text-align: right;
}
.model-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.model-row-btn {
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.model-row-btn:hover {
  background: #f6f7f9;
}
.model-row-btn-edit {
  color: #1677ff;
  border-color: #bdd6fe;
  background: #f0f7ff;
}
.model-row-btn-edit:hover {
  background: #dceafe;
}
.model-row-btn-delete {
  color: #ef4444;
  border-color: #fecaca;
  background: #fef2f2;
}
.model-row-btn-delete:hover {
  background: #fee2e2;
}
.model-row-btn-detail {
  color: #667085;
}
.model-row-btn-detail:hover {
  background: #f0f2f5;
}
.model-row-btn-default {
  color: #667085;
}
.model-row-btn-default:hover {
  background: #f0f2f5;
}

/* ===== 模型管理专用 Toggle 开关 ===== */
.model-row-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.model-row-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.model-row-switch span {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.model-row-switch span::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.model-row-switch input:checked + span {
  background: #34a853;
}
.model-row-switch input:checked + span::after {
  transform: translateX(16px);
}
.model-row-switch em {
  min-width: 16px;
  color: #667085;
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
  transition: color 0.2s;
}
.model-row-switch input:checked ~ em {
  color: #34a853;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.28);
}

.confirm-dialog {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  width: min(460px, 100%);
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
}

.confirm-icon.danger {
  background: var(--red-soft);
  color: var(--red);
}

.confirm-icon.warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.confirm-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.confirm-content h2 {
  font-size: 17px;
}

.confirm-content p {
  color: #4d5873;
  line-height: 1.6;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* Modal dialog (for org management etc.) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.28);
}

.modal-dialog {
  width: min(480px, 100%);
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: #101828;
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #667085;
  font-size: 22px;
  cursor: pointer;
  border-radius: 8px;
  line-height: 1;
}

.modal-close:hover {
  background: #f2f4f7;
  color: #101828;
}

.modal-body {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #344054;
}

.form-group .required {
  color: var(--red);
}

.form-input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 14px;
  color: #101828;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.12);
}

.form-input:disabled {
  background: #f9fafb;
  color: #667085;
  cursor: not-allowed;
}

.tree {
  display: grid;
  gap: 8px;
}

.tree-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcfd;
}

.tree-row.child {
  margin-left: 18px;
}

.quota-list {
  display: grid;
  gap: 14px;
}

.quota-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 12px;
}

.matrix {
  display: grid;
  grid-template-columns: 170px repeat(5, minmax(84px, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.matrix > div {
  min-height: 42px;
  padding: 11px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  font-size: 13px;
}

.matrix > div:nth-child(6n) {
  border-right: 0;
}

.matrix .head {
  background: #fbfcfd;
  color: #667085;
  font-weight: 800;
}

.yes,
.no {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-weight: 900;
}

.yes {
  background: var(--green-soft);
  color: var(--green);
}

.no {
  background: var(--red-soft);
  color: var(--red);
}

.mini-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 224px;
  padding: 12px 0 0;
}

.bar {
  display: grid;
  align-items: end;
  justify-items: center;
  flex: 1;
  height: 176px;
}

.bar-fill {
  width: 100%;
  max-width: 34px;
  border-radius: 8px 8px 0 0;
  background: var(--green);
}

.bar-label {
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
}

.events {
  display: grid;
  gap: 13px;
}

.event {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 12px;
}

.event-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--blue);
}

.event-title {
  font-weight: 760;
}

.event-meta {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.dashboard-actions-card .card-header {
  min-height: 50px;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.dashboard-action {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
  text-align: left;
}

.dashboard-action:hover {
  border-color: rgba(10, 174, 96, 0.38);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.08);
}

.dashboard-action strong {
  color: var(--text);
  font-size: 14px;
}

.dashboard-action span {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.tenant-resource-card {
  min-width: 0;
}

.tenant-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.tenant-resource-item {
  display: grid;
  gap: 9px;
  min-height: 126px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbfcfd;
}

.resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.resource-head span {
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.resource-head strong {
  color: var(--green);
  font-size: 13px;
}

.resource-value {
  color: var(--text);
  font-size: 20px;
  font-weight: 850;
}

.tenant-resource-item p {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.workspace-card {
  display: grid;
  gap: 16px;
  padding: 17px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
}

.codex-workspace-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.codex-workspace-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.codex-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.codex-list-head h2 {
  font-size: 16px;
}

.codex-list-head p {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
}

.codex-workspace-items {
  display: grid;
  gap: 8px;
}

.codex-workspace-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.codex-workspace-item:hover,
.codex-workspace-item.active {
  border-color: rgba(25, 135, 84, 0.38);
  background: #f6fbf8;
}

.codex-workspace-item .item-main,
.codex-workspace-item .item-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.codex-workspace-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-workspace-item em,
.codex-workspace-item small {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-workspace-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.codex-workspace-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.codex-kicker {
  margin-bottom: 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.codex-workspace-hero h2 {
  font-size: 22px;
  line-height: 1.25;
}

.codex-workspace-hero p {
  margin-top: 7px;
  color: #667085;
  font-size: 13px;
  word-break: break-all;
}

.codex-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.codex-context-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
}

.codex-context-card span {
  color: #667085;
  font-size: 12px;
}

.codex-context-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-context-card p {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.codex-workspace-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.workspace-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #ffffff;
}

.workspace-section-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.workspace-section-tabs span:first-child {
  border-color: rgba(25, 135, 84, 0.35);
  background: #f2fbf6;
  color: var(--green);
}

.workspace-view-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #ffffff;
}

.workspace-view-tabs button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.workspace-view-tabs button.active {
  background: #eaf8f0;
  color: var(--green);
}

.workspace-tab-panel {
  display: grid;
  gap: 12px;
}

.workspace-tab-panel .workspace-view-tabs {
  margin-bottom: 2px;
}

.workspace-tab-content {
  display: grid;
  gap: 12px;
}

.workspace-tab-actions {
  display: flex;
  justify-content: flex-end;
}

.workspace-tab-content .model-section-title {
  padding: 0;
  border-bottom: 0;
}

.platform-workspace-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.workspace-platform-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.workspace-list-title {
  align-items: flex-start;
}

.workspace-analysis-value {
  display: inline-block;
  margin-top: 4px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.empty-panel {
  padding: 18px 16px;
  color: #667085;
  font-size: 13px;
}

.in-panel-toolbar {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.workspace-detail-page .model-section-title span {
  color: #667085;
  font-size: 12px;
}

/* 文件夹浏览器：面包屑 */
.ws-breadcrumb { display: inline-flex; align-items: center; gap: 2px; margin-top: 2px; }
.ws-bc-link {
  color: #2563eb; cursor: pointer; font-size: 12px;
  transition: color 0.12s;
}
.ws-bc-link:hover { color: #1d4ed8; text-decoration: underline; }
.ws-bc-current { color: #1d2939; font-size: 12px; font-weight: 500; }
.ws-bc-sep { color: #98a2b3; font-size: 11px; }

/* 文件夹浏览器：文件列表 */
.ws-folder-icon, .ws-file-icon { display: inline-flex; align-items: center; }
.ws-folder-icon svg { margin-right: 4px; }
.ws-folder-name { font-weight: 500; color: #1d2939; }
.ws-folder-name.ws-folder-link {
  color: #2563eb; cursor: pointer;
  transition: color 0.12s;
}
.ws-folder-name.ws-folder-link:hover { color: #1d4ed8; text-decoration: underline; }
.ws-file-name { color: #344054; padding-left: 2px; }
.ws-file-link {
  color: #2563eb; cursor: pointer;
  transition: color 0.12s;
}
.ws-file-link:hover { color: #1d4ed8; text-decoration: underline; }

/* ===== 工作区文件树 ===== */
.ws-tree-table {
  min-width: 760px;
}
.ws-tree-table thead th {
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
  color: #667085;
  background: #fbfcfd;
  padding: 11px 16px;
}
.ws-tree-table td {
  padding: 10px 12px;
  font-size: 13px;
  vertical-align: middle;
}
.ws-tree-folder-row td {
  background: #fffbeb;
}
.ws-tree-folder-row:hover td {
  background: #fef3c7 !important;
}
.ws-tree-file-row td {
  background: #fff;
}
.ws-tree-file-row:hover td {
  background: #f9fafb !important;
}
.ws-tree-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, transform 0.12s;
}
.ws-tree-arrow:hover {
  background: rgba(0,0,0,0.06);
}
.ws-tree-arrow svg {
  transition: transform 0.15s ease;
}
.ws-tree-arrow-expanded svg {
  transform: rotate(90deg);
}
.ws-tree-arrow-empty {
  visibility: hidden;
}
.ws-tree-label {
  font-weight: 500;
  color: #1d2939;
  cursor: pointer;
  transition: color 0.12s;
}
.ws-tree-name:hover .ws-tree-label {
  color: #1d4ed8;
}
.ws-tree-folder-row .ws-tree-label {
  font-weight: 650;
}
.ws-tree-file-row .ws-tree-label {
  color: #2563eb;
}

/* ===== 对话空间钻入行 ===== */
.ws-drill-row {
  cursor: pointer;
}
.ws-drill-row:hover td {
  background: #dbeafe !important;
}
.ws-drill-row .ws-tree-label {
  color: #1d4ed8;
  font-weight: 600;
}

/* ===== 钻入面包屑 ===== */
.ws-drill-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  margin-bottom: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
}
.ws-drill-breadcrumb .btn {
  padding: 2px 8px;
  font-size: 12px;
  background: transparent;
  border: none;
  color: #4b5563;
  cursor: pointer;
  border-radius: 4px;
}
.ws-drill-breadcrumb .btn:hover {
  background: #e5e7eb;
  color: #1d4ed8;
}
.ws-drill-sep {
  color: #9ca3af;
  font-size: 14px;
  user-select: none;
}
.ws-drill-current {
  font-weight: 600;
  color: #111827;
  padding: 2px 6px;
}

/* ===== 旧工作区样式 (保留兼容) ===== */
.ws-folder-row td { background: #fefce8; }
.ws-folder-row:hover td { background: #fef3c7 !important; }
.ws-file-row td { background: #fff; }
.ws-file-row:hover td { background: #f9fafb !important; }
.ws-folder-back-row td {
  color: #667085; font-style: italic; padding: 8px 14px;
  transition: background 0.1s;
}
.ws-folder-back-row:hover td { background: #f5f6f7; }

/* 工作区文件列表三点菜单 */
.ws-context-wrap {
  position: relative; display: inline-block;
}
.ws-menu-btn {
  width: 30px; height: 30px;
  border: none; background: transparent;
  color: #667085; font-size: 18px; font-weight: 700;
  border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}
.ws-menu-btn:hover { background: #f2f4f7; color: #1d2939; }
.ws-context-dropdown {
  display: none;
  position: absolute; right: 0; top: 100%;
  z-index: 200;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.1);
  min-width: 120px; padding: 4px 0;
}
.ws-context-dropdown.ws-context-open { display: block; }
.ws-context-item {
  display: block; width: 100%;
  padding: 8px 14px; border: none; background: transparent;
  text-align: left; font-size: 13px; color: #344054;
  cursor: pointer; transition: background 0.1s;
}
.ws-context-item:hover { background: #f5f6f7; }
.ws-context-item.ws-context-danger { color: #d92d20; }
.ws-context-item.ws-context-danger:hover { background: #fef3f2; }

.workspace-detail-summary {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.workspace-summary-metrics span {
  color: #667085;
  font-size: 12px;
}

.workspace-summary-metrics p {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.workspace-summary-metrics div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.workspace-summary-metrics strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-summary-metrics p + strong {
  margin-top: 6px;
}

.workspace-summary-metrics .wide {
  grid-column: span 4;
}

.workspace-summary-metrics .wide strong {
  overflow-wrap: anywhere;
  white-space: normal;
}

.workspace-summary-metrics .workspace-name-summary {
  gap: 8px;
}

.workspace-summary-metrics .workspace-name-summary strong + strong {
  font-size: 13px;
}

.employee-workspace-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.6fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #ffffff;
}

.employee-workspace-identity {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(135deg, #f3fbf7 0%, #ffffff 68%);
}

.employee-workspace-identity strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.employee-workspace-identity span {
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.employee-workspace-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.employee-workspace-stats div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.employee-workspace-stats span {
  color: #667085;
  font-size: 12px;
}

.employee-workspace-stats strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-kv-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 13px 18px 16px;
  background: #fbfcfd;
}

.workspace-activity-list {
  display: grid;
  gap: 0;
  padding: 4px 16px 12px;
}

.activity-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.activity-row:last-child {
  border-bottom: 0;
}

.activity-row span {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--green);
}

.activity-row p {
  color: #344054;
  font-size: 13px;
  line-height: 1.6;
}

.activity-row small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
}

.workspace-modal-backdrop {
  z-index: 70;
}

.workspace-resource-modal {
  width: min(760px, calc(100vw - 32px));
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  gap: 0;
}

.workspace-file-action-modal {
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
}

.workspace-skill-picker-modal {
  width: min(980px, calc(100vw - 32px));
  grid-template-columns: minmax(0, 1fr);
  padding: 0;
  gap: 0;
}

.workspace-skill-picker-modal .workspace-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
}

.workspace-skill-picker-modal .workspace-modal-head h2 {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-skill-picker-body {
  display: grid;
  gap: 12px;
  padding: 14px 18px 16px;
}

.workspace-skill-picker-filter {
  display: grid;
  grid-template-columns: 160px minmax(360px, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 700px;
}

.workspace-skill-picker-filter .model-searchbar {
  width: 100%;
}

.workspace-skill-picker-body .table-wrap {
  max-height: 520px;
  overflow: auto;
}

.workspace-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.workspace-modal-head h2 {
  font-size: 17px;
}

.workspace-modal-head p {
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
}

.workspace-file-modal-head {
  align-items: center;
  padding: 16px 18px 12px;
}

.workspace-file-modal-head h2 {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-file-modal-body {
  display: grid;
  gap: 12px;
  max-height: min(600px, calc(100vh - 190px));
  overflow: auto;
  padding: 14px 18px 16px;
}

.workspace-file-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.workspace-resource-params {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
}

.workspace-resource-modal .confirm-actions {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
}

.workspace-file-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.workspace-file-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.workspace-file-field.wide,
.workspace-upload-note.wide {
  grid-column: 1 / -1;
}

.workspace-file-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed #98d6b8;
  border-radius: 10px;
  background: #f8fffb;
  color: #344054;
}

.workspace-file-field small,
.workspace-upload-note {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.workspace-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  outline: none;
}

.workspace-textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  outline: none;
}

.workspace-file-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.workspace-file-preview-head {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.workspace-file-preview p {
  color: #475467;
  font-size: 13px;
  line-height: 1.6;
}

.workspace-file-preview pre {
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #f6f8f7;
  color: #344054;
  font-size: 12px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.field span {
  color: #344054;
  font-weight: 700;
}

.field b {
  color: var(--red);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
}

.field textarea {
  resize: vertical;
}

.field input:disabled {
  background: #f6f7f9;
  color: #667085;
}

.field-wide {
  grid-column: 1 / -1;
}

.title-with-note {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.title-with-note span {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
}

.logo-preview {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--green);
  color: #ffffff;
  font-weight: 900;
}

.date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.date-range span {
  color: #667085;
  font-weight: 600;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #ffffff;
}

.unit-input input {
  min-height: 38px;
  border: 0;
  border-radius: 0;
}

.unit-input span {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  background: #fbfcfd;
  color: #667085;
  font-weight: 800;
  white-space: nowrap;
}

.unit-input em {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--border);
  background: #fbfcfd;
  color: #667085;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.status-control .switch-row {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
}

.status-switch-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
}

.status-switch-row strong {
  color: var(--text);
  font-size: 13px;
}

.hint-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: #ffffff;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.hint-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.hint-text {
  display: none;
  flex-basis: 100%;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fbfcfd;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.hint-text.visible {
  display: block;
}

.switch-list {
  display: grid;
  gap: 12px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fbfcfd;
}

.switch-title {
  color: var(--text);
  font-weight: 800;
}

.switch-desc {
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::after {
  transform: translateX(18px);
}

.table-status-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.table-status-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.table-status-switch span {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d0d5dd;
  transition: background 0.2s ease;
}

.table-status-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.2);
  transition: transform 0.2s ease;
}

.table-status-switch input:checked + span {
  background: var(--green);
}

.table-status-switch input:checked + span::after {
  transform: translateX(14px);
}

.table-status-switch em {
  width: 28px;
  color: #667085;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.table-status-switch input:checked ~ em {
  color: var(--green);
}

.org-page {
  display: grid;
  gap: 18px;
}

.org-page-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #344054;
}

.org-page-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
}

.org-title-icon {
  color: #667085;
  font-size: 18px;
}

.org-panel {
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.org-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 86px;
  padding: 20px 24px;
}

.org-toolbar .btn.primary {
  border-color: var(--green);
  background: var(--green);
}

.org-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 42vw);
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #ffffff;
  color: #8a94a6;
}

.org-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.org-table-wrap {
  overflow-x: auto;
}

.org-table {
  min-width: 980px;
}

.org-table th {
  height: 48px;
  padding: 0 40px 0 40px;
  background: #f3f5f8;
  color: #101828;
  font-size: 14px;
}

.org-table td {
  height: 48px;
  padding: 0 40px;
  color: #1f2937;
  border-bottom: 0;
}

.org-table tbody tr:nth-child(2n + 1) {
  background: #ffffff;
}

.org-table tbody tr:nth-child(2n) {
  background: #fcfcfd;
}

.org-table tbody tr:hover {
  background: #f7faf9;
}

.org-name-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.org-name-cell.level-1 {
  padding-left: 16px;
}

.org-name-cell.level-2 {
  padding-left: 32px;
}

.org-drag,
.org-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  color: #667085;
  font-size: 12px;
}

.org-caret.empty {
  visibility: hidden;
}

.org-caret.muted {
  color: #98a1b3;
}

.org-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-actions .btn {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  color: #59647a;
  background: #ffffff;
}

.role-table {
  min-width: 1200px;
}

.role-table th:nth-child(3),
.role-table td:nth-child(3) {
  max-width: 320px;
}

.role-desc {
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.role-detail-page .model-meta-grid {
  grid-template-columns: repeat(3, 1fr);
}

.permission-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px 24px;
}

.permission-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.perm-panel-title {
  font-weight: 600;
  font-size: 16px;
  color: #101828;
}

.perm-list-table {
  border: 1px solid #eaecf0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.perm-list-header {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border-bottom: 1px solid #eaecf0;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  color: #101828;
}

.perm-list-row {
  display: flex;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid #f2f4f7;
  transition: background 0.12s;
}
.perm-list-row:last-child {
  border-bottom: none;
}
.perm-list-row:hover {
  background: #f9fafb;
}

.perm-list-col {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.perm-list-col-module {
  width: 200px;
  flex-shrink: 0;
}

.perm-list-col-funcs {
  flex: 1;
  min-width: 0;
}

.perm-list-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.perm-list-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #34a853;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.perm-module-name {
  font-weight: 600;
  font-size: 14px;
  color: #101828;
}

.perm-list-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #e4e7ec;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  color: #667085;
  transition: all 0.12s;
}

.perm-list-item:hover {
  border-color: #d0d5dd;
  background: #f9fafb;
}

.perm-list-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.perm-list-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #34a853;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

@media (max-width: 900px) {
  .perm-list-row {
    flex-direction: column;
    gap: 10px;
  }
  .perm-list-col-module {
    width: 100%;
  }
}

.page-size-select {
  height: 34px;
  min-width: 94px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: #344054;
  outline: 0;
}

.page-jump-input {
  width: 54px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  outline: 0;
}

.enterprise-user-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.enterprise-org-tree,
.enterprise-user-panel {
  overflow: hidden;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.enterprise-org-tree {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  max-height: 720px;
  padding: 16px;
}

.tree-search {
  width: 100%;
}

.enterprise-tree-list {
  display: grid;
  gap: 2px;
  overflow-y: auto;
  padding-right: 4px;
}

.enterprise-tree-node {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 3px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #101828;
  text-align: left;
}

.enterprise-tree-node:hover {
  background: #f3f5f8;
}

.enterprise-tree-node.level-1 {
  padding-left: 30px;
}

.tree-caret {
  display: inline-flex;
  justify-content: center;
  width: 12px;
  color: #667085;
}

.enterprise-user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px 20px;
}

.enterprise-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.enterprise-user-toolbar .btn.primary {
  border-color: var(--green);
  background: var(--green);
}

.batch-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
}

.batch-action-group .btn {
  min-height: 30px;
  padding: 0 10px;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
  color: #475467;
  white-space: nowrap;
}

.batch-action-group .btn:hover {
  border-color: var(--border);
  background: #ffffff;
}

.user-search {
  width: min(360px, 30vw);
  flex: 0 0 auto;
}

.enterprise-user-table-wrap {
  overflow: auto;
}

.enterprise-user-table {
  min-width: 1180px;
}

.enterprise-user-table th {
  height: 48px;
  padding: 0 16px;
  background: #f3f5f8;
  color: #101828;
  font-size: 14px;
}

.enterprise-user-table td {
  height: 48px;
  padding: 0 16px;
  border-bottom: 0;
  color: #1f2937;
}

.enterprise-user-table th:first-child,
.enterprise-user-table td:first-child {
  width: 48px;
  text-align: center;
}

.enterprise-user-table th:last-child,
.enterprise-user-table td:last-child {
  width: 330px;
  background: #ffffff;
}

.enterprise-user-table tbody tr:hover {
  background: #f7faf9;
}

.enterprise-user-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
}

.role-text {
  display: inline-block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.user-row-actions {
  gap: 14px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .enterprise-user-toolbar,
  .enterprise-user-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .batch-action-group {
    flex-wrap: wrap;
  }

  .user-search {
    width: 100%;
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .client-login-stage {
    grid-template-columns: 1fr;
  }

  .client-login-card {
    max-width: 520px;
  }

  .cols-4,
  .cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .codex-workspace-layout,
  .codex-workspace-panels,
  .platform-workspace-grid {
    grid-template-columns: 1fr;
  }

  .codex-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-summary-metrics .wide {
    grid-column: span 2;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-column {
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

@media (max-width: 820px) {
  .entry-page {
    padding: 28px 18px;
  }

  .entry-card {
    min-height: auto;
    padding: 22px;
  }

  .entry-card h1 {
    font-size: 26px;
  }

  .claw-shell-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
  }

  .login-page {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 18px;
  }

  .login-brand h1 {
    font-size: 30px;
  }

  .login-card {
    padding: 22px;
  }

  .claw-login-page {
    padding: 14px;
  }

  .client-window {
    min-height: calc(100vh - 28px);
    border-radius: 10px;
  }

  .client-titlebar {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    padding: 0 12px;
  }

  .window-controls span {
    width: 8px;
    height: 8px;
  }

  .client-login-stage {
    gap: 24px;
    padding: 24px 18px 28px;
  }

  .client-login-hero h1 {
    font-size: 30px;
  }

  .client-login-hero p {
    font-size: 14px;
  }

  .client-preview {
    display: grid;
    gap: 12px;
    min-height: auto;
    padding: 18px;
  }

  .preview-orbit,
  .preview-core,
  .preview-node {
    position: static;
    transform: none;
  }

  .preview-orbit {
    display: none;
  }

  .preview-core {
    width: 100%;
    height: auto;
    min-height: 110px;
  }

  .preview-node {
    width: 100%;
  }

  .client-login-card {
    padding: 22px;
  }

  .client-login-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .codex-context-grid {
    grid-template-columns: 1fr;
  }

  .workspace-summary-metrics {
    grid-template-columns: 1fr;
  }

  .employee-workspace-summary {
    grid-template-columns: 1fr;
  }

  .employee-workspace-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-summary-metrics .wide {
    grid-column: span 1;
  }

  .codex-workspace-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .claw-page {
    min-height: auto;
    padding: 0 0 18px;
  }

  .claw-app-device {
    width: min(390px, calc(100vw - 24px));
    min-height: 720px;
    border-radius: 24px;
  }

  .claw-message {
    max-width: 100%;
  }

  .claw-composer textarea {
    font-size: 14px;
  }

  .claw-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .page {
    width: 100%;
    padding: 18px 16px 42px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .cols-4,
  .cols-3,
  .cols-2,
  .split,
  .tenant-user-layout,
  .enterprise-user-layout,
  .model-market-layout,
  .mcp-list,
  .knowledge-list,
  .skill-list,
  .model-list {
    grid-template-columns: 1fr;
  }

  .tenant-tree-card,
  .model-filter {
    position: static;
  }

  .quota-row {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .form-stack,
  .date-range {
    grid-template-columns: 1fr;
  }

  .model-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .model-toolbar-actions {
    justify-content: flex-end;
  }

  .knowledge-file-head,
  .knowledge-file-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-file-tools,
  .compact-search {
    width: 100%;
  }

  .memory-tabs {
    overflow-x: auto;
  }

  .memory-tabs button {
    min-width: 150px;
    font-size: 16px;
  }

  .memory-section-head {
    flex-direction: column;
  }

  .memory-metrics,
  .memory-overview-grid,
  .memory-intelligence-grid,
  .memory-explorer-layout,
  .memory-graph-layout,
  .dashboard-action-grid,
  .tenant-resource-grid {
    grid-template-columns: 1fr;
  }

  .memory-filter-row,
  .memory-viewbar {
    align-items: stretch;
    flex-direction: column;
  }

  .memory-filter-row label {
    width: 100%;
  }

  .memory-view-switch {
    overflow-x: auto;
  }

  .constellation-popover {
    left: 12%;
    width: 76vw;
  }

  .detail-kv-grid,
  .model-detail-grid,
  .file-analysis-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .paper-preview {
    min-height: auto;
    padding: 24px 18px 30px;
  }

  .paper-preview h1 {
    margin-top: 32px;
    font-size: 22px;
  }

  .file-summary-panel .summary-content {
    grid-template-columns: 1fr;
  }

  .file-history-layout {
    grid-template-columns: 1fr;
  }

  .history-page-side {
    position: static;
    min-height: auto;
  }

  .history-preview-shell .paper-preview {
    min-height: auto;
    padding: 24px 18px 30px;
  }

  .detail-kv-grid div.wide {
    grid-column: auto;
  }

  .model-toolbar-actions .btn {
    width: 100%;
  }

  .field {
    grid-template-columns: 1fr;
  }

  .title-with-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* ===== User Workspace Card ===== */
.workspace-user-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.workspace-user-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 8px;
}

.workspace-user-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.workspace-user-card-header p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.workspace-user-card-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 16px;
}

.workspace-user-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.workspace-user-stat span {
  font-size: 11px;
  color: var(--text-muted);
}

.workspace-user-stat strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.workspace-user-storage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
}

.workspace-user-storage-bar .progress {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #f1f5f9;
  overflow: hidden;
}

.workspace-user-storage-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.workspace-user-storage-bar > span {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

.workspace-user-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-light);
}

.workspace-user-card-footer .btn {
  font-size: 13px;
  padding: 6px 14px;
}

/* ===== File Preview ===== */
.file-preview-box {
  margin-top: 16px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
}

.file-preview-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: rgba(42, 201, 150, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.file-preview-path {
  font-size: 12px;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

.file-preview-content {
  padding: 14px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-primary);
  background: transparent;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow-y: auto;
}

/* ===== 企业工作区 - 用户列表（点击进入详情） ===== */
.user-ws-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.user-ws-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.15s ease;
}

.user-ws-row:hover {
  background: var(--soft);
  border-color: var(--border-strong);
  box-shadow: 0 2px 10px rgba(0, 20, 44, 0.05);
}

.user-ws-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.user-ws-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.user-ws-info {
  min-width: 0;
}

.user-ws-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.user-ws-meta {
  font-size: 12px;
  color: var(--faint);
  margin-top: 2px;
}

.user-ws-row-metrics {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}

.user-ws-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-ws-bar-wrap.small {
  gap: 8px;
}

.user-ws-bar-bg {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  min-width: 60px;
  overflow: hidden;
}

.user-ws-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.user-ws-bar-text {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.user-ws-row-status {
  flex-shrink: 0;
}

.user-ws-row-arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  color: var(--faint);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-ws-row:hover .user-ws-row-arrow {
  background: var(--hover);
  color: var(--muted);
}

/* ====== 知识库权限配置样式 ====== */

.perm-config-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
}

.perm-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.perm-section-desc {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}

.perm-radio-group {
  display: grid;
  gap: 8px;
}

.perm-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.perm-option:hover {
  border-color: var(--green);
}

.perm-option--active {
  border-color: var(--green);
  background: var(--green-soft);
}

.perm-option input[type="radio"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}

.perm-option-body {
  display: grid;
  gap: 2px;
}

.perm-option-body strong {
  font-size: 13px;
  color: var(--text);
}

.perm-option-body span {
  font-size: 12px;
  color: var(--muted);
}

.perm-sub-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
}

.perm-sub-panel.hidden {
  display: none;
}

.perm-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.perm-required-note {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.perm-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.perm-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.perm-checkbox:hover {
  border-color: var(--green);
}

.perm-checkbox input[type="checkbox"] {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}

.perm-checkbox--locked {
  background: var(--green-soft);
  border-color: rgba(10, 174, 96, 0.3);
  cursor: default;
}

.perm-locked-tag {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
}

/* 权限标签 */
.knowledge-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.perm-badge--global {
  background: var(--green-soft);
  color: var(--green);
}

.perm-badge--department {
  background: #edf5ff;
  color: #2f80ed;
}

.perm-badge--specific {
  background: #fff4df;
  color: #a15c00;
}

/* 知识库卡片权限信息行 */
.knowledge-perm-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--soft);
  font-size: 12px;
  color: var(--muted);
}

.perm-info-icon {
  font-size: 14px;
}

.perm-info-sub {
  margin-left: auto;
  color: var(--faint);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 权限信息展示区块（详情模式） */
.perm-info-section {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
}

.perm-info-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.perm-info-badge--global {
  background: var(--green-soft);
  color: var(--green);
}

.perm-info-badge--department {
  background: #edf5ff;
  color: #2f80ed;
}

.perm-info-badge--specific {
  background: #fff4df;
  color: #a15c00;
}

/* ====== 独立权限配置弹窗 ====== */

.perm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.45);
  animation: permFadeIn 0.15s ease;
}

@keyframes permFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.perm-config-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1101;
  width: min(780px, 94vw);
  max-height: 88vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  animation: permSlideIn 0.2s ease;
}

@keyframes permSlideIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.perm-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 0;
  gap: 16px;
}

.perm-modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text);
}

.perm-modal-header p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.perm-modal-header .icon-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.perm-modal-header .icon-close:hover {
  background: var(--hover);
  color: var(--text);
}

.perm-modal-body {
  padding: 20px 28px 0;
  overflow-y: auto;
  flex: 1;
}

.perm-modal-section {
  margin-bottom: 20px;
}

.perm-modal-section.hidden {
  display: none;
}

.perm-modal-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

/* 权限类型卡片 */
.perm-type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.perm-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  text-align: center;
}

.perm-type-card:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.perm-type-card--active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(10, 174, 96, 0.12);
}

.perm-type-card input[type="radio"] {
  display: none;
}

.perm-type-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.perm-type-card--active .perm-type-card-icon {
  background: rgba(45, 114, 217, 0.1);
  color: var(--primary);
}

.perm-type-card strong {
  font-size: 14px;
  color: var(--text);
}

.perm-type-card span {
  font-size: 12px;
  color: var(--muted);
}

/* ── 企业员工设置/任务页面 ── */

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.settings-group label span {
  color: var(--muted);
  font-weight: 500;
}

.settings-group input:not([type="checkbox"]),
.settings-group select,
.settings-group textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
}

.settings-group textarea {
  min-height: 80px;
  resize: vertical;
}

.settings-group input:focus,
.settings-group select:focus,
.settings-group textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.settings-toggle {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.settings-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.settings-usage-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-usage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}

.settings-usage-head span {
  color: var(--muted);
  font-weight: 500;
}

.settings-usage-head strong {
  color: var(--text);
  font-size: 13px;
}

/* 搜索框 */
.perm-modal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--soft);
  margin-bottom: 12px;
  transition: border-color 0.15s;
}

.perm-modal-search:focus-within {
  border-color: var(--green);
}

.perm-modal-search span {
  font-size: 16px;
  color: var(--muted);
}

.perm-modal-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  color: var(--text);
}

.perm-modal-search input::placeholder {
  color: var(--faint);
}

/* 部门卡片网格 */
.perm-modal-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.perm-dept-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.perm-dept-card:hover {
  border-color: var(--green);
}

.perm-dept-card--checked {
  border-color: var(--green);
  background: var(--green-soft);
}

.perm-dept-card--locked {
  background: var(--green-soft);
  border-color: rgba(10, 174, 96, 0.3);
  cursor: default;
}

.perm-dept-card input[type="checkbox"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.perm-dept-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.perm-dept-name {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 用户卡片网格 */
.perm-modal-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.perm-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.perm-user-card:hover {
  border-color: var(--green);
}

.perm-user-card--checked {
  border-color: var(--green);
  background: var(--green-soft);
}

.perm-user-card input[type="checkbox"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.perm-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perm-user-card--checked .perm-user-avatar {
  background: var(--green);
}

.perm-user-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.perm-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.perm-user-role {
  font-size: 11px;
  color: var(--muted);
}

/* 已选标签 */
.perm-selected-tags {
  margin-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.perm-selected-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.perm-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.perm-tag-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: rgba(10, 174, 96, 0.2);
  color: var(--green);
  font-size: 12px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s;
}

.perm-tag-remove:hover {
  background: rgba(10, 174, 96, 0.35);
}

/* 空状态 */
.perm-modal-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 摘要卡片（侧边栏内） */
.perm-summary-card {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
}

.perm-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.perm-summary-row + .perm-summary-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--soft);
}

.perm-summary-label {
  font-size: 12px;
  color: var(--muted);
  min-width: 56px;
}

.perm-summary-value {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.perm-config-btn {
  width: 100%;
  margin-top: 10px;
}

/* 个人知识库权限说明 */
.perm-config-section--personal {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft);
}

.perm-personal-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: #f0faf0;
  border: 1px solid #c7ebc7;
  border-radius: 9px;
}

.perm-personal-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.perm-personal-notice strong {
  display: block;
  font-size: 13px;
  color: #1a6b1a;
  margin-bottom: 4px;
}

.perm-personal-notice p {
  font-size: 12px;
  color: #4a8c4a;
  margin: 0;
  line-height: 1.5;
}

.perm-badge--personal {
  background: #f0faf0;
  color: #2d8a2d;
}

.perm-info-badge--personal {
  background: #f0faf0;
  color: #2d8a2d;
}

/* 弹窗底部 */
.perm-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* ── 新建任务页面 ── */

.new-task-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* 问候语 */
.new-task-greeting {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 28px;
  letter-spacing: -0.2px;
}

/* 输入器容器 */
.new-task-composer {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 36px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.new-task-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: transparent;
  font-family: inherit;
  min-height: 80px;
}

.new-task-input::placeholder {
  color: var(--muted);
}

/* 工具栏 */
.new-task-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-strong);
  flex-wrap: wrap;
}

.new-task-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.new-task-tool-btn:hover {
  background: var(--green-soft);
  color: var(--green);
}

.new-task-tool-btn:hover {
  background: var(--green-soft);
}

.new-task-model-select,
.new-task-perm-select {
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
}

.new-task-model-select:focus,
.new-task-perm-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,174,96,0.12);
}

.new-task-model-select {
  max-width: 260px;
}

.new-task-perm-select {
  max-width: 130px;
}

.new-task-model-select:focus,
.new-task-perm-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,174,96,0.12);
}

/* 加号弹出菜单 */
.new-task-plus-wrap {
  position: relative;
}

.new-task-plus-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 170px;
  z-index: 10;
}

.new-task-plus-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.new-task-plus-item:hover {
  background: var(--green-soft);
  color: var(--green);
}

.new-task-plus-item svg {
  flex-shrink: 0;
  color: var(--muted);
}

.new-task-plus-item:hover svg {
  color: var(--green);
}

.new-task-info-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.15s, background 0.15s;
}

.new-task-info-btn:hover {
  color: var(--green);
  background: var(--green-soft);
}

/* 快捷操作按钮 */
.new-task-quick-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.new-task-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.new-task-quick-btn:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10, 174, 96, 0.12);
  color: var(--green);
}

.new-task-quick-btn svg {
  flex-shrink: 0;
}

/* 智能体卡片列表 */
.new-task-assistants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.new-task-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 14px;
  padding: 24px 18px 20px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-align: center;
}

.new-task-card:hover {
  border-color: #a5d6a7;
  box-shadow: 0 2px 16px rgba(10,174,96,0.10);
}

.new-task-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.new-task-card-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.4;
}

.new-task-card-text p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ===== 历史对话详情页 ===== */
.history-detail-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 57px);
  background: var(--bg);
}

/* 顶部栏 */
.hd-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border-strong);
  flex-shrink: 0;
  height: 52px;
}

.hd-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.hd-back:hover {
  background: var(--green-soft);
  color: var(--green);
}

.hd-model-select {
  height: 32px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 280px;
  flex-shrink: 0;
}

.hd-title-area {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.hd-title-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hd-msg-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.hd-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  transition: background 0.15s;
}

.hd-icon-btn:hover {
  background: var(--green-soft);
}

.hd-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

/* 主内容区 */
.hd-main {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* 对话区 */
.hd-chat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hd-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 16px;
}

/* 消息气泡 */
.hd-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.hd-msg-user {
  justify-content: flex-end;
}

.hd-msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.hd-avatar-user {
  background: var(--green);
  color: #fff;
  order: 2;
}

.hd-avatar-assistant {
  background: #e8f0fe;
  color: var(--primary);
}

.hd-bubble-user {
  background: var(--green-soft);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 14px 4px 14px 14px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 520px;
}

.hd-msg-content {
  flex: 1;
  min-width: 0;
}

/* 结构化区块 */
.conv-section {
  margin-bottom: 20px;
}

.conv-section:last-child {
  margin-bottom: 0;
}

.conv-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
}

.conv-kv-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.conv-kv-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.conv-kv-label {
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
  flex-shrink: 0;
}

.conv-kv-value {
  color: var(--muted);
}

/* 步骤列表 */
.conv-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conv-steps li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}

/* 数据表格 */
.conv-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}

.conv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.conv-table thead {
  background: #f5f5f5;
}

.conv-table th {
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.conv-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  color: var(--text);
  line-height: 1.5;
}

.conv-table tbody tr:last-child td {
  border-bottom: none;
}

.conv-table tbody tr:hover {
  background: #fafafa;
}

/* 底部输入栏 */
.hd-input-bar {
  padding: 12px 32px 16px;
  background: #fff;
  border-top: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.hd-input-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--green-soft);
  border: 1px solid #b0e5cd;
  border-radius: 12px;
  padding: 10px 14px;
}

.hd-input-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #94dcb5;
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.hd-input-plus:hover {
  background: rgba(10, 174, 96, 0.05);
}

.hd-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  min-height: 22px;
  max-height: 120px;
  font-family: inherit;
}

.hd-input::placeholder {
  color: #999;
}

.hd-input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hd-perm-select {
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid #94dcb5;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.hd-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #94dcb5;
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.hd-info-btn:hover {
  background: var(--green-soft);
}

.hd-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.15s;
}

.hd-send-btn:hover {
  background: #099b57;
}

/* 右侧工作空间面板 */
.hd-workspace {
  width: 260px;
  flex-shrink: 0;
  border-left: 1px solid var(--border-strong);
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hd-ws-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}

.hd-ws-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-strong);
}

.hd-ws-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: color 0.15s;
}

.hd-ws-tab.active {
  color: var(--green);
  font-weight: 600;
}

.hd-ws-tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--green);
  border-radius: 1px;
}

.hd-ws-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.hd-ws-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.hd-ws-tree {
  display: flex;
  flex-direction: column;
}

.hd-ws-folder {
  display: flex;
  flex-direction: column;
}

.hd-ws-folder-name {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
}

.hd-ws-folder-name:hover {
  background: var(--green-soft);
}

.hd-ws-folder-children {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
}

.hd-ws-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
}

.hd-ws-file:hover {
  background: var(--green-soft);
  color: var(--green);
}

.hd-ws-file svg, .hd-ws-folder-name svg {
  flex-shrink: 0;
  color: #999;
}

/* 空状态 */
.page-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  font-size: 15px;
  color: var(--muted);
}

/* ===== 模型管理弹窗 ===== */
.mcp-form-dialog {
  background: #fff;
  border-radius: 14px;
  width: 460px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}

.mcp-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-strong);
}

.mcp-form-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.mcp-form-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.mcp-form-close:hover {
  background: var(--green-soft);
  color: var(--text);
}

.mcp-form-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mcp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mcp-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.mcp-field input,
.mcp-field select,
.mcp-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.mcp-field input:focus,
.mcp-field select:focus,
.mcp-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,174,96,0.12);
}

.mcp-field textarea {
  resize: vertical;
  min-height: 60px;
}

.mcp-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border-strong);
}

/* 添加模型弹窗 - 自定义样式 */
.model-add-dialog {
  width: 480px;
}

.mcp-field label .required {
  color: #f5222d;
  margin-right: 2px;
}

.model-platform-select {
  position: relative;
}

.model-platform-select select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667085' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.model-platform-select select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,174,96,0.12);
}

.model-apikey-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.model-apikey-wrap input {
  width: 100%;
  min-height: 40px;
  padding: 8px 36px 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.model-apikey-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10,174,96,0.12);
}

.model-apikey-edit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.model-apikey-edit:hover {
  color: var(--text);
}

.model-field-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

/* 模型管理 - 企业/个人 badge */
.perm-badge--enterprise {
  background: #e8f0fe;
  color: #1677ff;
}

.perm-badge--platform {
  background: #fff4df;
  color: #a15c00;
}

/* 历史对话 - 置顶标记 */
.pin-badge {
  display: inline-block;
  vertical-align: middle;
  font-size: 14px;
  margin-right: 2px;
}

/* MCP 环境变量行 */
.mcp-env-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcp-env-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mcp-env-row input {
  flex: 1;
  min-width: 0;
}

.mcp-env-row .btn {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 12px;
}

/* 定时任务卡片底部 */
.cron-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-strong);
}

.cron-expression code {
  font-family: "SF Mono", "Consolas", monospace;
  font-size: 12px;
  background: var(--soft);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
}

/* 搜索任务弹窗 */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  background: rgba(15, 23, 42, 0.45);
}

.search-dialog {
  width: min(680px, 92vw);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.search-dialog-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-strong);
}

.search-dialog-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.search-dialog-close:hover {
  background: var(--soft);
  color: var(--text);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-dialog-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.search-dialog-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  font-family: inherit;
}

.search-dialog-input::placeholder {
  color: #aaa;
}

.search-dialog-clear {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}

.search-dialog-clear:hover {
  background: var(--soft);
}

.search-dialog-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.search-hint {
  text-align: center;
  padding: 48px 20px;
}

.search-hint-icon {
  font-size: 36px;
  color: #ccc;
  margin-bottom: 12px;
}

.search-hint p {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 6px;
}

.search-hint span {
  font-size: 13px;
  color: var(--muted);
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--green-soft);
}

.search-result-item + .search-result-item {
  border-top: 1px solid #eee;
}

.search-result-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.search-result-head strong {
  font-size: 14px;
  color: var(--text);
}

.search-result-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.search-result-snippet {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

.search-result-snippet b {
  color: var(--green);
  background: rgba(10, 174, 96, 0.1);
  padding: 0 2px;
  border-radius: 2px;
}

.search-result-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
