/* ==========================================================================
   豚生科研系统 · 基础设计系统
   ========================================================================== */

:root {
  --ink: #14211d;
  --ink-2: #23342e;
  --muted: #62716b;
  --faint: #8b978f;
  --line: #e3e7e0;
  --line-strong: #d4dbd2;
  --bg: #f3f4ee;
  --bg-deep: #eceee6;
  --surface: #ffffff;
  --surface-2: #f8f9f5;
  --surface-3: #f1f3ec;
  --primary: #176b52;
  --primary-deep: #0f5541;
  --primary-ink: #0d2b23;
  --primary-soft: #e8f2ec;
  --primary-faint: #f2f8f4;
  --lime: #c8e96b;
  --lime-deep: #a9d13f;
  --amber: #b97722;
  --amber-soft: #fbf1e1;
  --red: #b94d43;
  --red-soft: #fbeae7;
  --blue: #366b9e;
  --blue-soft: #eaf1f8;
  --violet: #6c55a3;
  --violet-soft: #f0ecf9;
  --teal: #1c7b7b;
  --teal-soft: #e7f4f3;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(20, 33, 29, .05);
  --shadow-sm: 0 1px 2px rgba(20, 33, 29, .04), 0 8px 24px rgba(20, 33, 29, .045);
  --shadow-md: 0 2px 6px rgba(20, 33, 29, .06), 0 18px 44px rgba(20, 33, 29, .08);
  --shadow-lg: 0 24px 70px rgba(9, 30, 24, .18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .8, .32, 1);
  --sidebar-w: 252px;
  --topbar-h: 66px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open, body.drawer-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
::selection { background: #d8eda2; color: var(--primary-ink); }
:focus-visible { outline: 2px solid rgba(23, 107, 82, .45); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cdd5ca; border: 3px solid transparent; background-clip: content-box; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #b7c2b5; border: 3px solid transparent; background-clip: content-box; }

h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------------------------------------------------------------- boot */
.boot-screen {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 540px at 72% 18%, rgba(31, 138, 112, .32), transparent 62%),
    radial-gradient(760px 480px at 18% 88%, rgba(200, 233, 107, .10), transparent 60%),
    radial-gradient(1000px 600px at 50% 38%, #16453a 0%, #0d2b23 58%, #081d17 100%);
  color: #eaf2e7; gap: 10px;
}
.boot-screen::after {
  content: ""; position: fixed; left: -10%; right: -10%; bottom: -34px; height: 150px; pointer-events: none;
  background: radial-gradient(58% 100% at 50% 100%, rgba(200,233,107,.09), transparent 70%);
}
.boot-mark {
  width: 64px; height: 64px; border-radius: 17px; overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,.38), 0 0 0 1px rgba(200,233,107,.18), 0 0 44px rgba(200,233,107,.14);
  animation: bootPulse 1.5s var(--ease) infinite;
}
.boot-word { font-size: 19px; font-weight: 680; letter-spacing: .06em; margin-top: 14px; }
.boot-sub { font-size: 11px; color: rgba(234, 242, 231, .5); letter-spacing: .12em; }
.boot-bar { width: 148px; height: 3px; border-radius: 9px; background: rgba(255,255,255,.1); margin-top: 18px; overflow: hidden; }
.boot-bar span { display: block; width: 42%; height: 100%; background: linear-gradient(90deg, rgba(200,233,107,.35), var(--lime)); border-radius: 9px; animation: bootBar 1.1s var(--ease) infinite; }
@keyframes bootPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bootBar { from { transform: translateX(-120%); } to { transform: translateX(340%); } }

/* ---------------------------------------------------------------- app shell */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  background:
    radial-gradient(420px 320px at 18% -8%, rgba(200, 233, 107, .10), transparent 62%),
    linear-gradient(178deg, #0d2f26 0%, #0b271f 60%, #092019 100%);
  color: #e8f0e7; position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column; padding: 18px 14px 12px;
  border-right: 1px solid rgba(255,255,255,.05);
}
.sidebar::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent 58%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 20px; position: relative; z-index: 1; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; flex: none; box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.brand-text { min-width: 0; }
.brand-name { color: #f5f8f1; font-size: 17px; font-weight: 700; letter-spacing: .01em; line-height: 1.25; }
.brand-sub { color: rgba(232, 240, 231, .44); font-size: 9.5px; font-weight: 600; letter-spacing: .16em; margin-top: 3px; white-space: nowrap; }

.workspace-switch {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 10px;
  margin: 0 3px 6px; padding: 9px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .08);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.workspace-switch:hover { background: rgba(255,255,255,.085); border-color: rgba(200,233,107,.22); }
.ws-avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(200,233,107,.16); color: var(--lime); flex: none; }
.ws-main { min-width: 0; flex: 1; }
.ws-name { font-size: 12.5px; font-weight: 650; color: #f1f6ec; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-meta { font-size: 10px; color: rgba(232,240,231,.45); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-chevron { color: rgba(232,240,231,.35); flex: none; }

.side-scroll { position: relative; z-index: 1; overflow-y: auto; overflow-x: hidden; flex: 1; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.side-scroll::-webkit-scrollbar { width: 5px; }
.side-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border: 0; }
.side-section { margin-top: 8px; }
.side-section:first-child { margin-top: 6px; }
.side-label { padding: 0 12px 4px; font-size: 9.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; color: rgba(232,240,231,.32); }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 11px; margin-bottom: 1px;
  border-radius: 9px; color: rgba(232, 240, 231, .68); font-size: 13px; font-weight: 500;
  transition: background .16s var(--ease), color .16s var(--ease); position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #f4f8ef; }
.nav-item.active { background: rgba(200, 233, 107, .13); color: #f4f9e9; font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -4px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--lime); }
.nav-icon { width: 18px; height: 18px; flex: none; opacity: .72; }
.nav-item.active .nav-icon { opacity: 1; color: var(--lime); }
.nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: rgba(200,233,107,.18); color: var(--lime); }
.nav-badge.dark { background: rgba(255,255,255,.10); color: rgba(255,255,255,.66); }
.nav-disabled { opacity: .38; pointer-events: none; }

.sidebar-foot { position: relative; z-index: 1; padding-top: 10px; }
.rail-card {
  border-radius: 12px; padding: 10px 12px; margin: 0 3px 8px;
  background: linear-gradient(135deg, rgba(200,233,107,.12), rgba(255,255,255,.035));
  border: 1px solid rgba(200,233,107,.16);
}
.rail-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-card-title { font-size: 11.5px; font-weight: 650; color: #eef5e8; display: flex; align-items: center; gap: 6px; }
.rail-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200,233,107,.13); }
.rail-card-text { font-size: 10px; color: rgba(232,240,231,.48); line-height: 1.5; margin-top: 6px; }
.rail-progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); margin-top: 9px; overflow: hidden; }
.rail-progress span { display: block; height: 100%; border-radius: 4px; background: var(--lime); }

.user-card {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 11px; border: 1px solid transparent;
  transition: background .16s, border-color .16s; cursor: pointer; position: relative;
}
.user-card:hover { background: rgba(255,255,255,.055); border-color: rgba(255,255,255,.07); }
.user-main { min-width: 0; flex: 1; }
.user-name { color: #f2f7ed; font-size: 12.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: rgba(232,240,231,.42); font-size: 10px; margin-top: 2px; }
.user-more { color: rgba(232,240,231,.38); }

.main-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: var(--topbar-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 0 32px; position: sticky; top: 0; z-index: 30;
  background: rgba(243, 244, 238, .82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(20, 33, 29, .06);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; min-width: 0; }
.crumb-home { color: var(--muted); }
.crumb-sep { opacity: .5; }
.crumb-current { color: var(--ink); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex: none; }
.today-label { font-size: 11.5px; color: var(--faint); padding-right: 4px; white-space: nowrap; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 9px; border-radius: 20px; font-size: 10.5px; font-weight: 650; color: #7a5a10; background: #f4ebc9; border: 1px solid #e9dba8; white-space: nowrap; }
.demo-pill i { width: 5px; height: 5px; border-radius: 50%; background: #c39a22; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.7);
  display: inline-grid; place-items: center; color: var(--muted); transition: all .16s var(--ease); position: relative;
}
.icon-btn:hover { background: #fff; border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.icon-btn .dot-alert { position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #d4654f; border: 1.5px solid var(--bg); }
.search-trigger { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px 0 9px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.7); color: var(--faint); font-size: 12px; min-width: 132px; transition: all .16s; }
.search-trigger:hover { background: #fff; border-color: var(--line-strong); color: var(--muted); }
.kbd { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--faint); border: 1px solid var(--line); background: var(--surface-2); border-radius: 5px; padding: 1px 4px; }
.mobile-menu { display: none; }

.view-root { width: 100%; max-width: 1520px; margin: 0 auto; padding: 26px 32px 56px; flex: 1; }
.view-fade { animation: viewIn .36s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view-loading { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, #e9ece4 25%, #f2f4ed 37%, #e9ece4 63%); background-size: 400% 100%; animation: skeleton 1.3s ease infinite; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------- page primitives */
.page { animation: viewIn .34s var(--ease) both; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-head-main { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .09em; margin-bottom: 8px; }
.eyebrow .line { width: 18px; height: 1.5px; background: var(--primary); opacity: .5; border-radius: 2px; }
.page-title { font-size: 27px; line-height: 1.24; font-weight: 720; letter-spacing: -.035em; color: var(--ink); }
.page-desc { margin-top: 8px; font-size: 13px; line-height: 1.65; color: var(--muted); max-width: 780px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding-top: 3px; flex-wrap: wrap; justify-content: flex-end; }
.page-back { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; margin-bottom: 12px; transition: color .15s; width: fit-content; }
.page-back:hover { color: var(--primary); }

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 4px 0 12px; }
.section-title { font-size: 15px; font-weight: 680; letter-spacing: -.015em; color: var(--ink); }
.section-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.section-link { font-size: 12px; color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.section-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.card.pad { padding: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px 0; }
.card-title { font-size: 14px; font-weight: 670; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.card-sub { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.5; }
.card-body { padding: 16px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-hover { transition: border-color .18s, box-shadow .18s, transform .18s; }
.card-hover:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.card-dark { background: var(--primary-ink); border-color: var(--primary-ink); color: #edf4ea; }
.card-accent { background: linear-gradient(135deg, #f7fbf4, #edf5e9); border-color: #dce8d5; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.layout-main-wide { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--topbar-h) + 20px); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 35px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: all .16s var(--ease);
  background: transparent; color: var(--ink); text-align: center; line-height: 1;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 5px 12px rgba(23, 107, 82, .16); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); box-shadow: 0 7px 17px rgba(23, 107, 82, .22); }
.btn-dark { background: var(--primary-ink); color: #f4f8f0; border-color: var(--primary-ink); }
.btn-dark:hover { background: #173d32; }
.btn-outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); box-shadow: var(--shadow-xs); }
.btn-outline:hover { border-color: #b9c5b8; background: #fff; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-soft { background: var(--primary-soft); color: var(--primary-deep); border-color: transparent; }
.btn-soft:hover { background: #dceee5; }
.btn-lime { background: var(--lime); color: #18321c; border-color: var(--lime); font-weight: 700; }
.btn-lime:hover { background: #d4f17e; }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: #f2d2cc; }
.btn-danger:hover { background: #f8ded8; }
.btn-danger-solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { height: 29px; padding: 0 10px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-sm svg { width: 13px; height: 13px; }
.btn-lg { height: 41px; padding: 0 18px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 29px; }
.btn .spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-outline .spinner { border-color: rgba(20,33,29,.2); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- badges / chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--muted); border: 1px solid transparent; }
.badge .bdot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.green { background: var(--primary-soft); color: var(--primary-deep); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.gray { background: #eff1ec; color: #6f7b73; }
.badge.dark { background: var(--primary-ink); color: #edf5e9; }
.badge.lime { background: #eff7d4; color: #58721a; }
.badge.outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.badge.sm { height: 19px; font-size: 9.5px; padding: 0 6px; border-radius: 5px; }
.badge.lg { height: 26px; font-size: 11.5px; padding: 0 10px; border-radius: 7px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 20px; font-size: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 8px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 11px; line-height: 1.4; }
.chip svg { width: 12px; height: 12px; color: var(--faint); }
.chip.green { background: var(--primary-faint); border-color: #d7e7dc; color: var(--primary-deep); }
.chip.amber { background: var(--amber-soft); border-color: #f0ddbf; color: #8a5b19; }
.chip.plain { background: transparent; }
.role-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.tag-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.risk-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.risk-high { background: var(--red); }
.risk-mid { background: #d19535; }
.risk-low { background: #6f9f7d; }

/* ---------------------------------------------------------------- avatar */
.avatar { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 650; flex: none; letter-spacing: .02em; background: #6d8177; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); user-select: none; }
.avatar.sm { width: 24px; height: 24px; border-radius: 7px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; border-radius: 11px; font-size: 14px; }
.avatar.xl { width: 54px; height: 54px; border-radius: 14px; font-size: 18px; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -6px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .more { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 9px; border: 2px solid var(--surface); margin-left: -6px; }
.person { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.person-main { min-width: 0; }
.person-name { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-role { font-size: 10.5px; color: var(--faint); margin-top: 1px; }

/* ---------------------------------------------------------------- tables */
.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.table thead th { text-align: left; font-size: 10.5px; letter-spacing: .04em; font-weight: 650; color: var(--faint); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table thead th:first-child { padding-left: 18px; }
.table thead th:last-child { padding-right: 18px; }
.table tbody td { padding: 12px 14px; border-bottom: 1px solid #eef0ea; vertical-align: middle; color: var(--ink-2); }
.table tbody td:first-child { padding-left: 18px; }
.table tbody td:last-child { padding-right: 18px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .13s; }
.table tbody tr:hover { background: #fbfcf9; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.is-selected { background: var(--primary-faint); }
.table .cell-title { font-weight: 620; color: var(--ink); font-size: 12.8px; line-height: 1.45; }
.table .cell-sub { font-size: 10.5px; color: var(--faint); margin-top: 2px; line-height: 1.5; }
.table .cell-code { font-family: var(--mono); font-size: 10.5px; color: var(--faint); letter-spacing: -.02em; }
.table .num { font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table .center { text-align: center; }
.table .actions { text-align: right; white-space: nowrap; }
.table-compact tbody td { padding-top: 9px; padding-bottom: 9px; }
.table-empty { padding: 38px 18px; text-align: center; color: var(--faint); font-size: 12px; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .col-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 11.5px; font-weight: 650; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.field .req { color: var(--red); }
.field .hint { font-size: 10.5px; color: var(--faint); line-height: 1.5; margin: 0; }
.input, .select, .textarea {
  width: 100%; height: 36px; border: 1px solid var(--line-strong); background: #fff; border-radius: 9px;
  padding: 0 11px; font-size: 12.5px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
  appearance: none; outline: none;
}
.textarea { height: auto; min-height: 82px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.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='%238b978f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; cursor: pointer; }
.input::placeholder, .textarea::placeholder { color: #aab3aa; }
.input:hover, .select:hover, .textarea:hover { border-color: #bcc8bb; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(23,107,82,.09); }
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.input.err, .textarea.err { border-color: var(--red); }
.field-error { color: var(--red); font-size: 10.5px; }
.input-group { position: relative; }
.input-group .input { padding-left: 34px; }
.input-group .ig-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.input-suffix { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 11px; }
.checkbox-line { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: all .14s; background: #fff; }
.checkbox-line:hover { border-color: var(--line-strong); background: var(--surface-2); }
.checkbox-line.checked { border-color: #b8d5c1; background: var(--primary-faint); }
.checkbox-line input { margin: 2px 0 0; accent-color: var(--primary); width: 14px; height: 14px; flex: none; }
.checkbox-line .cl-title { font-size: 11.5px; color: var(--ink-2); font-weight: 550; line-height: 1.4; }
.checkbox-line .cl-sub { font-size: 10px; color: var(--faint); margin-top: 2px; }
.switch { position: relative; display: inline-flex; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 36px; height: 20px; border-radius: 20px; background: #ccd4c9; transition: background .16s; position: relative; cursor: pointer; }
.switch-track::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: transform .16s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 16px; margin-top: 18px; border-top: 1px solid var(--line); }
.form-actions .left { margin-right: auto; color: var(--faint); font-size: 10.5px; }

/* ---------------------------------------------------------------- tabs / segmented */
.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { position: relative; padding: 10px 13px 11px; font-size: 12.5px; font-weight: 550; color: var(--muted); background: transparent; border: 0; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary-deep); font-weight: 650; }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tab-count { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font-size: 9.5px; background: var(--surface-3); color: var(--muted); }
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary-deep); }
.segmented { display: inline-flex; align-items: center; padding: 3px; border-radius: 9px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; }
.seg-btn { height: 27px; padding: 0 11px; border-radius: 7px; border: 0; background: transparent; font-size: 11.5px; color: var(--muted); font-weight: 550; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); font-weight: 650; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-select { height: 31px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 28px 0 9px; font-size: 11.5px; color: var(--muted); appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b978f' stroke-width='2.2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.filter-search { display: flex; align-items: center; gap: 6px; height: 31px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 9px; color: var(--faint); }
.filter-search input { border: 0; outline: 0; width: 150px; background: transparent; font-size: 11.5px; }

/* ---------------------------------------------------------------- progress / steps */
.progress { height: 5px; border-radius: 5px; background: #edf0e8; overflow: hidden; width: 100%; }
.progress > span { display: block; height: 100%; border-radius: 5px; background: var(--primary); transition: width .5s var(--ease); }
.progress.amber > span { background: #c7902d; }
.progress.red > span { background: #c25b4d; }
.progress-lg { height: 7px; border-radius: 7px; }
.progress-row { display: flex; align-items: center; gap: 9px; }
.progress-row .progress { flex: 1; }
.progress-num { font-size: 10.5px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 28px; text-align: right; }
.steps { display: flex; align-items: flex-start; width: 100%; }
.step { flex: 1; position: relative; min-width: 0; text-align: center; }
.step::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step.done::before, .step.active::before { background: #a9c8b7; }
.step-node { width: 25px; height: 25px; border-radius: 50%; margin: 0 auto 7px; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--line-strong); color: var(--faint); font-size: 10px; font-weight: 700; position: relative; z-index: 1; }
.step.done .step-node { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active .step-node { background: #fff; border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px rgba(23,107,82,.09); }
.step-label { font-size: 11px; color: var(--faint); line-height: 1.35; padding: 0 4px; }
.step.active .step-label, .step.done .step-label { color: var(--ink-2); font-weight: 550; }
.step-meta { font-size: 9.5px; color: var(--faint); margin-top: 2px; }
.step.danger .step-node { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px rgba(185,77,67,.08); }
.step.danger .step-label { color: var(--red); font-weight: 550; }

/* ---------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 19px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 5px; bottom: 8px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; left: -19px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #bdcbbf; }
.timeline-item.active .timeline-dot { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.timeline-item.done .timeline-dot { border-color: #7fa68f; background: #7fa68f; }
.timeline-item.warn .timeline-dot { border-color: #c7902d; background: #fff; }
.timeline-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.timeline-title { font-size: 11.8px; color: var(--ink-2); font-weight: 550; line-height: 1.5; }
.timeline-time { font-size: 10px; color: var(--faint); white-space: nowrap; flex: none; }
.timeline-desc { font-size: 10.8px; color: var(--faint); margin-top: 3px; line-height: 1.55; }

/* ---------------------------------------------------------------- callouts */
.callout { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.callout svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.callout strong { color: var(--ink-2); font-weight: 650; }
.callout.info { background: #f1f7fc; border-color: #dbe8f3; color: #4d667c; }
.callout.info svg { color: var(--blue); }
.callout.warn { background: var(--amber-soft); border-color: #f0ddbd; color: #7d5a25; }
.callout.warn svg { color: var(--amber); }
.callout.danger { background: var(--red-soft); border-color: #f1d3cd; color: #86453e; }
.callout.danger svg { color: var(--red); }
.callout.success { background: var(--primary-faint); border-color: #d6e7da; color: #35604e; }
.callout.success svg { color: var(--primary); }

/* ---------------------------------------------------------------- AI panel */
.ai-panel {
  position: relative; overflow: hidden; border-radius: 14px; padding: 17px 18px;
  background: linear-gradient(145deg, #0d3027 0%, #0e3a2e 55%, #124634 100%); color: #eaf3e6;
  box-shadow: 0 10px 30px rgba(11, 42, 32, .16);
}
.ai-panel::before { content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%; right: -70px; top: -100px; background: radial-gradient(circle, rgba(200,233,107,.22), transparent 68%); pointer-events: none; }
.ai-panel::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 30px 30px; mask-image: linear-gradient(to bottom left, #000, transparent 55%); pointer-events: none; }
.ai-panel > * { position: relative; z-index: 1; }
.ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ai-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: #f2f8ec; }
.ai-title svg { color: var(--lime); }
.ai-mode { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 20px; background: rgba(200,233,107,.13); border: 1px solid rgba(200,233,107,.18); color: #d7f0a0; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.ai-mode i { width: 5px; height: 5px; background: var(--lime); border-radius: 50%; }
.ai-summary { font-size: 12px; line-height: 1.75; color: rgba(236, 246, 233, .86); margin-top: 12px; }
.ai-block { margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
.ai-block-title { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 650; letter-spacing: .05em; color: rgba(214, 236, 199, .58); text-transform: uppercase; margin-bottom: 8px; }
.ai-block-title svg { width: 12px; height: 12px; }
.ai-list { display: flex; flex-direction: column; gap: 6px; }
.ai-list-item { display: flex; align-items: flex-start; gap: 8px; font-size: 11.3px; line-height: 1.55; color: rgba(239, 247, 235, .84); }
.ai-list-item .marker { width: 16px; height: 16px; border-radius: 5px; background: rgba(200,233,107,.13); color: #d3ed99; display: grid; place-items: center; flex: none; margin-top: 1px; font-size: 9px; font-weight: 700; }
.ai-list-item.warn .marker { background: rgba(240,185,96,.15); color: #f0c67d; }
.ai-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 11px; border-top: 1px solid rgba(255,255,255,.1); font-size: 9.5px; color: rgba(230, 242, 222, .45); }
.ai-foot .confirm-by { color: #d8f0a8; font-weight: 600; }
.ai-empty { color: rgba(236,246,233,.55); font-size: 11.5px; padding: 8px 0 2px; }
.ai-refresh { display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 9px; border-radius: 7px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); color: #e7f1df; font-size: 10px; font-weight: 550; }
.ai-refresh:hover { background: rgba(255,255,255,.14); }
.ai-badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 5px; background: #f0f6df; color: #547019; font-size: 9.5px; font-weight: 650; }

/* ---------------------------------------------------------------- empty / misc */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 42px 20px; color: var(--faint); }
.empty-icon { width: 44px; height: 44px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); margin-bottom: 12px; }
.empty-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.empty-desc { font-size: 11.5px; line-height: 1.6; margin-top: 4px; max-width: 340px; }
.empty-action { margin-top: 14px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 11px; }
.tiny { font-size: 10px; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.vdivider { width: 1px; align-self: stretch; background: var(--line); }
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 20px; }
.kv-item { min-width: 0; }
.kv-label { font-size: 10px; color: var(--faint); margin-bottom: 3px; letter-spacing: .02em; }
.kv-value { font-size: 12.2px; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }
.kv-value.strong { font-weight: 650; color: var(--ink); }
.kv-value.mono { font-family: var(--mono); font-size: 11px; }
.code-pill { font-family: var(--mono); font-size: 10px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef0ea; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }
.hover-row { border-radius: 9px; padding: 9px 10px; margin: 0 -10px; transition: background .14s; display: flex; align-items: center; gap: 10px; }
.hover-row:hover { background: var(--surface-2); }
.metric-inline { display: flex; align-items: center; gap: 14px; }
.metric-inline .m-item { display: flex; align-items: baseline; gap: 5px; font-size: 11px; color: var(--faint); }
.metric-inline .m-value { font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: #a6b2a7; }
.status-dot.green { background: #4f9a72; } .status-dot.amber { background: #cf9a3e; } .status-dot.red { background: #c86459; } .status-dot.blue { background: #5b8bb7; }

/* ---------------------------------------------------------------- modal / drawer / toast */
.overlay { position: fixed; inset: 0; background: rgba(8, 23, 18, .46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .18s ease; }
.overlay.drawer-overlay { justify-content: flex-end; padding: 0; background: rgba(8, 23, 18, .3); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 520px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; animation: modalIn .24s var(--ease); overflow: hidden; }
.modal.wide { width: 680px; }
.modal.xwide { width: 880px; }
.modal.narrow { width: 420px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 19px 22px 0; flex: none; }
.modal-title { font-size: 16px; font-weight: 680; letter-spacing: -.02em; }
.modal-sub { font-size: 11.5px; color: var(--faint); margin-top: 4px; line-height: 1.55; }
.modal-close { width: 28px; height: 28px; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 8px; display: grid; place-items: center; flex: none; }
.modal-close:hover { background: var(--surface-3); color: var(--ink); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--line); background: var(--surface-2); flex: none; }
.modal-foot .left { margin-right: auto; font-size: 10.5px; color: var(--faint); }

.drawer { width: 560px; max-width: 100%; height: 100vh; background: #fff; box-shadow: -20px 0 60px rgba(8,23,18,.18); display: flex; flex-direction: column; animation: drawerIn .26s var(--ease); }
.drawer.wide { width: 650px; }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 24px 16px; border-bottom: 1px solid var(--line); flex: none; }
.drawer-body { padding: 20px 24px 40px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 13px 24px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.toast-root { position: fixed; top: 82px; right: 26px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { min-width: 220px; max-width: 390px; display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; border-radius: 11px; background: #12352a; color: #eef5e9; font-size: 12px; line-height: 1.55; box-shadow: 0 12px 34px rgba(8,23,18,.22); animation: toastIn .26s var(--ease); pointer-events: auto; border: 1px solid rgba(255,255,255,.08); }
.toast.success svg { color: var(--lime); }
.toast.error { background: #4c211d; }
.toast.error svg { color: #f2a79e; }
.toast.info { background: #173246; }
.toast.info svg { color: #9ec9ed; }
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast.leaving { animation: toastOut .2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(12px); } }

/* ---------------------------------------------------------------- login */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(480px, .88fr); background: #f7f7f2; }
.auth-visual {
  position: relative; overflow: hidden; color: #eef5e9; padding: 44px 52px; display: flex; flex-direction: column; min-height: 100vh;
  background:
    radial-gradient(860px 520px at 78% 6%, rgba(31, 138, 112, .34), transparent 60%),
    radial-gradient(700px 460px at -8% 34%, rgba(28, 123, 123, .22), transparent 62%),
    radial-gradient(760px 460px at 30% 108%, rgba(200, 233, 107, .12), transparent 62%),
    linear-gradient(158deg, #0b2d24 0%, #0a281f 44%, #0c352a 100%);
}
.auth-visual::before { content: ""; position: absolute; width: 720px; height: 720px; border-radius: 50%; right: -260px; top: -270px; background: radial-gradient(circle at center, rgba(200,233,107,.13), transparent 65%); }
.auth-visual::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(ellipse at 40% 30%, #000 15%, transparent 72%); }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.auth-brand-name { font-size: 19px; font-weight: 720; letter-spacing: .01em; }
.auth-brand-sub { font-size: 9px; font-weight: 650; letter-spacing: .2em; color: rgba(238,245,233,.42); margin-top: 2px; }
.auth-main { position: relative; z-index: 1; margin: auto 0; padding: 40px 0; max-width: 620px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; height: 27px; padding: 0 11px; border-radius: 20px; border: 1px solid rgba(200,233,107,.2); background: rgba(200,233,107,.08); color: #d6efa0; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; margin-bottom: 24px; }
.auth-kicker i { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.auth-headline { font-size: clamp(35px, 3.7vw, 52px); line-height: 1.18; font-weight: 720; letter-spacing: -.045em; color: #f4f8ee; }
.auth-headline em { font-style: normal; color: var(--lime); }
.auth-sub { font-size: 14px; line-height: 1.8; color: rgba(236,245,231,.58); margin-top: 20px; max-width: 510px; }
.auth-features { display: flex; flex-direction: column; gap: 13px; margin-top: 32px; }
.auth-feature { display: flex; align-items: flex-start; gap: 11px; }
.auth-feature-icon { width: 29px; height: 29px; border-radius: 8px; background: rgba(200,233,107,.1); border: 1px solid rgba(200,233,107,.16); color: var(--lime); display: grid; place-items: center; flex: none; }
.auth-feature-title { font-size: 12.5px; font-weight: 630; color: rgba(245,249,240,.9); }
.auth-feature-desc { font-size: 11px; line-height: 1.6; color: rgba(236,245,231,.42); margin-top: 2px; }
.auth-flow-card { margin-top: 34px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.045); backdrop-filter: blur(8px); padding: 14px 16px; max-width: 550px; }
.auth-flow-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: rgba(238,245,233,.4); letter-spacing: .05em; }
.auth-flow-head .live { display: inline-flex; align-items: center; gap: 5px; color: #cfe9a2; }
.auth-flow-head .live i { width: 5px; height: 5px; background: var(--lime); border-radius: 50%; animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.auth-flow { display: flex; align-items: center; gap: 5px; margin-top: 12px; }
.auth-flow-step { flex: 1; min-width: 0; }
.auth-flow-node { height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.auth-flow-node span { display: block; height: 100%; background: var(--lime); border-radius: 4px; }
.auth-flow-step:nth-child(1) .auth-flow-node span { width: 100%; } .auth-flow-step:nth-child(2) .auth-flow-node span { width: 100%; } .auth-flow-step:nth-child(3) .auth-flow-node span { width: 72%; } .auth-flow-step:nth-child(4) .auth-flow-node span { width: 38%; } .auth-flow-step:nth-child(5) .auth-flow-node span { width: 0%; }
.auth-flow-labels { display: flex; justify-content: space-between; gap: 4px; margin-top: 7px; font-size: 8.5px; color: rgba(238,245,233,.34); }
.auth-visual-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 10px; color: rgba(238,245,233,.28); }
.auth-signal { display: flex; align-items: center; gap: 10px; }
.auth-signal .line { width: 34px; height: 1px; background: rgba(255,255,255,.16); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 36px 42px; min-height: 100vh; background: #f7f7f2; position: relative; }
.auth-panel-inner { width: 100%; max-width: 418px; }
.auth-mobile-brand { display: none; }
.auth-title { font-size: 25px; font-weight: 720; letter-spacing: -.035em; }
.auth-desc { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
.auth-form { margin-top: 23px; display: flex; flex-direction: column; gap: 13px; }
.auth-form .field > label { font-size: 11px; }
.auth-form .input { height: 42px; border-radius: 10px; background: #fff; font-size: 13px; }
.auth-form .btn-primary { height: 43px; font-size: 13px; border-radius: 10px; margin-top: 3px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.auth-check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-check input { accent-color: var(--primary); }
.auth-error { display: none; padding: 9px 11px; border-radius: 8px; background: var(--red-soft); border: 1px solid #f0d1cb; color: #8b4840; font-size: 11.5px; line-height: 1.5; }
.auth-error.show { display: flex; gap: 7px; align-items: flex-start; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 21px 0 14px; color: var(--faint); font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-hint { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-bottom: 9px; }
.demo-hint strong { color: var(--ink-2); font-weight: 600; }
.demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.demo-account { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); background: #fff; border-radius: 9px; text-align: left; transition: all .15s var(--ease); }
.demo-account:hover { border-color: #b6cfbf; background: var(--primary-faint); transform: translateY(-1px); }
.demo-account .avatar { width: 25px; height: 25px; border-radius: 7px; font-size: 10px; }
.demo-account-main { min-width: 0; flex: 1; }
.demo-account-name { font-size: 11px; font-weight: 620; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-account-role { font-size: 9px; color: var(--faint); margin-top: 1px; }
.demo-account .go { color: #b5c1b6; }
.demo-more { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.demo-more-btn { border: 0; background: transparent; color: var(--muted); font-size: 10.5px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; }
.demo-more-btn:hover { color: var(--primary); }
.client-accounts { display: none; margin-top: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 9px; background: rgba(255,255,255,.6); }
.client-accounts.open { display: block; }
.client-group { padding: 5px 2px; }
.client-group + .client-group { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 9px; }
.client-group-name { font-size: 9.5px; color: var(--faint); margin-bottom: 5px; display: flex; justify-content: space-between; }
.client-account-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.client-account-row .name { font-size: 10.5px; color: var(--ink-2); }
.client-account-row .role { font-size: 9px; color: var(--faint); margin-left: 5px; }
.client-account-row button { border: 0; background: transparent; color: var(--primary); font-size: 9.5px; font-weight: 600; padding: 2px 4px; }
.auth-foot { margin-top: 22px; font-size: 9.5px; color: var(--faint); line-height: 1.65; text-align: center; }
.auth-foot a { color: var(--primary); }

/* ---------------------------------------------------------------- dashboard */
.dash-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(112deg, #0c2f25 0%, #114435 55%, #185641 100%); color: #eef5e9; padding: 22px 25px; margin-bottom: 16px; box-shadow: 0 10px 28px rgba(10, 41, 31, .13); }
.dash-hero::before { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -130px; top: -210px; background: radial-gradient(circle, rgba(200,233,107,.22), transparent 66%); }
.dash-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(90deg, #000, transparent 70%); pointer-events: none; }
.dash-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.dash-hero-main { min-width: 0; }
.dash-kicker { display: flex; align-items: center; gap: 9px; font-size: 10px; letter-spacing: .08em; color: rgba(230,242,223,.45); font-weight: 600; text-transform: uppercase; }
.dash-kicker .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(200,233,107,.11); }
.dash-title { font-size: 23px; font-weight: 700; letter-spacing: -.03em; margin-top: 9px; color: #f5f9ef; line-height: 1.3; }
.dash-title em { font-style: normal; color: var(--lime); }
.dash-sub { font-size: 12px; color: rgba(235,245,229,.55); margin-top: 6px; line-height: 1.65; max-width: 620px; }
.dash-hero-actions { display: flex; align-items: center; gap: 8px; flex: none; position: relative; z-index: 1; flex-wrap: wrap; justify-content: flex-end; }
.dash-hero-actions .btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #eef5e9; box-shadow: none; }
.dash-hero-actions .btn:hover { background: rgba(255,255,255,.14); }
.dash-hero-actions .btn.btn-lime { background: var(--lime); border-color: var(--lime); color: #1a331f; }
.dash-hero-meta { display: flex; align-items: center; gap: 18px; margin-top: 15px; position: relative; z-index: 1; flex-wrap: wrap; }
.dash-hero-meta .hm { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: rgba(235,245,229,.5); }
.dash-hero-meta .hm strong { color: rgba(245,250,240,.9); font-weight: 650; }
.dash-hero-meta .sep { width: 1px; height: 11px; background: rgba(255,255,255,.12); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px 13px; position: relative; overflow: hidden; transition: all .18s var(--ease); min-width: 0; }
.stat-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 550; }
.stat-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.stat-icon svg { width: 15px; height: 15px; }
.stat-card.warn .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat-card.danger .stat-icon { background: var(--red-soft); color: var(--red); }
.stat-card.blue .stat-icon { background: var(--blue-soft); color: var(--blue); }
.stat-value-row { display: flex; align-items: baseline; gap: 7px; margin-top: 9px; }
.stat-value { font-size: 29px; font-weight: 720; letter-spacing: -.045em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 10px; color: var(--faint); }
.stat-meta { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--faint); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-meta .up { color: var(--primary); font-weight: 600; }
.stat-meta .warn-text { color: var(--amber); font-weight: 600; }
.stat-meta .danger-text { color: var(--red); font-weight: 600; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(320px, .92fr); gap: 16px; align-items: start; }
.dash-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid #eef0ea; cursor: pointer; transition: background .14s; }
.todo-item:first-child { padding-top: 2px; }
.todo-item:last-child { border-bottom: 0; padding-bottom: 0; }
.todo-item:hover .todo-title { color: var(--primary); }
.todo-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; border: 1px solid var(--line); }
.todo-icon.req { background: var(--blue-soft); color: var(--blue); border-color: #dae6f0; }
.todo-icon.chg { background: var(--violet-soft); color: var(--violet); border-color: #e6dff5; }
.todo-body { min-width: 0; flex: 1; }
.todo-title { font-size: 12.3px; font-weight: 580; color: var(--ink-2); line-height: 1.45; transition: color .14s; }
.todo-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 4px; font-size: 10px; color: var(--faint); }
.todo-cta { font-size: 10px; color: var(--primary); font-weight: 650; flex: none; display: inline-flex; align-items: center; gap: 2px; padding-top: 2px; }
.dash-pipeline { display: flex; align-items: stretch; gap: 4px; margin-top: 4px; }
.pipe-stage { flex: 1; min-width: 0; position: relative; padding: 2px 5px 0; }
.pipe-bar { height: 6px; border-radius: 4px; background: #edf0e9; overflow: hidden; }
.pipe-bar span { display: block; height: 100%; background: #a9c9b5; border-radius: 4px; }
.pipe-stage.active .pipe-bar span { background: var(--primary); }
.pipe-stage.empty .pipe-bar span { background: #e7ebe3; }
.pipe-label { font-size: 9.5px; color: var(--faint); line-height: 1.4; margin-top: 7px; padding-bottom: 1px; }
.pipe-stage.active .pipe-label { color: var(--ink-2); font-weight: 600; }
.pipe-count { font-size: 9px; color: var(--faint); margin-top: 2px; }
.project-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eef0ea; cursor: pointer; }
.project-row:first-child { padding-top: 2px; }
.project-row:last-child { border-bottom: 0; padding-bottom: 0; }
.project-row:hover .pr-name { color: var(--primary); }
.pr-main { min-width: 0; flex: 1; }
.pr-name { font-size: 12.2px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .14s; }
.pr-meta { display: flex; align-items: center; gap: 7px; font-size: 9.8px; color: var(--faint); margin-top: 4px; overflow: hidden; white-space: nowrap; }
.pr-progress { width: 92px; flex: none; }
.pr-right { font-size: 10px; color: var(--faint); flex: none; text-align: right; min-width: 54px; }
.module-card { padding: 14px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: all .16s; }
.module-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-xs); }
.module-card + .module-card { margin-top: 8px; }
.module-head { display: flex; align-items: center; gap: 9px; }
.module-icon { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.module-name { font-size: 11.8px; font-weight: 640; color: var(--ink-2); flex: 1; min-width: 0; }
.module-counts { display: flex; gap: 12px; margin-top: 9px; padding-top: 9px; border-top: 1px solid #f0f2ec; }
.module-counts .mc { font-size: 9.5px; color: var(--faint); }
.module-counts .mc strong { display: block; font-size: 14px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; margin-bottom: 1px; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.quick-link { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; font-size: 10px; color: var(--muted); font-weight: 550; transition: all .14s; }
.quick-link:hover { border-color: #bfd6c6; color: var(--primary-deep); background: var(--primary-faint); }
.mini-chart { display: flex; align-items: flex-end; gap: 6px; height: 72px; margin-top: 12px; }
.mini-chart .bar { flex: 1; border-radius: 3px 3px 2px 2px; background: #dbe7dd; position: relative; transition: background .16s; }
.mini-chart .bar:hover { background: #bcd4c3; }
.mini-chart .bar.hot { background: var(--primary); }
.mini-chart .bar.hot:hover { background: var(--primary-deep); }
.mini-chart-labels { display: flex; gap: 6px; margin-top: 4px; }
.mini-chart-labels span { flex: 1; text-align: center; font-size: 8px; color: var(--faint); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1240px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 310px; }
  .stat-value { font-size: 26px; }
  .view-root { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .layout-main, .layout-main-wide { grid-template-columns: minmax(0, 1fr) 310px; }
  .auth-visual { padding: 38px 38px; }
  .auth-headline { font-size: 42px; }
}
@media (max-width: 1080px) {
  :root { --sidebar-w: 232px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-main, .layout-main-wide { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
  .today-label { display: none; }
  .auth-page { grid-template-columns: 1fr 440px; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .24s var(--ease); box-shadow: var(--shadow-lg); }
  .app-shell.side-open .sidebar { transform: none; }
  .app-shell.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(8,23,18,.4); z-index: 35; }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 0 18px; }
  .view-root { padding: 20px 18px 44px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .search-trigger { min-width: 34px; width: 34px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger .kbd { display: none; }
  .auth-page { display: block; }
  .auth-visual { display: none; }
  .auth-panel { padding: 28px 22px; min-height: 100vh; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; }
  .page-head { flex-direction: column; gap: 14px; }
  .page-actions { justify-content: flex-start; }
  .dash-hero-inner { flex-direction: column; align-items: flex-start; }
  .dash-hero-actions { justify-content: flex-start; }
  .page-title { font-size: 23px; }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .dash-hero { padding: 18px; }
  .dash-title { font-size: 20px; }
  .topbar-right .demo-pill { display: none; }
  .modal { width: 100%; }
  .overlay { padding: 12px; }
  .drawer { width: 100%; }
}

@media print {
  .sidebar, .topbar, .no-print, .page-actions, .btn { display: none !important; }
  .app-shell { display: block; }
  .view-root { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ---------------------------------------------------------------- user menu / search */
.user-card.menu-open .user-menu { display: flex; }
.user-menu { display: none; position: absolute; left: 10px; right: 10px; bottom: 58px; flex-direction: column; gap: 1px; padding: 6px; border-radius: 11px; background: #15382d; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.35); z-index: 80; }
.user-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; color: rgba(238,246,233,.82); font-size: 11.5px; text-align: left; padding: 8px 9px; border-radius: 7px; }
.user-menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.user-menu-item.danger { color: #f0b2a9; }
.user-menu-sep { height: 1px; background: rgba(255,255,255,.08); margin: 4px 2px; }
.search-result-group { display: flex; flex-direction: column; gap: 3px; }
.search-result { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 1px solid transparent; }
.search-result:hover { background: var(--surface-2); border-color: var(--line); }
.search-result > svg { color: var(--faint); flex: none; }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-title { font-size: 12.5px; font-weight: 580; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-meta { font-size: 10px; color: var(--faint); }

/* ---------------------------------------------------------------- dashboard · 配方档案（演示） */
.formula-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.ff-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2);
  font-size: 9.5px; color: var(--ink-2);
}
.ff-chip svg { color: var(--primary); }
.formula-diff { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 11px; }
.fd-item { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; }
.fd-item em { display: block; font-style: normal; font-size: 8.5px; color: var(--faint); letter-spacing: .03em; }
.fd-item b { display: block; font-size: 12px; font-weight: 680; color: var(--primary-deep); margin-top: 3px; font-family: var(--mono); letter-spacing: -.01em; }
.fd-item span { display: block; font-size: 8.5px; color: var(--faint); margin-top: 2px; }
.formula-comp { margin-top: 11px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.fc-row { display: flex; align-items: center; gap: 8px; }
.fc-row + .fc-row { margin-top: 7px; }
.fc-row svg { flex: none; }
.fc-row .fc-name { flex: 1; font-size: 10px; color: var(--ink-2); }
.fc-row .fc-val { font-size: 9.5px; font-weight: 650; }
.fc-row .fc-val.ok { color: #2e7d4f; }
.fc-row .fc-val.doing { color: var(--amber); }
.formula-note { margin-top: 10px; font-size: 8.5px; color: var(--faint); letter-spacing: .02em; }
.formula-bars { display: flex; flex-direction: column; gap: 7px; }
.fb-row { display: flex; align-items: center; gap: 9px; }
.fb-label { flex: none; width: 118px; font-size: 10px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-track { flex: 1; height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.fb-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--primary), #2a8a68); }
.fb-pct { flex: none; width: 34px; text-align: right; font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--ink-2); }

/* ---------------------------------------------------------------- dashboard · 品类情报库（演示） */
.intel-search {
  display: flex; align-items: center; gap: 7px; padding: 8px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2);
  font-size: 10.5px; color: var(--ink-2);
}
.intel-search svg { color: var(--primary); }
.intel-search em { margin-left: auto; font-style: normal; font-size: 9px; color: var(--faint); }
.intel-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.it-row { display: grid; grid-template-columns: 1.5fr .7fr 1.1fr 1fr .8fr; gap: 6px; padding: 7px 10px; font-size: 9.8px; color: var(--ink-2); border-top: 1px solid var(--line); align-items: center; background: #fff; }
.it-row:first-child { border-top: 0; }
.it-row.it-head { background: var(--surface-2); font-size: 8.5px; font-weight: 650; color: var(--muted); letter-spacing: .04em; }
.it-row .it-num { font-family: var(--mono); font-weight: 650; color: var(--primary-deep); }
.intel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 8.5px; color: var(--faint); }
.intel-foot span { display: inline-flex; align-items: center; gap: 4px; }
.intel-foot svg { color: var(--primary); }
.intel-foot em { font-style: normal; flex: none; }
