/* ==========================================================================
   安澜 · ANLAN — 运动安全管理控制台
   阳光运动工作台 / 奶油卡片 / 橙色 + 薄荷绿强调
   ========================================================================== */

:root {
  --bg: #04151e;
  --bg-deep: #020e15;
  --sidebar: #051923;
  --panel: #09242f;
  --panel-2: #0b2a35;
  --panel-soft: rgba(13, 45, 56, 0.55);
  --line: rgba(178, 236, 234, 0.1);
  --line-strong: rgba(178, 236, 234, 0.17);
  --text: #eaf8f5;
  --text-soft: rgba(222, 246, 242, 0.68);
  --muted: rgba(174, 210, 210, 0.46);
  --faint: rgba(174, 210, 210, 0.28);
  --mint: #61e2ca;
  --mint-deep: #18a98f;
  --mint-wash: rgba(97, 226, 202, 0.1);
  --blue: #7ab6ff;
  --amber: #efc078;
  --danger: #ff9583;
  --cream: #f4f8f4;
  --cream-2: #eaf1ec;
  --ink: #0a2d38;
  --sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --serif: "Noto Serif SC Variable", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", Georgia, serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 24px 60px rgba(0, 7, 12, 0.32);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: rgba(97, 226, 202, 0.3); }
:focus-visible { outline: 2px solid rgba(127, 245, 226, 0.9); outline-offset: 2px; }
[hidden] { display: none !important; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon-sprite symbol { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* 图标均为用 <use> 引用的 24×24 线条符号；把描边放在 svg 上，
   才能正确继承进 <use> 的 Shadow Tree。 */
svg[viewBox="0 0 24 24"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ================================ 基础组件 ================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(12, 42, 53, 0.5);
  color: var(--text-soft);
  font-size: 12px; font-weight: 600; letter-spacing: .015em;
  white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease), opacity .2s;
}
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn:hover { color: var(--text); border-color: rgba(178, 236, 234, .3); background: rgba(20, 58, 69, .7); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary {
  border-color: transparent;
  background: linear-gradient(145deg, #72ead3, #25b69a);
  color: #032a29;
  box-shadow: 0 8px 22px rgba(38, 186, 160, .17);
}
.btn--primary:hover { background: linear-gradient(145deg, #8bf4df, #2fc6a8); color: #022321; border-color: transparent; }
.btn--soft { background: var(--mint-wash); border-color: rgba(97, 226, 202, .18); color: var(--mint); }
.btn--soft:hover { background: rgba(97, 226, 202, .15); color: #a6ffed; }
.btn--danger { color: #ffbcae; border-color: rgba(255, 149, 131, .2); background: rgba(120, 44, 35, .17); }
.btn--danger:hover { color: #ffd6ce; background: rgba(140, 50, 40, .3); border-color: rgba(255, 149, 131, .4); }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 32px; padding: 6px 11px; font-size: 11px; border-radius: 8px; }
.btn--sm svg { width: 13px; height: 13px; }
.btn--block { width: 100%; }
.btn--login { width: 100%; min-height: 48px; margin-top: 8px; font-size: 13px; border-radius: 11px; }
.btn--login svg { width: 17px; height: 17px; }

.icon-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  transition: background .2s, color .2s;
}
.icon-btn:hover { background: rgba(222, 251, 247, .07); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn--danger:hover { color: var(--danger); background: rgba(255, 149, 131, .08); }

.field { display: block; }
.field__label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--text-soft); font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.field__label small { color: var(--faint); font-weight: 400; }
.field__control {
  position: relative;
  display: flex; align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(3, 21, 28, 0.45);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field__control:focus-within { border-color: rgba(97, 226, 202, .48); background: rgba(4, 26, 33, .72); box-shadow: 0 0 0 3px rgba(97, 226, 202, .07); }
.field__control input {
  width: 100%; height: 40px;
  padding: 0 12px;
  border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: 12.5px;
}
.field__control input::placeholder, textarea::placeholder { color: rgba(174, 210, 210, .28); }
.field__control input:disabled { color: var(--muted); }
.field__icon { width: 16px; height: 16px; margin-left: 13px; flex: 0 0 auto; color: var(--muted); }
.field__control .field__icon + input { padding-left: 9px; }
.field__reveal {
  flex: 0 0 36px; width: 36px; height: 36px; margin-right: 2px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--muted);
}
.field__reveal:hover { color: var(--text-soft); }
.field__reveal svg { width: 16px; height: 16px; }
.field__hint { display: block; margin-top: 6px; color: var(--faint); font-size: 10px; line-height: 1.6; }
.field__hint code { font-family: var(--mono); color: rgba(158, 232, 222, .55); font-size: 9.5px; }
.field + .field { margin-top: 16px; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(3, 21, 28, 0.45);
  color: var(--text);
  font-size: 12.5px;
  outline: 0;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input { height: 42px; padding: 0 12px; }
.textarea { min-height: 110px; padding: 11px 12px; resize: vertical; line-height: 1.7; }
.select { height: 42px; padding: 0 34px 0 12px; 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='%237ea5a8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(97, 226, 202, .48); background: rgba(4, 26, 33, .72); box-shadow: 0 0 0 3px rgba(97, 226, 202, .07); }
.input::placeholder, .textarea::placeholder { color: rgba(174, 210, 210, .28); }
.textarea--mono { font-family: var(--mono); font-size: 11.5px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  position: relative; display: inline-block;
  width: 34px; height: 19px;
  border-radius: 999px; background: rgba(174, 210, 210, .18);
  transition: background .22s;
}
.switch__track::after {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #c6d9d7;
  transition: transform .22s var(--ease), background .22s;
}
.switch input:checked + .switch__track { background: rgba(97, 226, 202, .55); }
.switch input:checked + .switch__track::after { transform: translateX(15px); background: #f2fffb; }
.switch__label { color: var(--text-soft); font-size: 11px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .05em;
  white-space: nowrap;
}
.badge i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge--mint { color: var(--mint); border-color: rgba(97, 226, 202, .18); background: var(--mint-wash); }
.badge--amber { color: var(--amber); border-color: rgba(239, 192, 120, .2); background: rgba(239, 192, 120, .07); }
.badge--blue { color: var(--blue); border-color: rgba(122, 182, 255, .2); background: rgba(122, 182, 255, .07); }
.badge--danger { color: var(--danger); border-color: rgba(255, 149, 131, .2); background: rgba(255, 149, 131, .06); }
.badge--muted { color: var(--faint); background: rgba(174, 210, 210, .04); }

.avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(97, 226, 202, .26), rgba(23, 119, 140, .25));
  border: 1px solid rgba(155, 244, 231, .2);
  color: #b9fff2;
  font-family: var(--serif); font-size: 16px; font-weight: 700;
}
.avatar--sm { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(97, 226, 202, .18);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

/* ================================= 登录 ================================= */
.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: var(--bg-deep);
}
.login-scene {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex; flex-direction: column;
  padding: clamp(30px, 4vw, 58px);
  background: #041923;
}
.login-scene__image {
  position: absolute; inset: 0;
  background-image: url('/assets/sunny-track-poster.jpg');
  background-size: cover;
  background-position: 56% center;
  filter: saturate(.86) brightness(.94) contrast(1.05);
  transform: scale(1.03);
}
.login-scene__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 14, 21, .83) 0%, rgba(2, 15, 22, .34) 52%, rgba(2, 15, 22, .58) 100%),
    radial-gradient(ellipse at 72% 36%, rgba(44, 151, 157, .16), transparent 55%),
    linear-gradient(180deg, rgba(2, 12, 18, .56), transparent 34%, rgba(2, 13, 20, .82));
}
.login-scene__rings {
  position: absolute; right: 7%; bottom: 9%;
  width: 44vw; height: 44vw; max-width: 660px; max-height: 660px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .55;
}
.login-scene__rings i {
  position: absolute; inset: 0;
  border: 1px solid rgba(155, 245, 237, .16);
  border-radius: 50%;
}
.login-scene__rings i:nth-child(2) { inset: 11%; border-color: rgba(155, 245, 237, .1); }
.login-scene__rings i:nth-child(3) { inset: 24%; border-color: rgba(155, 245, 237, .07); }
.login-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 13px; align-self: flex-start; }
.login-brand__mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(206, 253, 251, .22);
  border-radius: 14px;
  background: rgba(225, 255, 253, .07);
  backdrop-filter: blur(8px);
}
.login-brand__mark svg { width: 30px; height: 30px; }
.login-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.login-brand strong { font-family: var(--serif); font-size: 24px; letter-spacing: .12em; }
.login-brand small { margin-top: 3px; color: rgba(221, 249, 245, .4); font-size: 8px; letter-spacing: .28em; }
.login-quote { position: relative; z-index: 2; margin-top: auto; margin-bottom: auto; padding: 8vh 0 6vh; max-width: 600px; }
.login-quote__eyebrow { display: block; margin-bottom: 22px; color: rgba(153, 243, 234, .52); font-size: 9px; font-weight: 700; letter-spacing: .3em; }
.login-quote h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.5vw, 62px);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -.01em;
  text-shadow: 0 12px 40px rgba(0, 8, 14, .35);
}
.login-quote p { margin: 0; color: rgba(220, 246, 243, .52); font-size: 12px; line-height: 2; letter-spacing: .05em; }
.login-meta { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; color: rgba(214, 244, 241, .32); font-size: 8.5px; letter-spacing: .13em; }
.login-meta span:first-child { display: flex; align-items: center; gap: 8px; }
.login-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }

.login-panel {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 5vw, 80px);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(187, 232, 216, .6), transparent 48%),
    linear-gradient(160deg, #f9fbf7, #edf3ed);
  color: var(--ink);
}
.login-panel::before {
  content: "";
  position: absolute; left: 0; top: 12%; bottom: 12%;
  width: 1px;
  background: linear-gradient(transparent, rgba(19, 76, 82, .12), transparent);
}
.login-mobile-brand { display: none; }
.login-card { width: min(390px, 100%); margin: 0 auto; }
.login-card__head { margin-bottom: 32px; }
.login-card__kicker { display: block; margin-bottom: 12px; color: #6c9895; font-size: 8.5px; font-weight: 700; letter-spacing: .28em; }
.login-card h2 { margin: 0 0 9px; font-family: var(--serif); font-size: 37px; font-weight: 600; letter-spacing: .01em; color: #0b3540; }
.login-card__head p { margin: 0; color: #74938f; font-size: 12px; }
.login-panel .field { margin-bottom: 16px; }
.login-panel .field__label { color: #4d7773; }
.login-panel .field__control {
  min-height: 48px;
  border: 1px solid rgba(18, 72, 68, .16);
  background: rgba(255, 255, 255, .66);
  border-radius: 11px;
}
.login-panel .field__control:focus-within { border-color: #57bfa7; background: #fff; box-shadow: 0 0 0 4px rgba(87, 191, 167, .1); }
.login-panel .field__control input { height: 46px; color: #0b3540; }
.login-panel .field__control input::placeholder { color: #a6bcb8; }
.login-panel .field__icon { color: #83a7a1; }
.login-panel .field__reveal { color: #83a7a1; }
.login-panel .btn--primary { background: linear-gradient(145deg, #22b798, #0e8f7b); color: #fff; box-shadow: 0 12px 26px rgba(22, 146, 127, .2); }
.login-panel .btn--primary:hover { background: linear-gradient(145deg, #2bc9a9, #16a48c); }
.form-error {
  margin-bottom: 15px; padding: 10px 12px;
  border: 1px solid rgba(196, 83, 63, .2);
  border-radius: 9px;
  background: rgba(196, 83, 63, .07);
  color: #a34435; font-size: 11px;
}
.login-hint {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 24px; padding: 12px 14px;
  border: 1px solid rgba(23, 81, 74, .1);
  border-radius: 10px;
  background: rgba(255, 255, 255, .38);
  color: #789590;
  font-size: 10px; line-height: 1.65;
}
.login-hint svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #4c9f8e; }
.login-hint b { color: #225e55; font-family: var(--mono); font-weight: 600; }
.login-footer {
  position: absolute; left: clamp(28px, 5vw, 80px); right: clamp(28px, 5vw, 80px); bottom: 25px;
  display: flex; align-items: center; justify-content: space-between;
  color: #91a9a4; font-size: 9px; letter-spacing: .05em;
}
.login-footer a:hover { color: #346f66; }

/* ================================ 应用骨架 ================================ */
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  background:
    radial-gradient(ellipse at 75% -10%, rgba(25, 101, 106, .18), transparent 42%),
    var(--bg);
}
.sidebar {
  position: sticky; top: 0;
  z-index: 30;
  height: 100vh;
  display: flex; flex-direction: column;
  padding: 26px 17px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #061c26, #04141c 72%);
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; margin-bottom: 34px; }
.sidebar-brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(188, 247, 241, .15);
  border-radius: 12px;
  background: rgba(212, 255, 251, .06);
}
.sidebar-brand__mark svg { width: 25px; height: 25px; }
.sidebar-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-brand__text strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .08em; }
.sidebar-brand__text small { margin-top: 4px; color: var(--faint); font-size: 8px; letter-spacing: .18em; }
.sidebar-label { padding: 0 12px; margin-bottom: 9px; color: rgba(174, 210, 210, .28); font-size: 8px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.sidebar-label--spaced { margin-top: 24px; }
.sidebar-nav { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: none;
  color: rgba(213, 242, 239, .55);
  font-size: 12px; text-align: left;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-item svg { width: 17px; height: 17px; color: rgba(172, 218, 216, .55); transition: color .2s; }
.nav-item:hover { color: var(--text); background: rgba(207, 247, 243, .045); }
.nav-item.is-active {
  color: #d8fff8;
  border-color: rgba(97, 226, 202, .12);
  background: linear-gradient(90deg, rgba(97, 226, 202, .12), rgba(97, 226, 202, .025));
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: -18px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(97, 226, 202, .5);
}
.nav-item.is-active svg { color: var(--mint); }
.nav-badge { margin-left: auto; min-width: 19px; height: 18px; display: grid; place-items: center; padding: 0 5px; border-radius: 5px; background: rgba(174, 210, 210, .1); color: var(--muted); font-size: 9px; font-style: normal; }
.nav-status { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 6px rgba(239, 192, 120, .5); }
.nav-status.is-online { background: var(--mint); box-shadow: 0 0 7px rgba(97, 226, 202, .6); }
.nav-item--link { margin-top: 4px; }
.nav-external { margin-left: auto; width: 13px !important; height: 13px !important; opacity: .4; }
.sidebar-foot { margin-top: auto; padding-top: 26px; }
.system-card {
  margin-bottom: 16px; padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(19, 56, 65, .42), rgba(6, 28, 37, .2));
}
.system-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--faint); font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(97, 226, 202, .08), 0 0 8px rgba(97, 226, 202, .55); }
.system-card strong { display: block; margin-bottom: 3px; color: rgba(222, 252, 247, .72); font-size: 10.5px; font-weight: 600; }
.system-card small { color: var(--faint); font-size: 8.5px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 11px 9px 4px; border-top: 1px solid var(--line); }
.sidebar-user__info { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar-user__info strong { font-size: 11px; font-weight: 600; }
.sidebar-user__info small { color: var(--faint); font-size: 8px; }
.sidebar-user .icon-btn { margin-left: auto; }
.sidebar-backdrop { display: none; }

.workspace { min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.workspace-top {
  position: relative;
  flex: 0 0 82px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(22px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 21, 30, .7);
  backdrop-filter: blur(14px);
}
.workspace-top__left { display: flex; align-items: center; gap: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; color: var(--faint); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.breadcrumb i { font-style: normal; opacity: .5; }
.workspace-top h1 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: .025em; }
.workspace-top__actions { display: flex; align-items: center; gap: 9px; }
.api-pill { display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--faint); font-size: 9px; letter-spacing: .03em; white-space: nowrap; }
.api-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.api-pill.is-online { color: rgba(172, 240, 229, .65); }
.api-pill.is-online i { background: var(--mint); box-shadow: 0 0 6px var(--mint); }
.account-chip {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 8px 0 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 42, 53, .32);
  color: var(--text-soft); font-size: 11px;
}
.account-chip svg { width: 12px; height: 12px; opacity: .5; }
.account-chip:hover { border-color: var(--line-strong); background: rgba(15, 48, 58, .55); }
.account-menu {
  position: absolute; right: clamp(22px, 3vw, 40px); top: 68px;
  z-index: 20;
  width: 158px; padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #0a2731;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-5px) scale(.98);
  pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease);
}
.account-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.account-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 0; border-radius: 6px; background: none; color: var(--text-soft); font-size: 10.5px; text-align: left; }
.account-menu button:hover { background: rgba(218, 253, 248, .06); color: var(--text); }
.account-menu button svg { width: 14px; height: 14px; color: var(--muted); }
.mobile-menu { display: none; }
.content { flex: 1 1 auto; overflow-y: auto; padding: 28px clamp(22px, 3vw, 40px) 40px; scrollbar-width: thin; scrollbar-color: rgba(174, 210, 210, .15) transparent; }
.content::-webkit-scrollbar { width: 7px; }
.content::-webkit-scrollbar-thumb { background: rgba(174, 210, 210, .14); border-radius: 99px; }

/* ================================ 页面通用 ================================ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.page-head__title { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .015em; }
.page-head__desc { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--faint); font-size: 8px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.section-label::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.panel { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(155deg, rgba(12, 40, 51, .62), rgba(6, 25, 34, .48)); overflow: hidden; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 19px 13px; border-bottom: 1px solid var(--line); }
.panel__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.panel__title svg { width: 15px; height: 15px; color: var(--mint); opacity: .8; }
.panel__sub { color: var(--faint); font-size: 9px; }
.panel__body { padding: 19px; }
.panel__foot { padding: 12px 19px; border-top: 1px solid var(--line); }

/* ================================ 数据概览 ================================ */
.welcome-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 148px;
  margin-bottom: 18px; padding: 26px 30px;
  border: 1px solid rgba(156, 246, 234, .14);
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 88% 10%, rgba(99, 226, 210, .15), transparent 48%),
    linear-gradient(110deg, rgba(17, 68, 73, .65), rgba(6, 28, 37, .55));
}
.welcome-card::before {
  content: "";
  position: absolute; right: -4%; bottom: -120%;
  width: 52%; aspect-ratio: 1;
  border: 1px solid rgba(151, 243, 234, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(151, 243, 234, .025), 0 0 0 68px rgba(151, 243, 234, .018);
}
.welcome-card__copy { position: relative; z-index: 1; max-width: 610px; }
.welcome-card__eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: rgba(142, 236, 224, .55); font-size: 8px; font-weight: 700; letter-spacing: .22em; }
.welcome-card__eyebrow i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.welcome-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: .015em; }
.welcome-card h2 em { font-style: normal; color: var(--mint); }
.welcome-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.welcome-card__side { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; padding-left: 25px; }
.welcome-stat { text-align: right; }
.welcome-stat strong { display: block; font-family: var(--serif); font-size: 29px; font-weight: 500; color: rgba(231, 255, 250, .9); }
.welcome-stat span { color: var(--faint); font-size: 8.5px; letter-spacing: .08em; }
.welcome-card__drop { width: 74px; height: 74px; opacity: .75; filter: drop-shadow(0 0 20px rgba(97, 226, 202, .2)); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.stat-card {
  position: relative; overflow: hidden;
  padding: 17px 18px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(13, 44, 54, .66), rgba(6, 26, 35, .45));
}
.stat-card::after { content: ""; position: absolute; right: -18px; bottom: -28px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(97, 226, 202, .08), transparent 70%); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card__icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px; background: rgba(97, 226, 202, .08); border: 1px solid rgba(97, 226, 202, .1); color: var(--mint); }
.stat-card__icon svg { width: 14px; height: 14px; }
.stat-card__icon--blue { color: var(--blue); background: rgba(122, 182, 255, .07); border-color: rgba(122, 182, 255, .1); }
.stat-card__icon--amber { color: var(--amber); background: rgba(239, 192, 120, .06); border-color: rgba(239, 192, 120, .1); }
.stat-card__label { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.stat-card__value { display: flex; align-items: baseline; gap: 6px; margin-bottom: 5px; }
.stat-card__value strong { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: .01em; }
.stat-card__value span { color: var(--faint); font-size: 8px; }
.stat-card__foot { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 8.5px; }
.stat-card__foot b { color: rgba(126, 225, 205, .75); font-weight: 500; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .85fr); gap: 14px; margin-bottom: 14px; }
.chart-wrap { height: 205px; padding: 4px 2px 0; display: flex; flex-direction: column; }
.chart-legend { display: flex; align-items: center; gap: 16px; color: var(--faint); font-size: 8px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 6px; height: 6px; border-radius: 2px; background: var(--mint); }
.chart-legend i.blue { background: var(--blue); }
.chart-svg { width: 100%; height: 100%; margin-top: 10px; overflow: visible; }
.chart-grid-line { stroke: rgba(177, 232, 227, .075); stroke-width: 1; stroke-dasharray: 2 5; }
.chart-axis-label { fill: rgba(174, 210, 210, .35); font-size: 8px; font-family: var(--sans); }
.chart-line { fill: none; stroke: var(--mint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 3px 6px rgba(97, 226, 202, .18)); }
.chart-area { fill: url(#chartFill); }
.chart-dot { fill: #07232c; stroke: var(--mint); stroke-width: 1.6; }
.chart-bar { fill: rgba(122, 182, 255, .27); }
.chart-bar.is-today { fill: rgba(122, 182, 255, .55); }

.api-overview { display: flex; flex-direction: column; height: 100%; }
.api-overview__status { display: flex; align-items: center; gap: 9px; padding: 11px 12px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 9px; background: rgba(3, 20, 27, .35); }
.api-overview__status > i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(239, 192, 120, .07); flex: 0 0 auto; }
.api-overview__status.is-online > i { background: var(--mint); box-shadow: 0 0 0 4px rgba(97, 226, 202, .07), 0 0 8px rgba(97, 226, 202, .5); }
.api-overview__status div { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.api-overview__status strong { font-size: 10.5px; font-weight: 600; }
.api-overview__status small { color: var(--faint); font-size: 8.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-overview__rows { display: grid; gap: 11px; margin-bottom: 18px; }
.api-overview__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--faint); font-size: 9px; }
.api-overview__row b { color: var(--text-soft); font-family: var(--mono); font-size: 9.5px; font-weight: 400; max-width: 64%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-overview .btn { margin-top: auto; }

.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 14px; }
.recent-list { display: grid; }
.recent-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 19px; border: 0; border-bottom: 1px solid rgba(178, 236, 234, .06); background: none; color: inherit; text-align: left; transition: background .18s; }
.recent-item:last-child { border-bottom: 0; }
.recent-item:hover { background: rgba(216, 255, 249, .025); }
.recent-item__icon { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; background: rgba(97, 226, 202, .06); color: rgba(97, 226, 202, .65); }
.recent-item__icon svg { width: 13px; height: 13px; }
.recent-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.recent-item__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; color: var(--text-soft); }
.recent-item__meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--faint); font-size: 8px; }
.recent-item__meta i { width: 2px; height: 2px; border-radius: 50%; background: currentColor; }
.recent-item__time { flex: 0 0 auto; color: var(--faint); font-size: 8px; }
.kb-mini-list { display: grid; gap: 15px; }
.kb-mini { display: grid; gap: 5px; }
.kb-mini__head { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 9.5px; }
.kb-mini__dot { width: 6px; height: 6px; border-radius: 2px; }
.kb-mini__count { margin-left: auto; color: var(--faint); font-size: 8px; }
.kb-mini__bar { height: 3px; border-radius: 99px; background: rgba(174, 210, 210, .08); overflow: hidden; }
.kb-mini__bar i { display: block; height: 100%; border-radius: inherit; background: var(--mint); opacity: .55; }

/* ================================ 知识库 ================================ */
.knowledge-layout { display: grid; grid-template-columns: 255px minmax(0, 1fr); gap: 14px; align-items: start; }
.kb-rail { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(155deg, rgba(11, 40, 50, .58), rgba(5, 24, 33, .42)); overflow: hidden; position: sticky; top: 0; }
.kb-rail__head { display: flex; align-items: center; justify-content: space-between; padding: 15px 14px 12px; border-bottom: 1px solid var(--line); }
.kb-rail__head h2 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .03em; }
.kb-rail__head span { color: var(--faint); font-size: 8px; }
.kb-rail__add { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--line); border-radius: 6px; background: rgba(97, 226, 202, .06); color: var(--mint); }
.kb-rail__add:hover { background: rgba(97, 226, 202, .13); }
.kb-rail__add svg { width: 13px; height: 13px; }
.kb-list { padding: 7px; display: grid; gap: 3px; }
.kb-item {
  display: flex; flex-direction: column; gap: 2px;
  width: 100%; padding: 10px 10px 9px;
  border: 1px solid transparent; border-radius: 9px;
  background: none; text-align: left;
  transition: background .18s, border-color .18s;
}
.kb-item:hover { background: rgba(208, 251, 246, .035); }
.kb-item.is-active { background: linear-gradient(105deg, rgba(97, 226, 202, .1), rgba(97, 226, 202, .02)); border-color: rgba(97, 226, 202, .12); }
.kb-item__top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.kb-item__dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 2px; }
.kb-item__name { font-size: 11.5px; color: rgba(225, 247, 244, .72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-item.is-active .kb-item__name { color: #e4fff9; }
.kb-item__off { margin-left: auto; color: var(--faint); font-size: 7.5px; letter-spacing: .05em; }
.kb-item__meta { padding-left: 14px; color: var(--faint); font-size: 9px; }
.kb-rail__empty { padding: 25px 14px; text-align: center; color: var(--faint); font-size: 9px; }
.kb-rail__foot { padding: 10px 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; line-height: 1.6; }

.kb-main { min-width: 0; display: grid; gap: 14px; }
.kb-hero { position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 22px 19px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(130deg, rgba(14, 48, 57, .7), rgba(6, 25, 34, .45)); }
.kb-hero::after { content: ""; position: absolute; right: -55px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(97, 226, 202, .09), transparent 68%); pointer-events: none; }
.kb-hero__left { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.kb-hero__icon { display: grid; place-items: center; flex: 0 0 45px; width: 45px; height: 45px; border-radius: 12px; background: rgba(97, 226, 202, .09); border: 1px solid rgba(97, 226, 202, .14); color: var(--mint); }
.kb-hero__icon svg { width: 21px; height: 21px; }
.kb-hero h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1.3; }
.kb-hero p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; max-width: 520px; }
.kb-hero__meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 9px; color: var(--faint); font-size: 8.5px; }
.kb-hero__meta b { color: rgba(169, 239, 228, .65); font-weight: 500; }
.kb-hero__actions { display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.kb-hero__switch { padding-right: 12px; margin-right: 3px; border-right: 1px solid var(--line); }

.upload-zone {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 82px; padding: 17px 20px;
  border: 1px dashed rgba(153, 237, 228, .23);
  border-radius: 12px;
  background: rgba(8, 38, 47, .27);
  transition: border-color .2s, background .2s;
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.is-dragover { border-color: rgba(107, 235, 219, .55); background: rgba(13, 54, 59, .4); }
.upload-zone__left { display: flex; align-items: center; gap: 13px; }
.upload-zone__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(97, 226, 202, .08); color: var(--mint); }
.upload-zone__icon svg { width: 18px; height: 18px; }
.upload-zone strong { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--text-soft); }
.upload-zone small { color: var(--faint); font-size: 9.5px; }
.upload-zone__types { display: flex; gap: 5px; }
.upload-zone__types span { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font-family: var(--mono); font-size: 7.5px; }

.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.doc-search { position: relative; display: flex; align-items: center; width: min(260px, 100%); }
.doc-search svg { position: absolute; left: 10px; width: 13px; height: 13px; color: var(--faint); }
.doc-search input { width: 100%; height: 31px; padding: 0 10px 0 30px; border: 1px solid var(--line); border-radius: 7px; background: rgba(3, 20, 27, .35); color: var(--text); outline: 0; font-size: 9.5px; }
.doc-search input:focus { border-color: rgba(97, 226, 202, .35); }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 10px 16px; text-align: left; color: var(--faint); font-size: 8px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(178, 236, 234, .055); color: var(--text-soft); font-size: 11.5px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .16s; }
.data-table tbody tr:hover { background: rgba(206, 249, 244, .02); }
.doc-cell { display: flex; align-items: center; gap: 9px; min-width: 180px; }
.doc-cell__icon { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; border-radius: 6px; background: rgba(122, 182, 255, .07); color: rgba(146, 197, 255, .7); }
.doc-cell__icon svg { width: 13px; height: 13px; }
.doc-cell strong { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; font-weight: 500; color: rgba(231, 249, 246, .8); }
.doc-cell small { display: block; color: var(--faint); font-size: 9px; }
.doc-actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.doc-actions .icon-btn { width: 27px; height: 27px; }
.doc-actions .icon-btn svg { width: 13px; height: 13px; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--faint); }
.table-empty svg { width: 30px; height: 30px; margin: 0 auto 10px; opacity: .4; }
.table-empty strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10.5px; }
.table-empty span { font-size: 9px; }

/* ================================ 设置页 ================================ */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 14px; align-items: start; }
.settings-col { display: grid; gap: 14px; }
.setting-card { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(155deg, rgba(12, 41, 51, .6), rgba(5, 24, 33, .43)); overflow: hidden; }
.setting-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 21px 15px; border-bottom: 1px solid var(--line); }
.setting-card__title { display: flex; align-items: flex-start; gap: 11px; }
.setting-card__icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 9px; background: rgba(97, 226, 202, .08); border: 1px solid rgba(97, 226, 202, .1); color: var(--mint); }
.setting-card__icon svg { width: 16px; height: 16px; }
.setting-card__title h2 { margin: 0 0 3px; font-size: 12px; font-weight: 600; }
.setting-card__title p { margin: 0; color: var(--faint); font-size: 9.5px; line-height: 1.6; }
.setting-card__body { padding: 20px 21px; }
.setting-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 21px; border-top: 1px solid var(--line); }
.setting-card__foot small { color: var(--faint); font-size: 8.5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .field + .field { margin-top: 0; }
.form-grid .field--full { grid-column: 1 / -1; }
.endpoint-preview { display: flex; align-items: center; gap: 6px; padding: 7px 9px; margin-top: 7px; border: 1px solid var(--line); border-radius: 6px; background: rgba(2, 17, 23, .38); color: var(--faint); font-family: var(--mono); font-size: 8px; overflow: hidden; }
.endpoint-preview b { color: rgba(123, 213, 200, .6); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-status { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--faint); font-size: 8.5px; }
.key-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.key-status.is-saved i { background: var(--mint); }
.key-clear { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--faint); font-size: 9px; }
.key-clear input { width: 13px; height: 13px; accent-color: #2bbfa4; }
.range-field { display: grid; gap: 7px; }
.range-field__head { display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); font-size: 10px; }
.range-field__head output { color: var(--mint); font-family: var(--mono); font-size: 10px; }
.range-field input[type="range"] { width: 100%; height: 18px; accent-color: #3ccdb1; }
.range-field small { color: var(--faint); font-size: 8.5px; line-height: 1.6; }
.test-result { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(3, 21, 28, .35); color: var(--muted); font-size: 9px; line-height: 1.6; }
.test-result.is-success { border-color: rgba(97, 226, 202, .2); color: rgba(166, 242, 229, .8); background: rgba(97, 226, 202, .05); }
.test-result.is-error { border-color: rgba(255, 149, 131, .2); color: #ffb6a8; background: rgba(255, 149, 131, .04); }
.prompt-counter { margin-top: 5px; text-align: right; color: var(--faint); font-size: 8px; }
.side-note { padding: 15px 16px; border: 1px solid rgba(122, 182, 255, .12); border-radius: 11px; background: rgba(122, 182, 255, .035); }
.side-note__title { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: rgba(177, 214, 255, .78); font-size: 9.5px; font-weight: 600; }
.side-note__title svg { width: 14px; height: 14px; }
.side-note p { margin: 0; color: rgba(158, 192, 210, .52); font-size: 9.6px; line-height: 1.8; }
.side-note code { font-family: var(--mono); color: rgba(174, 220, 230, .65); font-size: 8.5px; }
.suggestion-inputs { display: grid; gap: 7px; }
.suggestion-input-row { display: flex; gap: 7px; align-items: center; }
.suggestion-input-row .input { height: 34px; font-size: 10px; }

/* ================================ 日志 ================================ */
.logs-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 14px; align-items: start; }
.logs-panel { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(155deg, rgba(11, 39, 49, .58), rgba(5, 24, 33, .42)); overflow: hidden; }
.logs-filters { display: grid; gap: 8px; padding: 13px; border-bottom: 1px solid var(--line); }
.log-search { position: relative; display: flex; align-items: center; }
.log-search svg { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--faint); }
.log-search input { width: 100%; height: 34px; padding: 0 10px 0 31px; border: 1px solid var(--line); border-radius: 7px; background: rgba(3, 20, 27, .35); color: var(--text); font-size: 10px; outline: 0; }
.log-search input:focus { border-color: rgba(97, 226, 202, .35); }
.log-filter-row { display: flex; gap: 6px; }
.log-filter-row .input { height: 31px; padding: 0 8px; font-size: 9px; color-scheme: dark; }
.log-filter-row .btn { min-height: 31px; padding: 0 9px; font-size: 9px; }
.log-count { padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 8.5px; }
.log-count b { color: var(--muted); font-weight: 500; }
.logs-list { max-height: calc(100vh - 292px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(174, 210, 210, .14) transparent; }
.log-item { display: grid; gap: 4px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid rgba(178, 236, 234, .055); background: none; text-align: left; transition: background .16s; }
.log-item:hover { background: rgba(210, 251, 246, .025); }
.log-item.is-active { background: linear-gradient(90deg, rgba(97, 226, 202, .09), rgba(97, 226, 202, .015)); box-shadow: inset 2px 0 0 var(--mint); }
.log-item__top { display: flex; align-items: center; gap: 6px; }
.log-item__visitor { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 8px; font-family: var(--mono); }
.log-item__visitor i { width: 4px; height: 4px; border-radius: 50%; background: rgba(97, 226, 202, .6); }
.log-item__time { margin-left: auto; color: var(--faint); font-size: 7.5px; }
.log-item__title { color: rgba(227, 247, 243, .8); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-item__preview { color: var(--faint); font-size: 9.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-item__foot { display: flex; align-items: center; gap: 7px; color: var(--faint); font-size: 7.5px; }
.log-item__foot b { color: rgba(159, 224, 212, .55); font-weight: 400; }
.logs-pager { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; }
.logs-pager div { display: flex; gap: 4px; }
.logs-pager button { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; background: none; color: var(--muted); font-size: 8px; }
.logs-pager button:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text); }
.logs-pager button:disabled { opacity: .3; cursor: default; }
.log-detail { border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(155deg, rgba(11, 39, 49, .55), rgba(5, 24, 33, .4)); overflow: hidden; min-height: 480px; }
.log-detail__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.log-detail__head h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 19px; font-weight: 600; }
.log-detail__head p { margin: 0; color: var(--faint); font-size: 8.5px; }
.log-detail__actions { display: flex; gap: 4px; }
.log-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.log-meta div { padding: 11px 15px; background: rgba(5, 25, 34, .8); }
.log-meta span { display: block; color: var(--faint); font-size: 7.5px; letter-spacing: .08em; text-transform: uppercase; }
.log-meta strong { display: block; margin-top: 2px; color: var(--text-soft); font-size: 9.5px; font-weight: 500; }
.transcript { padding: 20px; max-height: calc(100vh - 427px); overflow-y: auto; display: grid; gap: 17px; }
.transcript__row { display: flex; gap: 9px; }
.transcript__row--user { flex-direction: row-reverse; }
.transcript__avatar { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: rgba(97, 226, 202, .08); color: rgba(97, 226, 202, .7); }
.transcript__avatar svg { width: 13px; height: 13px; }
.transcript__row--user .transcript__avatar { background: rgba(122, 182, 255, .08); color: rgba(154, 199, 255, .7); }
.transcript__body { max-width: 78%; }
.transcript__name { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--faint); font-size: 8px; }
.transcript__row--user .transcript__name { justify-content: flex-end; }
.transcript__bubble { padding: 10px 13px; border: 1px solid var(--line); border-radius: 3px 11px 11px 11px; background: rgba(221, 253, 248, .045); color: rgba(235, 251, 248, .82); font-size: 10.5px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.transcript__row--user .transcript__bubble { border-radius: 11px 3px 11px 11px; background: rgba(82, 158, 196, .1); border-color: rgba(122, 182, 255, .12); }
.transcript__refs { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.transcript__refs span { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--faint); font-size: 7.5px; }
.transcript__meta { margin-top: 4px; color: var(--faint); font-size: 7.5px; }
.log-detail__empty { display: grid; place-items: center; min-height: 480px; text-align: center; color: var(--faint); }
.log-detail__empty svg { width: 34px; height: 34px; margin: 0 auto 12px; opacity: .4; }
.log-detail__empty strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.log-detail__empty span { font-size: 9px; }

/* ================================ 弹窗 ================================ */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1, 10, 15, .72); backdrop-filter: blur(6px); animation: fade-in .25s ease; }
.modal {
  position: relative;
  width: min(540px, 100%);
  max-height: min(88vh, 860px);
  display: flex; flex-direction: column;
  border: 1px solid rgba(174, 236, 232, .16);
  border-radius: 16px;
  background: linear-gradient(160deg, #0b2a35, #071e28);
  box-shadow: 0 40px 100px rgba(0, 4, 8, .6);
  animation: modal-in .35s var(--ease);
  overflow: hidden;
}
.modal--lg { width: min(790px, 100%); }
.modal--sm { width: min(400px, 100%); }
.modal__head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); }
.modal__eyebrow { display: block; margin-bottom: 4px; color: var(--faint); font-size: 7.5px; font-weight: 700; letter-spacing: .2em; }
.modal__head h2 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.modal__head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.modal__close { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: none; color: var(--muted); }
.modal__close:hover { color: var(--text); background: rgba(216, 251, 246, .05); }
.modal__close svg { width: 14px; height: 14px; }
.modal__body { flex: 1 1 auto; min-height: 0; max-height: calc(88vh - 180px); padding: 20px 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(174, 210, 210, .15) transparent; }
.modal__foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(3, 18, 25, .3); }
.modal__foot .modal__foot-left { margin-right: auto; color: var(--faint); font-size: 8.5px; }
.form-grid--modal { gap: 16px; }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { position: relative; width: 26px; height: 26px; border: 2px solid transparent; border-radius: 50%; background: none; padding: 2px; }
.color-swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.color-swatch.is-active { border-color: rgba(235, 255, 251, .7); }
.modal-note { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(3, 20, 27, .3); color: var(--faint); font-size: 8.5px; line-height: 1.7; }
.segmented { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(3, 19, 26, .4); }
.segmented button { flex: 1; height: 29px; border: 0; border-radius: 5px; background: none; color: var(--faint); font-size: 9px; }
.segmented button.is-active { background: rgba(97, 226, 202, .1); color: var(--mint); }
.upload-progress { margin-top: 14px; display: none; }
.upload-progress.is-visible {
  display: block;
  position: absolute; left: 20px; right: 20px; bottom: 9px;
  margin-top: 0;
}
.upload-progress__head { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.upload-progress__bar { height: 4px; border-radius: 99px; background: rgba(174, 210, 210, .1); overflow: hidden; }
.upload-progress__bar i { display: block; width: 0%; height: 100%; border-radius: inherit; background: var(--mint); transition: width .2s; }
.file-picker { display: none; }

.chunk-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.chunk-doc-head__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chunk-doc-head h3 { margin: 0; font-size: 11px; font-weight: 600; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chunk-doc-head p { margin: 2px 0 0; color: var(--faint); font-size: 8px; }
.chunk-doc-head__actions { display: flex; gap: 5px; flex: 0 0 auto; }
.chunk-list { display: grid; gap: 9px; }
.chunk-item { border: 1px solid var(--line); border-radius: 9px; background: rgba(3, 20, 27, .27); overflow: hidden; }
.chunk-item__head { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-bottom: 1px solid rgba(178, 236, 234, .06); color: var(--faint); font-size: 8px; }
.chunk-item__index { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 5px; background: rgba(97, 226, 202, .08); color: var(--mint); font-family: var(--mono); font-size: 8px; }
.chunk-item__actions { display: flex; gap: 2px; margin-left: auto; }
.chunk-item__actions .icon-btn { width: 24px; height: 24px; }
.chunk-item__actions .icon-btn svg { width: 12px; height: 12px; }
.chunk-item__body { padding: 9px 11px; }
.chunk-item textarea { width: 100%; min-height: 75px; padding: 8px 9px; border: 1px solid transparent; border-radius: 6px; background: rgba(2, 16, 22, .38); color: var(--text-soft); font-size: 9.5px; line-height: 1.8; resize: vertical; outline: 0; }
.chunk-item textarea:focus { border-color: rgba(97, 226, 202, .3); background: rgba(2, 18, 24, .55); }
.chunk-item__foot { display: flex; justify-content: flex-end; gap: 5px; margin-top: 6px; }
.chunk-add { display: none; margin-top: 11px; padding: 11px; border: 1px dashed var(--line-strong); border-radius: 9px; }
.chunk-add.is-visible { display: block; }
.chunk-add textarea { margin-bottom: 7px; }
.chunk-empty { padding: 30px; text-align: center; color: var(--faint); font-size: 9px; }

/* ================================ 全局反馈 ================================ */
.global-loader {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(2, 13, 19, .64);
  backdrop-filter: blur(4px);
  color: var(--text-soft); font-size: 10px; letter-spacing: .04em;
}
.toast {
  position: fixed; right: 26px; bottom: 26px; z-index: 210;
  display: flex; align-items: center; gap: 9px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 15px;
  border: 1px solid rgba(174, 236, 232, .16);
  border-radius: 9px;
  background: #0b2a34;
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px);
  pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: none; }
.toast > span { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px rgba(97, 226, 202, .5); }
.toast p { margin: 0; color: var(--text-soft); font-size: 10.5px; line-height: 1.5; }
.toast.is-error > span { background: var(--danger); box-shadow: 0 0 8px rgba(255, 149, 131, .4); }
.loading-block { display: grid; place-items: center; min-height: 280px; gap: 10px; color: var(--faint); font-size: 10px; }
.empty-state { display: grid; place-items: center; padding: 55px 20px; text-align: center; color: var(--faint); }
.empty-state svg { width: 36px; height: 36px; margin-bottom: 12px; opacity: .38; }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.empty-state span { font-size: 9px; line-height: 1.7; }
.skeleton { position: relative; overflow: hidden; background: rgba(174, 210, 210, .06); border-radius: 6px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(220, 251, 247, .05), transparent); animation: shimmer 1.4s infinite; }

/* ================================ 动画 ================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes slow-zoom { from { transform: scale(1.03); } to { transform: scale(1.1); } }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ================================ 响应式 ================================ */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .bottom-grid, .settings-grid { grid-template-columns: 1fr; }
  .logs-layout { grid-template-columns: 310px minmax(0, 1fr); }
  .welcome-card__drop { display: none; }
}
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 252px;
    transform: translateX(-100%);
    transition: transform .35s var(--ease);
    z-index: 80;
    box-shadow: 25px 0 60px rgba(0, 6, 10, .35);
  }
  .sidebar.is-open { transform: none; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(1, 10, 15, .6); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .mobile-menu { display: grid; }
  .knowledge-layout { grid-template-columns: 225px minmax(0, 1fr); }
  .logs-layout { grid-template-columns: 1fr; }
  .logs-list { max-height: 330px; }
  .log-detail__empty { min-height: 280px; }
  .transcript { max-height: 480px; }
}
@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-scene { display: none; }
  .login-panel { min-height: 100vh; padding: 118px 24px 80px; }
  .login-mobile-brand {
    display: flex; align-items: center; gap: 11px;
    position: absolute; top: 26px; left: 24px;
    color: #0b3540;
  }
  .login-mobile-brand .login-brand__mark {
    width: 40px; height: 40px;
    border-color: rgba(14, 79, 74, .14);
    background: rgba(255, 255, 255, .6);
  }
  .login-mobile-brand .login-brand__mark svg { width: 26px; height: 26px; }
  .login-mobile-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
  .login-mobile-brand strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: .06em; }
  .login-mobile-brand small { color: #7a9994; font-size: 8px; letter-spacing: .17em; }
  .login-footer { left: 24px; right: 24px; }
  .workspace-top { flex-basis: 70px; padding: 0 16px; }
  .workspace-top h1 { font-size: 18px; }
  .workspace-top__actions { gap: 5px; }
  .api-pill { display: none; }
  .workspace-top__actions .btn--ghost { display: none; }
  .account-chip > span:not(.avatar), .account-chip > svg { display: none; }
  .content { padding: 20px 16px 32px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-head__title { font-size: 22px; }
  .welcome-card { padding: 22px; min-height: 130px; }
  .welcome-card h2 { font-size: 24px; }
  .welcome-card__side { display: none; }
  .stat-grid { gap: 9px; }
  .stat-card { padding: 14px; }
  .stat-card__value strong { font-size: 24px; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .kb-rail { position: static; }
  .kb-list { display: flex; overflow-x: auto; padding: 7px; }
  .kb-item { flex: 0 0 185px; }
  .kb-rail__foot { display: none; }
  .kb-hero { flex-direction: column; padding: 18px; }
  .kb-hero__actions { width: 100%; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 11px; }
  .upload-zone { align-items: flex-start; flex-direction: column; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field--full { grid-column: auto; }
  .doc-toolbar { flex-direction: column; align-items: stretch; }
  .doc-search { width: 100%; }
  .data-table th:nth-child(2), .data-table td:nth-child(2), .data-table th:nth-child(4), .data-table td:nth-child(4) { display: none; }
  .doc-cell strong { max-width: 180px; }
  .logs-layout { gap: 10px; }
  .log-meta { grid-template-columns: 1fr 1fr; }
  .log-detail__head { flex-direction: column; }
  .transcript__body { max-width: 86%; }
  .modal-root { padding: 12px; }
  .modal { max-height: 92vh; }
  .modal__body { padding: 16px; }
  .modal__head, .modal__foot { padding-left: 16px; padding-right: 16px; }
  .setting-card__body, .setting-card__head { padding-left: 16px; padding-right: 16px; }
  .setting-card__foot { padding-left: 16px; padding-right: 16px; }
  .toast { right: 14px; bottom: 14px; }
}
@media (max-width: 430px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card__label { font-size: 8px; }
  .welcome-card { padding: 18px; }
  .welcome-card h2 { font-size: 21px; }
  .welcome-card p { font-size: 10px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .kb-item { flex-basis: 160px; }
  .log-filter-row { flex-wrap: wrap; }
  .log-filter-row .input { flex: 1; min-width: 105px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


/* ==========================================================================
   阳光运动风主题（后台，仅视觉覆盖）
   ========================================================================== */
:root {
  --bg: #f5efe5;
  --bg-deep: #fffaf2;
  --sidebar: #fffdf8;
  --panel: #fffdf9;
  --panel-2: #fff8ee;
  --panel-soft: rgba(255, 250, 242, .9);
  --line: rgba(31, 78, 90, .1);
  --line-strong: rgba(31, 78, 90, .18);
  --text: #14384a;
  --text-soft: rgba(20, 56, 74, .78);
  --muted: rgba(39, 77, 88, .57);
  --faint: rgba(39, 77, 88, .38);
  --mint: #15ad91;
  --mint-deep: #0b876f;
  --mint-wash: rgba(21, 173, 145, .09);
  --blue: #2f80ed;
  --amber: #efa23b;
  --danger: #df5f48;
  --cream: #fffdf8;
  --cream-2: #f9f2e8;
  --ink: #163849;
  --sans: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 20px 50px rgba(40, 62, 54, .12);
}
body { background: #f5efe5; color: var(--text); }
::selection { background: rgba(255, 138, 76, .24); }

/* 登录页 */
.login-view { background: #f5efe5; }
.login-scene__image {
  filter: saturate(1.02) brightness(1.02) contrast(1.01);
  background-position: 58% center;
}
.login-scene__veil {
  background:
    linear-gradient(90deg, rgba(255, 250, 240, .92) 0%, rgba(255, 250, 240, .7) 46%, rgba(255, 250, 240, .34) 100%),
    linear-gradient(180deg, rgba(255, 252, 243, .5), transparent 35%, rgba(255, 250, 240, .68));
}
.login-scene__rings i { border-color: rgba(214, 106, 50, .16); }
.login-scene__rings i:nth-child(2) { border-color: rgba(25, 133, 115, .12); }
.login-scene__rings i:nth-child(3) { border-color: rgba(214, 106, 50, .08); }
.login-brand { color: #14384a; }
.login-brand__mark {
  border-color: rgba(215, 102, 46, .2);
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 8px 20px rgba(115, 78, 41, .08);
}
.login-brand strong { font-weight: 800; }
.login-brand small { color: #9b6a4e; }
.login-quote__eyebrow { color: #ce6f39; }
.login-quote h1 { color: #103447; text-shadow: 0 2px 24px rgba(255,255,255,.5); font-weight: 800; }
.login-quote p { color: rgba(35, 72, 82, .65); }
.login-meta { color: rgba(38, 80, 87, .48); }
.login-meta i { background: #2dbd98; box-shadow: 0 0 8px rgba(45,189,152,.45); }
.login-panel {
  background:
    radial-gradient(ellipse at 100% 0%, rgba(255, 225, 176, .55), transparent 48%),
    linear-gradient(160deg, #fffdf8, #f8f0e4);
}
.login-panel::before { background: linear-gradient(transparent, rgba(29, 84, 84, .12), transparent); }
.login-panel .btn--primary { background: linear-gradient(145deg, #ff9a4e, #ef6733); box-shadow: 0 12px 26px rgba(225, 98, 45, .2); }
.login-panel .btn--primary:hover { background: linear-gradient(145deg, #ffa861, #f47642); }
.login-card__kicker { color: #c3764b; }
.login-card h2 { color: #11364a; font-weight: 800; }
.login-hint { background: rgba(255,255,255,.45); border-color: rgba(55, 91, 90, .12); color: #6f8889; }
.login-hint svg { color: #d57a43; }
.login-footer { color: #8b9b9d; }

/* 后台骨架 */
.admin-shell {
  background:
    radial-gradient(ellipse at 82% -8%, rgba(255, 198, 107, .22), transparent 42%),
    radial-gradient(ellipse at 8% 110%, rgba(112, 184, 133, .12), transparent 48%),
    #f5efe5;
}
.sidebar {
  border-right: 1px solid rgba(40, 86, 93, .12);
  background: linear-gradient(180deg, #fffdf9, #fbf4e9);
}
.sidebar-brand { color: var(--text); }
.sidebar-brand__mark {
  border-color: rgba(214, 105, 52, .17);
  background: #fffdf9;
  box-shadow: 0 5px 16px rgba(115, 79, 47, .07);
}
.sidebar-brand__text strong { font-weight: 800; }
.sidebar-brand__text small { color: #a17e67; }
.sidebar-label { color: rgba(63, 100, 103, .43); }
.nav-item { color: #586f75; }
.nav-item svg { color: #7c9294; }
.nav-item:hover { color: #163a4b; background: #fff6eb; }
.nav-item.is-active {
  color: #b95725;
  border-color: rgba(241, 125, 64, .17);
  background: linear-gradient(90deg, #fff0e1, #fff9f2);
}
.nav-item.is-active::before { background: #ef7639; box-shadow: 0 0 12px rgba(239, 118, 57, .28); }
.nav-item.is-active svg { color: #ed7336; }
.nav-badge { background: #f5ebde; color: #7a8b8d; }
.nav-status.is-online { background: #20b98b; box-shadow: 0 0 7px rgba(32,185,139,.5); }
.system-card { border-color: rgba(39, 85, 92, .1); background: #fffaf2; }
.system-card__top { color: #8a9a9b; }
.system-card strong { color: #3a5d66; }
.system-card small { color: #9aacab; }
.sidebar-user { border-top-color: rgba(39, 85, 92, .1); }
.sidebar-user__info strong { color: #214656; }
.sidebar-user__info small { color: #94a6a6; }
.workspace-top {
  border-bottom-color: rgba(38, 83, 92, .1);
  background: rgba(255, 252, 245, .76);
  box-shadow: 0 4px 24px rgba(46, 78, 69, .04);
}
.breadcrumb { color: #97a8a7; }
.workspace-top h1 { color: #14384a; font-weight: 800; }
.api-pill { border-color: rgba(39, 84, 93, .12); background: rgba(255,255,255,.56); color: #7d9295; }
.api-pill.is-online { color: #268a70; }
.account-chip { border-color: rgba(38, 82, 91, .12); background: #fffdf8; color: #365766; }
.account-chip:hover { background: #fff6ea; }
.account-menu { border-color: rgba(39, 84, 92, .14); background: #fffdf8; box-shadow: var(--shadow); }
.account-menu button { color: #4c6871; }
.account-menu button:hover { background: #fff2e4; color: #163a4b; }
.account-menu button svg { color: #8b9d9d; }
.content { scrollbar-color: rgba(52, 91, 93, .18) transparent; }
.content::-webkit-scrollbar-thumb { background: rgba(52, 91, 93, .16); }
.mobile-menu { color: #4d6a73; }

/* 通用文字、按钮、表单 */
.page-head__title { color: #14384a; font-weight: 800; }
.page-head__desc { color: #70878b; }
.section-label { color: #91a3a3; }
.section-label::after { background: rgba(43, 83, 92, .11); }
.btn { border-color: rgba(39, 84, 92, .14); background: #fffdf8; color: #4a6770; }
.btn:hover { color: #12384a; border-color: rgba(239, 118, 57, .3); background: #fff6ea; }
.btn--primary { border-color: transparent; background: linear-gradient(145deg, #ff9b4f, #ef6733); color: #fff; box-shadow: 0 8px 22px rgba(223, 93, 40, .2); }
.btn--primary:hover { background: linear-gradient(145deg, #ffa962, #f47743); color: #fff; border-color: transparent; }
.btn--soft { background: #e9f7f1; border-color: rgba(27, 160, 132, .16); color: #168a70; }
.btn--soft:hover { background: #dcf4eb; color: #0d755f; }
.btn--danger { color: #b34c38; border-color: rgba(212, 83, 56, .18); background: #fff2ee; }
.btn--danger:hover { color: #913522; background: #ffe8e1; border-color: rgba(212,83,56,.3); }
.btn--ghost { background: transparent; }
.icon-btn { color: #819596; }
.icon-btn:hover { background: #fff2e4; color: #c35925; }
.icon-btn--danger:hover { color: #cd5841; background: #ffefeb; }
.field__label { color: #4b686f; }
.field__label small { color: #9badae; }
.field__control { border-color: rgba(37, 82, 91, .13); background: #fffdf9; }
.field__control:focus-within { border-color: rgba(239, 118, 57, .48); background: #fff; box-shadow: 0 0 0 3px rgba(239, 118, 57, .08); }
.field__control input { color: #173c4c; }
.field__control input::placeholder, textarea::placeholder { color: #a9b8b8; }
.field__icon { color: #8fa1a2; }
.field__reveal { color: #8fa1a2; }
.field__hint { color: #95a6a5; }
.field__hint code { color: #c77948; background: #fff4e8; padding: 1px 3px; border-radius: 3px; }
.input, .textarea, .select { border-color: rgba(37, 82, 91, .13); background: #fffdf9; color: #173c4c; }
.input:focus, .textarea:focus, .select:focus { border-color: rgba(239, 118, 57, .46); background: #fff; box-shadow: 0 0 0 3px rgba(239,118,57,.08); }
.select { 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='%237b9396' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.switch__track { background: #e0d8cb; }
.switch__track::after { background: #fff; box-shadow: 0 1px 4px rgba(39,65,62,.16); }
.switch input:checked + .switch__track { background: rgba(24, 174, 139, .55); }
.switch__label { color: #5b757b; }
.badge { border-color: rgba(37, 81, 90, .12); background: rgba(255,255,255,.4); color: #74898c; }
.badge--mint { color: #178a72; border-color: rgba(23, 138, 114, .18); background: #eaf7f2; }
.badge--amber { color: #a96e22; border-color: rgba(201, 147, 67, .2); background: #fff6e8; }
.badge--blue { color: #2f78c9; border-color: rgba(47, 120, 201, .16); background: #eef6ff; }
.badge--danger { color: #ad4a36; border-color: rgba(207, 83, 56, .16); background: #fff1ec; }
.avatar { background: linear-gradient(145deg, #ffe4c9, #ffc696); border-color: rgba(226, 117, 55, .28); color: #b64e1c; }

/* 数据概览 */
.welcome-card {
  border-color: rgba(225, 147, 73, .2);
  background:
    radial-gradient(ellipse at 88% 10%, rgba(255, 224, 145, .55), transparent 45%),
    linear-gradient(118deg, #fffaf0 0%, #fff2db 54%, #e7f6e8 100%);
  box-shadow: 0 16px 38px rgba(119, 86, 44, .09);
}
.welcome-card::before { border-color: rgba(225, 148, 78, .16); box-shadow: 0 0 0 34px rgba(225, 148, 78, .04), 0 0 0 68px rgba(225, 148, 78, .025); }
.welcome-card__eyebrow { color: #b4743e; }
.welcome-card__eyebrow i { background: #f08a47; box-shadow: 0 0 8px rgba(240,138,71,.35); }
.welcome-card h2 { color: #15384a; }
.welcome-card h2 em { color: #dd6e32; }
.welcome-card p { color: #607d82; }
.welcome-card p b { color: #c65c24; }
.welcome-stat strong { color: #1e4656; }
.welcome-stat span { color: #8b9e9d; }
.welcome-card__drop { display: none; }
.stat-card { border-color: rgba(39, 83, 92, .1); background: #fffdf9; box-shadow: 0 8px 22px rgba(53, 77, 67, .05); }
.stat-card::after { background: radial-gradient(circle, rgba(255, 168, 92, .1), transparent 70%); }
.stat-card__label { color: #7d9194; }
.stat-card__value strong { color: #163b4b; }
.stat-card__value span { color: #9aabaa; }
.stat-card__foot { color: #8b9e9e; }
.stat-card__foot b { color: #c65d24; }
.stat-card__icon { background: #fff4e7; border-color: rgba(231, 131, 64, .12); color: #e97337; }
.stat-card__icon--blue { color: #367ed1; background: #eef6ff; border-color: rgba(54,126,209,.12); }
.stat-card__icon--amber { color: #b47b26; background: #fff8e8; border-color: rgba(180,123,38,.12); }
.panel { border-color: rgba(37, 82, 91, .1); background: #fffdf9; box-shadow: 0 10px 28px rgba(50, 76, 66, .045); }
.panel__head { border-bottom-color: rgba(37, 82, 91, .09); }
.panel__title { color: #1b3f4e; }
.panel__title svg { color: #ec7538; opacity: .95; }
.panel__sub { color: #94a5a5; }
.panel__foot { border-top-color: rgba(37, 82, 91, .09); }
.chart-legend { color: #829697; }
.chart-legend i { background: #f07a3c; }
.chart-legend i.blue { background: #5c9ee8; }
.chart-grid-line { stroke: rgba(45, 84, 91, .12); }
.chart-axis-label { fill: #8fa2a3; }
.chart-line { stroke: #f07a3c; filter: drop-shadow(0 3px 6px rgba(240,122,60,.18)); }
.chart-dot { fill: #fffdf9; stroke: #f07a3c; }
.chart-bar { fill: rgba(47, 128, 237, .22); }
.chart-bar.is-today { fill: rgba(47, 128, 237, .5); }
.api-overview__status { border-color: rgba(36, 82, 91, .1); background: #fffaf2; }
.api-overview__status > i { background: #e6a94a; box-shadow: 0 0 0 4px rgba(230,169,74,.09); }
.api-overview__status.is-online > i { background: #22b58d; box-shadow: 0 0 0 4px rgba(34,181,141,.09), 0 0 8px rgba(34,181,141,.35); }
.api-overview__status strong { color: #294d5a; }
.api-overview__status small { color: #97a8a7; }
.api-overview__row { color: #849798; }
.api-overview__row b { color: #47666d; }
.recent-item { border-bottom-color: rgba(36, 82, 91, .07); }
.recent-item:hover { background: #fff8ef; }
.recent-item__icon { background: #fff2e4; color: #db7038; }
.recent-item__title { color: #2e5260; }
.recent-item__meta { color: #93a5a4; }
.recent-item__time { color: #9aa9a8; }
.kb-mini__head { color: #48666c; }
.kb-mini__count { color: #97a7a5; }
.kb-mini__bar { background: rgba(41, 83, 90, .1); }
.kb-mini__bar i { opacity: .85; }

/* 知识库 */
.kb-rail { border-color: rgba(37, 82, 91, .1); background: #fffdf9; box-shadow: 0 10px 26px rgba(49, 74, 64, .04); }
.kb-rail__head { border-bottom-color: rgba(37, 82, 91, .09); }
.kb-rail__head h2 { color: #214554; }
.kb-rail__head span { color: #93a5a4; }
.kb-rail__add { border-color: rgba(37,82,91,.12); background: #fff3e7; color: #d66c31; }
.kb-rail__add:hover { background: #ffe9d6; }
.kb-item:hover { background: #fff8ef; }
.kb-item.is-active { background: linear-gradient(105deg, #fff0df, #fffaf3); border-color: rgba(236, 119, 56, .18); }
.kb-item__name { color: #4c696f; }
.kb-item.is-active .kb-item__name { color: #b75522; }
.kb-item__meta { color: #95a6a4; }
.kb-item__off { color: #a0aeac; }
.kb-rail__foot { border-top-color: rgba(37, 82, 91, .08); color: #9aaaa8; }
.kb-rail__empty { color: #9dadaa; }
.kb-hero {
  border-color: rgba(37, 82, 91, .1);
  background:
    radial-gradient(ellipse at 90% 8%, rgba(255, 224, 151, .3), transparent 45%),
    linear-gradient(130deg, #fffdf8, #fff7eb);
  box-shadow: 0 10px 26px rgba(50, 75, 64, .04);
}
.kb-hero::after { background: radial-gradient(circle, rgba(255, 176, 98, .1), transparent 68%); }
.kb-hero__icon { background: #fff2e3; border-color: rgba(228, 124, 61, .14); color: #de6a30; }
.kb-hero h2 { color: #153a4a; }
.kb-hero p { color: #6b8387; }
.kb-hero__meta { color: #8a9e9e; }
.kb-hero__meta b { color: #ba5f2c; }
.kb-hero__switch { border-right-color: rgba(37,82,91,.1); }
.upload-zone { border-color: rgba(219, 139, 77, .3); background: #fffbf4; }
.upload-zone:hover, .upload-zone.is-dragover { border-color: rgba(238, 116, 53, .6); background: #fff5e9; }
.upload-zone__icon { background: #fff1e2; color: #dc6a32; }
.upload-zone strong { color: #355866; }
.upload-zone small { color: #94a4a2; }
.upload-zone__types span { border-color: rgba(37, 82, 91, .12); color: #8c9d9d; }
.upload-progress__head { color: #6d8589; }
.upload-progress__bar { background: rgba(40, 80, 88, .1); }
.upload-progress__bar i { background: #f07a3c; }
.doc-toolbar { border-bottom-color: rgba(37,82,91,.09); }
.doc-search input { border-color: rgba(37,82,91,.12); background: #fffdf9; color: #234654; }
.doc-search input:focus { border-color: rgba(237,118,57,.4); }
.doc-search svg { color: #92a4a3; }
.data-table th { color: #8d9f9f; border-bottom-color: rgba(37,82,91,.09); }
.data-table td { color: #46636b; border-bottom-color: rgba(37,82,91,.06); }
.data-table tbody tr:hover { background: #fff9f1; }
.doc-cell__icon { background: #eef6ff; color: #5b93cd; }
.doc-cell strong { color: #2d5260; }
.doc-cell small { color: #96a6a4; }
.table-empty { color: #99aaa8; }
.table-empty strong { color: #738a8c; }

/* 设置 */
.setting-card { border-color: rgba(37, 82, 91, .1); background: #fffdf9; box-shadow: 0 10px 26px rgba(50, 75, 64, .04); }
.setting-card__head { border-bottom-color: rgba(37,82,91,.09); }
.setting-card__title h2 { color: #1b3f4e; }
.setting-card__title p { color: #93a4a3; }
.setting-card__icon { background: #fff2e3; border-color: rgba(232, 125, 60, .12); color: #dd6a30; }
.setting-card__foot { border-top-color: rgba(37,82,91,.09); background: #fffaf2; }
.setting-card__foot small { color: #97a6a4; }
.endpoint-preview { border-color: rgba(37,82,91,.1); background: #fff9f0; color: #93a29f; }
.endpoint-preview b { color: #a96b45; }
.key-status { color: #93a3a1; }
.key-status.is-saved i { background: #1caf8b; }
.key-clear { color: #859998; }
.key-clear input { accent-color: #ef7a3d; }
.range-field__head { color: #45646b; }
.range-field__head output { color: #ce6029; }
.range-field input[type="range"] { accent-color: #ef7a3d; }
.range-field small { color: #94a4a2; }
.test-result { border-color: rgba(37,82,91,.11); background: #fffaf2; color: #74898a; }
.test-result.is-success { border-color: rgba(28, 166, 136, .2); background: #edf9f4; color: #287c68; }
.test-result.is-error { border-color: rgba(208, 86, 59, .17); background: #fff3ef; color: #a14937; }
.prompt-counter { color: #99a8a6; }
.side-note { border-color: rgba(60, 136, 196, .14); background: #f0f8ff; }
.side-note__title { color: #3b78ad; }
.side-note p { color: #66808f; }
.side-note code { color: #4e7895; background: rgba(255,255,255,.5); border-radius: 3px; padding: 1px 3px; }
.suggestion-input-row .icon-btn { color: #a2b0ae; }

/* 日志 */
.logs-panel { border-color: rgba(37,82,91,.1); background: #fffdf9; box-shadow: 0 10px 26px rgba(50,75,64,.04); }
.logs-filters { border-bottom-color: rgba(37,82,91,.09); }
.log-search input { border-color: rgba(37,82,91,.12); background: #fffdf9; color: #234654; }
.log-search input:focus { border-color: rgba(237,118,57,.4); }
.log-search svg { color: #93a4a3; }
.log-count { border-bottom-color: rgba(37,82,91,.08); color: #95a5a3; }
.log-count b { color: #4d686e; }
.logs-list { scrollbar-color: rgba(45, 83, 90, .16) transparent; }
.log-item { border-bottom-color: rgba(37,82,91,.06); }
.log-item:hover { background: #fff8ef; }
.log-item.is-active { background: linear-gradient(90deg, #fff0e1, #fffaf4); box-shadow: inset 2px 0 0 #f07a3c; }
.log-item__visitor { color: #96a6a4; }
.log-item__visitor i { background: #ef7a3d; }
.log-item__time { color: #9eadaa; }
.log-item__title { color: #2f5260; }
.log-item__preview { color: #91a3a1; }
.log-item__foot { color: #96a7a5; }
.log-item__foot b { color: #b8663a; }
.logs-pager { border-top-color: rgba(37,82,91,.09); color: #96a6a4; }
.logs-pager button { border-color: rgba(37,82,91,.12); color: #607b80; }
.logs-pager button:hover:not(:disabled) { border-color: rgba(237,118,57,.35); color: #c15823; }
.log-detail { border-color: rgba(37,82,91,.1); background: #fffdf9; box-shadow: 0 10px 26px rgba(50,75,64,.04); }
.log-detail__head { border-bottom-color: rgba(37,82,91,.09); }
.log-detail__head h2 { color: #153a4a; }
.log-detail__head p { color: #91a3a2; }
.log-meta { border-bottom-color: rgba(37,82,91,.09); background: rgba(37,82,91,.08); }
.log-meta div { background: #fffdf9; }
.log-meta span { color: #97a7a4; }
.log-meta strong { color: #3d5d66; }
.transcript__avatar { background: #fff2e4; color: #d86c34; }
.transcript__row--user .transcript__avatar { background: #eef6ff; color: #4b85c4; }
.transcript__name { color: #94a5a3; }
.transcript__bubble { border-color: rgba(37,82,91,.1); background: #fffaf3; color: #2f515d; }
.transcript__row--user .transcript__bubble { border-color: rgba(255, 137, 74, .16); background: #fff1e5; color: #6b412b; }
.transcript__refs span { border-color: rgba(37,82,91,.1); color: #93a3a1; }
.transcript__meta { color: #99a8a6; }
.log-detail__empty { color: #96a7a4; }
.log-detail__empty strong { color: #6f888b; }

/* 弹窗、空态、反馈 */
.modal { border-color: rgba(37,82,91,.12); background: linear-gradient(160deg, #fffdf9, #fff7ec); box-shadow: 0 32px 80px rgba(33, 54, 48, .24); }
.modal__head { border-bottom-color: rgba(37,82,91,.09); }
.modal__eyebrow { color: #c17a50; }
.modal__head h2 { color: #14384a; }
.modal__head p { color: #7d9192; }
.modal__close { border-color: rgba(37,82,91,.12); color: #8a9d9c; }
.modal__close:hover { color: #b95725; background: #fff1e4; }
.modal__body { scrollbar-color: rgba(45,83,90,.15) transparent; }
.modal__foot { border-top-color: rgba(37,82,91,.09); background: #fffaf2; }
.modal__foot-left { color: #93a3a1; }
.color-swatch.is-active { border-color: #d36a35; }
.modal-note { border-color: rgba(37,82,91,.1); background: #fffaf3; color: #859896; }
.segmented { border-color: rgba(37,82,91,.12); background: #fff9f1; }
.segmented button { color: #8b9d9b; }
.segmented button.is-active { background: #fff0e2; color: #c15a26; }
.chunk-doc-head { border-bottom-color: rgba(37,82,91,.09); }
.chunk-doc-head h3 { color: #2b505d; }
.chunk-doc-head p { color: #94a5a2; }
.chunk-item { border-color: rgba(37,82,91,.1); background: #fffdf9; }
.chunk-item__head { border-bottom-color: rgba(37,82,91,.06); color: #92a3a0; }
.chunk-item__index { background: #fff0e2; color: #c45d28; }
.chunk-item textarea { background: #fffaf2; color: #3e5e68; }
.chunk-item textarea:focus { border-color: rgba(237,118,57,.3); background: #fff; }
.chunk-add { border-color: rgba(37,82,91,.15); }
.chunk-empty { color: #98a7a4; }
.empty-state { color: #93a4a2; }
.empty-state strong { color: #70888a; }
.loading-block { color: #91a3a2; }
.global-loader { background: rgba(255, 250, 242, .62); color: #45656d; }
.toast { border-color: rgba(38,82,91,.14); background: #fffdf8; box-shadow: var(--shadow); }
.toast p { color: #385961; }
.toast > span { background: #20b98b; box-shadow: 0 0 8px rgba(32,185,139,.4); }
.toast.is-error > span { background: #df5f48; }
.skeleton { background: rgba(39,82,91,.07); }
.skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); }
.account-menu { background: #fffdf8; }

@media (max-width: 980px) {
  .sidebar { box-shadow: 20px 0 50px rgba(38, 61, 52, .16); }
}


/* 登录表单的橙色聚焦态 */
.login-panel .field__control:focus-within {
  border-color: rgba(239, 118, 57, .55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(239, 118, 57, .1);
}
.login-panel .field__reveal { color: #9b7b64; }

.log-filter-row .input { color-scheme: light; }
