/* ==========================================================================
   Studio · Mercor — application styles
   ========================================================================== */

:root {
  color-scheme: light;
  --font: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #fcfcfb;
  --bg-2: #f6f6f3;
  --sidebar-bg: #f5f7fc;
  --surface: #ffffff;
  --surface-2: #f8f8f6;
  --border: #e6e6e1;
  --border-strong: #d4d4cf;
  --text: #121216;
  --text-2: #52514e;
  --muted: #898781;
  --hairline: rgba(11, 11, 11, 0.10);

  --primary: #5b5bd6;
  --primary-hover: #4b4bc4;
  --primary-text: #4a48c6;
  --primary-soft: #ebebfa;
  --primary-soft-2: #dcdcf7;
  --on-primary: #ffffff;

  /* status (fixed, never themed) */
  --good: #0ca30c;
  --good-strong: #1a7f37;
  --good-soft: #e3f5e3;
  --good-text: #0f6a2b;
  --warning: #fab219;
  --warning-soft: #fff3d6;
  --warning-text: #8a5a00;
  --serious: #ec835a;
  --serious-soft: #fde7de;
  --serious-text: #9a3f17;
  --critical: #d03b3b;
  --critical-soft: #fbe3e3;
  --critical-text: #a12222;
  --info: #2a78d6;
  --info-soft: #e3eefb;
  --info-text: #1c5cab;
  --neutral-soft: #ededea;
  --neutral-text: #52514e;

  /* chart */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-7: #6250d6;
  --grid: #e1e0d9;
  --axis: #c3c2b7;

  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(16, 16, 24, 0.05), 0 4px 16px rgba(16, 16, 24, 0.06);
  --shadow-lg: 0 10px 40px rgba(16, 16, 24, 0.18), 0 2px 6px rgba(16, 16, 24, 0.08);
  --sidebar-w: 236px;
  --topbar-h: 52px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1a1a19;
    --bg-2: #202020;
    --sidebar-bg: #141416;
    --surface: #222223;
    --surface-2: #28282a;
    --border: #333332;
    --border-strong: #454543;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #8f8e88;
    --hairline: rgba(255, 255, 255, 0.10);
    --primary: #7d7af0;
    --primary-hover: #8f8cf4;
    --primary-text: #a3a1f5;
    --primary-soft: #2a2a48;
    --primary-soft-2: #343460;
    --good-strong: #2ea043;
    --good-soft: #163a1e;
    --good-text: #7ee29b;
    --warning-soft: #3d2f0a;
    --warning-text: #f5c75a;
    --serious-soft: #45200f;
    --serious-text: #f4a98a;
    --critical-soft: #451a1a;
    --critical-text: #f4a0a0;
    --info-soft: #1a2d47;
    --info-text: #8dbbf2;
    --neutral-soft: #2f2f31;
    --neutral-text: #c3c2b7;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-7: #9085e9;
    --grid: #2c2c2a;
    --axis: #383835;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1a19;
  --bg-2: #202020;
  --sidebar-bg: #141416;
  --surface: #222223;
  --surface-2: #28282a;
  --border: #333332;
  --border-strong: #454543;
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #8f8e88;
  --hairline: rgba(255, 255, 255, 0.10);
  --primary: #7d7af0;
  --primary-hover: #8f8cf4;
  --primary-text: #a3a1f5;
  --primary-soft: #2a2a48;
  --primary-soft-2: #343460;
  --good-strong: #2ea043;
  --good-soft: #163a1e;
  --good-text: #7ee29b;
  --warning-soft: #3d2f0a;
  --warning-text: #f5c75a;
  --serious-soft: #45200f;
  --serious-text: #f4a98a;
  --critical-soft: #451a1a;
  --critical-text: #f4a0a0;
  --info-soft: #1a2d47;
  --info-text: #8dbbf2;
  --neutral-soft: #2f2f31;
  --neutral-text: #c3c2b7;
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-7: #9085e9;
  --grid: #2c2c2a;
  --axis: #383835;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: var(--primary-soft-2); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .18s ease, flex-basis .18s ease;
  overflow: hidden;
}
.app.collapsed .sidebar { width: 60px; flex-basis: 60px; }
.app.collapsed .sb-label, .app.collapsed .sb-project, .app.collapsed .sb-user-name, .app.collapsed .brand-name, .app.collapsed .sb-section-chevron, .app.collapsed .sb-count { display: none; }
.app.collapsed .sb-item { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapsed .sb-sub .sb-item { padding-left: 0; }
.app.collapsed .sb-user { justify-content: center; }
.app.collapsed .sb-user-menu-btn { display: none; }

.sb-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px 16px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--primary-text); font-weight: 600; font-size: 16px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.brand-logo { width: 26px; height: 26px; display: inline-grid; place-items: center; }
.brand-logo svg { width: 26px; height: 26px; }
.sb-collapse {
  border: 0; background: transparent; color: var(--muted); border-radius: 6px; width: 28px; height: 28px;
  display: grid; place-items: center; cursor: pointer;
}
.sb-collapse svg { width: 16px; height: 16px; }
.sb-collapse:hover { background: var(--neutral-soft); color: var(--text); }
.app.collapsed .sb-top { justify-content: center; padding-left: 0; padding-right: 0; }
.app.collapsed .sb-collapse { display: none; }

.sb-project {
  margin: 2px 10px 6px 12px;
  padding: 4px 6px;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-2); font-size: 12.5px; border-radius: 6px; border: 0; background: transparent; cursor: pointer;
}
.sb-project svg { width: 12px; height: 12px; }
.sb-project:hover { background: var(--neutral-soft); color: var(--text); }

.sb-nav { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
.sb-nav::-webkit-scrollbar { width: 8px; }
.sb-nav::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.sb-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 7px 10px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text); text-align: left; cursor: pointer; font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden;
}
.sb-item .sb-label { overflow: hidden; text-overflow: ellipsis; }
.sb-item svg { flex: 0 0 auto; width: 16px; height: 16px; color: var(--text-2); }
.sb-item:hover { background: rgba(91, 91, 214, 0.08); }
.sb-item.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 500; }
.sb-item.active svg { color: var(--primary-text); }
.sb-sub .sb-item { padding-left: 14px; font-size: 13.5px; }
.sb-sub .sb-item svg { width: 14px; height: 14px; }
.sb-item .sb-count { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--neutral-soft); border-radius: 10px; padding: 1px 7px; }
.sb-item.active .sb-count { background: var(--primary-soft-2); color: var(--primary-text); }
.sb-section-chevron { margin-left: auto; width: 14px !important; height: 14px !important; color: var(--muted); transition: transform .15s; }
.sb-section-chevron.open { transform: rotate(90deg); }
.sb-divider { height: 1px; background: var(--border); margin: 8px 6px; }

.sb-user {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 6px;
}
.sb-user-btn { display: flex; align-items: center; gap: 10px; flex: 1; border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 8px; min-width: 0; }
.sb-user-btn:hover { background: var(--neutral-soft); }
.sb-user-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-menu-btn { border: 0; background: transparent; color: var(--text-2); width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; }
.sb-user-menu-btn svg { width: 16px; height: 16px; }
.sb-user-menu-btn:hover { background: var(--neutral-soft); color: var(--text); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; flex: 0 0 auto;
  letter-spacing: .02em;
}
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 72px; height: 72px; font-size: 24px; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.alt { background: #1baf7a; }
.avatar.alt2 { background: #eb6834; }
.avatar.alt3 { background: #c98500; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 0 22px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.crumb { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb.link { color: var(--primary-text); cursor: pointer; border: 0; background: transparent; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; font-size: 14px; }
.crumb.link svg { width: 12px; height: 12px; }
.crumb.link:hover { background: var(--primary-soft); }
.crumb-sep { color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  border: 0; background: transparent; color: var(--text-2); width: 32px; height: 32px; border-radius: 8px;
  display: inline-grid; place-items: center; cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--neutral-soft); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--critical); border: 2px solid var(--bg); }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); border-radius: 8px; padding: 5px 10px; font-size: 13px; cursor: pointer; min-width: 220px;
}
.search-btn svg { width: 14px; height: 14px; }
.search-btn:hover { border-color: var(--border-strong); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
kbd {
  font-family: var(--font); font-size: 11px; color: var(--text-2);
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface-2);
}

.view { padding: 28px 48px 60px; max-width: 1680px; width: 100%; }
@media (max-width: 1100px) { .view { padding: 22px 24px 48px; } }

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-title { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.page-sub { color: var(--text-2); font-size: 15.5px; margin-top: 6px; }
.page-desc { color: var(--text-2); font-size: 15px; margin-top: 8px; max-width: 1500px; line-height: 1.5; }
.page-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.notice {
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 18px; color: var(--text); font-size: 14px;
}
.notice.info { background: var(--info-soft); border-color: transparent; color: var(--info-text); }
.notice.warn { background: var(--warning-soft); border-color: transparent; color: var(--warning-text); }
.notice.good { background: var(--good-soft); border-color: transparent; color: var(--good-text); }
.notice.crit { background: var(--critical-soft); border-color: transparent; color: var(--critical-text); }
.notice b { font-weight: 600; }
.notice.row { display: flex; align-items: center; gap: 10px; }
.notice .notice-actions { margin-left: auto; display: flex; gap: 8px; }
.notice svg { width: 16px; height: 16px; flex: 0 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); padding: 7px 13px; font-size: 13.5px; cursor: pointer;
  white-space: nowrap; line-height: 1.3; transition: background .12s, border-color .12s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--neutral-soft); color: var(--text); }
.btn.danger { color: var(--critical-text); border-color: var(--critical-soft); background: var(--critical-soft); }
.btn.danger:hover { filter: brightness(0.97); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn.lg { padding: 10px 18px; font-size: 14.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.active { background: var(--primary-soft); border-color: var(--primary-soft-2); color: var(--primary-text); }
.btn .badge-n { background: var(--primary); color: #fff; font-size: 10.5px; border-radius: 10px; padding: 0 6px; }

/* ---------- pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px;
  font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap;
}
.pill svg { width: 12px; height: 12px; }
.pill.solid-good { background: var(--good-strong); color: #fff; }
.pill.solid-crit { background: var(--critical); color: #fff; }
.pill.solid-info { background: var(--info); color: #fff; }
.pill.solid-serious { background: var(--serious); color: #fff; }
.pill.soft-good { background: var(--good-soft); color: var(--good-text); }
.pill.soft-warn { background: var(--warning-soft); color: var(--warning-text); }
.pill.soft-crit { background: var(--critical-soft); color: var(--critical-text); }
.pill.soft-serious { background: var(--serious-soft); color: var(--serious-text); }
.pill.soft-info { background: var(--info-soft); color: var(--info-text); }
.pill.soft-neutral { background: var(--neutral-soft); color: var(--neutral-text); }
.pill.soft-primary { background: var(--primary-soft); color: var(--primary-text); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--neutral-soft); color: var(--text-2); border-radius: 999px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.tag { display: inline-block; border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 12px; color: var(--text-2); background: var(--surface); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.pager { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; }
.pager .icon-btn { width: 26px; height: 26px; }
.pager .icon-btn svg { width: 14px; height: 14px; }
.select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 7px 30px 7px 12px;
  font-size: 13.5px; cursor: pointer; color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5'/%3E%3Cpath d='m7 9 5-5 5 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.select:hover { border-color: var(--border-strong); }
.input, .textarea {
  width: 100%; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 11px;
  font-size: 13.5px; color: var(--text);
}
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--primary-soft-2); border-color: var(--primary); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 180px; }
.input:disabled, .textarea:disabled, .select:disabled { opacity: .6; background: var(--surface-2); cursor: not-allowed; }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.search-input .input { padding-left: 30px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 6px; }
.table-wrap::-webkit-scrollbar { height: 10px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-weight: 500; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap; user-select: none; background: var(--bg);
}
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--text); }
table.data th .sort-ico { display: inline-block; margin-left: 4px; color: var(--primary-text); vertical-align: middle; }
table.data th .sort-ico svg { width: 12px; height: 12px; }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
table.data tr.row-link { cursor: pointer; }
table.data tr.row-link:hover td { background: var(--surface-2); }
table.data td .muted-dash { color: var(--muted); }
table.data td.num { font-variant-numeric: tabular-nums; }
table.data tr.group-row td { background: var(--surface-2); font-weight: 600; color: var(--text); padding: 8px 14px; }
table.data .task-link { color: var(--text); font-weight: 500; }
table.data .task-link:hover { color: var(--primary-text); }
table.bordered { border: 1px solid var(--border); }
table.bordered th, table.bordered td { border-right: 1px solid var(--border); white-space: normal; }
table.bordered th:last-child, table.bordered td:last-child { border-right: 0; }
table.bordered th { background: var(--surface-2); padding: 10px 14px; }
table.bordered th .th-sub { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
table.bordered td { padding: 10px 14px; }
.rows-count { color: var(--text-2); font-size: 13.5px; }

/* ---------- empty state ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 70px 20px 60px; color: var(--text-2);
}
.empty-ico { width: 40px; height: 40px; border-radius: 9px; background: var(--neutral-soft); display: grid; place-items: center; margin-bottom: 16px; color: var(--text); }
.empty-ico svg { width: 20px; height: 20px; }
.empty-ico.primary { background: var(--primary-soft); color: var(--primary-text); width: 56px; height: 56px; border-radius: 50%; }
.empty-ico.primary svg { width: 26px; height: 26px; }
.empty h3 { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0; font-size: 14.5px; }
.empty .btn { margin-top: 18px; }
.card.empty-card { max-width: 520px; margin: 60px auto; padding: 28px; }
.card.empty-card .empty { padding: 20px 10px; }

/* ---------- cards & grids ---------- */
.card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
.card.flat { background: transparent; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { font-size: 14.5px; font-weight: 600; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; font-weight: 400; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid.cols-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 1200px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-2-1, .grid.cols-3-2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.muted { color: var(--muted); } .text-2 { color: var(--text-2); } .small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.strong { font-weight: 600; }
.section-title { font-size: 18px; font-weight: 600; margin: 28px 0 12px; }
.section-title:first-child { margin-top: 0; }

/* stat tiles */
.stat { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 16px 18px; min-height: 108px; display: flex; flex-direction: column; }
.stat-label { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.stat-label svg { width: 14px; height: 14px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.1; }
.stat-value small { font-size: 15px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.stat-delta { margin-top: auto; padding-top: 8px; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.stat-delta.up { color: var(--good-text); } .stat-delta.down { color: var(--critical-text); }
.stat-delta svg { width: 13px; height: 13px; }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.list-item.clickable:hover { background: var(--surface-2); }
.list-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; background: var(--neutral-soft); color: var(--text-2); }
.list-ico svg { width: 16px; height: 16px; }
.list-ico.good { background: var(--good-soft); color: var(--good-text); }
.list-ico.crit { background: var(--critical-soft); color: var(--critical-text); }
.list-ico.warn { background: var(--warning-soft); color: var(--warning-text); }
.list-ico.info { background: var(--info-soft); color: var(--info-text); }
.list-ico.primary { background: var(--primary-soft); color: var(--primary-text); }
.list-ico.serious { background: var(--serious-soft); color: var(--serious-text); }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 500; font-size: 14px; }
.list-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.list-right { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* ---------- bullet bars ---------- */
.bullet { display: grid; grid-template-columns: 180px 1fr 100px; align-items: center; gap: 12px; padding: 7px 0; }
.bullet-label { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.bullet-label svg { width: 13px; height: 13px; flex: 0 0 auto; }
.bullet-track { position: relative; height: 10px; background: var(--neutral-soft); border-radius: 3px; }
.bullet-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--series-1); }
.bullet-target { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 1px; }
.bullet-val { font-size: 12.5px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- dropdown / popover ---------- */
.popover {
  position: absolute; z-index: 1000; min-width: 200px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; border: 0;
  background: transparent; text-align: left; cursor: pointer; font-size: 13.5px; color: var(--text); white-space: nowrap;
}
.menu-item svg { width: 15px; height: 15px; color: var(--text-2); flex: 0 0 auto; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.active { color: var(--primary-text); }
.menu-item .check { margin-left: auto; color: var(--primary-text); }
.menu-item .right { margin-left: auto; color: var(--muted); }
.menu-item .right svg { width: 13px; height: 13px; }
.menu-item.danger { color: var(--critical-text); }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-head { padding: 8px 10px 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.menu-head.big { font-size: 13.5px; color: var(--text); font-weight: 600; }
.menu-head .sub { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.menu-item.submenu { position: relative; }
.menu-item.submenu > .popover { display: none; left: calc(100% - 2px); top: -6px; }
.menu-item.submenu:hover > .popover { display: block; }
.popover.filter { min-width: 300px; padding: 12px; }
.popover .field { margin-bottom: 10px; }
.popover .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.checklist { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.checklist label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.checklist label:hover { background: var(--surface-2); }
.checklist input { accent-color: var(--primary); }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 900; background: rgba(10, 10, 15, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .12s ease-out;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; overflow: hidden; animation: pop .14s ease-out;
}
.modal.lg { width: min(880px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 12px; }
.modal-title { font-size: 17px; font-weight: 600; }
.modal-body { padding: 4px 22px 18px; overflow: auto; }
.modal-foot { padding: 12px 22px 18px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }
.modal-close { border: 0; background: transparent; color: var(--text-2); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--neutral-soft); }

/* account modal */
.account { display: grid; grid-template-columns: 220px 1fr; min-height: 560px; position: relative; }
.account .modal-close { position: absolute; top: 14px; right: 14px; }
.account-side { background: var(--sidebar-bg); padding: 26px 20px; border-right: 1px solid var(--border); }
.account-side h2 { font-size: 24px; font-weight: 700; }
.account-side .sub { color: var(--text-2); font-size: 13.5px; margin: 4px 0 20px; }
.account-side .sb-item { font-size: 14px; }
.account-side .sb-item.active { background: var(--neutral-soft); color: var(--text); }
.account-side .sb-item.active svg { color: var(--text); }
.account-main { padding: 26px 30px; }
.account-main h3 { font-size: 17px; font-weight: 600; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.acc-row { display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.acc-row:last-child { border-bottom: 0; }
.acc-row .k { font-size: 14px; }
.acc-row .v { display: flex; align-items: center; gap: 10px; font-size: 14px; min-width: 0; flex-wrap: wrap; }
.acc-row .link { color: var(--text); font-weight: 500; cursor: pointer; border: 0; background: transparent; font-size: 14px; padding: 4px 6px; border-radius: 6px; }
.acc-row .link:hover { background: var(--neutral-soft); }
.device { display: flex; gap: 12px; align-items: flex-start; }
.device-ico { width: 26px; height: 20px; background: var(--text); border-radius: 3px; margin-top: 3px; flex: 0 0 auto; }
.device .lines { color: var(--text-2); font-size: 13px; line-height: 1.6; }
.device .lines .t { color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.theme-opt { border: 1px solid var(--border); border-radius: 10px; padding: 10px; cursor: pointer; text-align: center; font-size: 13px; background: var(--surface); color: var(--text); }
.theme-opt.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft-2); }
.theme-opt .swatch { height: 44px; border-radius: 6px; margin-bottom: 8px; border: 1px solid var(--border); }
.theme-opt .swatch.light { background: linear-gradient(90deg, #f5f7fc 30%, #ffffff 30%); }
.theme-opt .swatch.dark { background: linear-gradient(90deg, #141416 30%, #222223 30%); }
.theme-opt .swatch.system { background: linear-gradient(90deg, #f5f7fc 50%, #222223 50%); }
.switch { position: relative; width: 36px; height: 20px; border-radius: 20px; background: var(--border-strong); border: 0; cursor: pointer; flex: 0 0 auto; transition: background .15s; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--primary); } .switch.on::after { left: 18px; }

/* ---------- toasts ---------- */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--text); color: var(--bg); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; animation: pop .15s ease-out; min-width: 240px; max-width: 420px;
}
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; }
.toast.good svg { color: #7ee29b; } .toast.crit svg { color: #f4a0a0; } .toast.info svg { color: #8dbbf2; }

/* ---------- command palette ---------- */
.palette { width: min(640px, 100%); align-self: flex-start; margin-top: 10vh; }
.palette .search-input .input { border: 0; border-radius: 0; padding: 16px 16px 16px 42px; font-size: 16px; border-bottom: 1px solid var(--border); background: transparent; }
.palette .search-input .input:focus { outline: none; }
.palette .search-input svg { left: 16px; width: 18px; height: 18px; }
.palette-list { max-height: 420px; overflow: auto; padding: 6px; }
.palette-group { font-size: 11.5px; color: var(--muted); padding: 10px 10px 4px; text-transform: uppercase; letter-spacing: .05em; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.palette-item svg { width: 16px; height: 16px; color: var(--text-2); }
.palette-item.active, .palette-item:hover { background: var(--primary-soft); }
.palette-item .meta { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette-foot { border-top: 1px solid var(--border); padding: 8px 14px; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }

/* ---------- announcements ---------- */
.ann { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 18px 20px; position: relative; }
.ann.unread { border-left: 3px solid var(--primary); }
.ann-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-title { font-size: 15.5px; font-weight: 600; }
.ann-meta { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.ann-body { color: var(--text-2); margin-top: 8px; line-height: 1.55; font-size: 14px; }
.ann-body ul { margin: 6px 0 0; padding-left: 20px; }
.ann-body p { margin: 0 0 6px; }
.ann-foot { margin-top: 12px; display: flex; gap: 8px; align-items: center; }

/* ---------- project guide ---------- */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 36px; }
.guide-body { max-width: 860px; }
.guide-body h2 { font-size: 20px; margin: 34px 0 10px; scroll-margin-top: 70px; }
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 { font-size: 15.5px; margin: 18px 0 6px; }
.guide-body p, .guide-body li { color: var(--text-2); line-height: 1.6; font-size: 14.5px; }
.guide-body p { margin: 0 0 10px; }
.guide-body ul, .guide-body ol { margin: 0 0 12px; padding-left: 22px; }
.guide-body code { background: var(--neutral-soft); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.guide-body table { margin: 8px 0 16px; }
.guide-body .callout { border-left: 3px solid var(--primary); background: var(--primary-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; color: var(--text); font-size: 14px; }
.guide-body .callout.warn { border-color: var(--warning); background: var(--warning-soft); color: var(--warning-text); }
.guide-toc { position: sticky; top: 70px; align-self: start; }
.guide-toc .t { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.guide-toc a { display: block; padding: 5px 10px; border-left: 2px solid var(--border); color: var(--text-2); font-size: 13.5px; }
.guide-toc a:hover, .guide-toc a.active { color: var(--primary-text); border-color: var(--primary); text-decoration: none; }
.step-list { counter-reset: s; list-style: none; padding: 0 !important; }
.step-list li { counter-increment: s; position: relative; padding-left: 36px; margin-bottom: 10px; }
.step-list li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-weight: 600; font-size: 12px; display: grid; place-items: center; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0 16px; }
.flow .fstep { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; background: var(--surface); font-size: 13px; }
.flow .fsep { color: var(--muted); display: inline-flex; }
.flow .fsep svg { width: 14px; height: 14px; }

/* ---------- task detail ---------- */
.task-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .task-layout { grid-template-columns: 1fr; } }
.task-side { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 16px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; justify-content: space-between; }
.field .req { color: var(--critical); margin-left: 2px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; font-size: 14px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tab svg { width: 14px; height: 14px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary-text); border-color: var(--primary); font-weight: 500; }
.tab .n { font-size: 11px; background: var(--neutral-soft); border-radius: 10px; padding: 0 6px; color: var(--text-2); }
.pref-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pref-opt { border: 1px solid var(--border); border-radius: 8px; padding: 8px 4px; text-align: center; font-size: 11.5px; cursor: pointer; background: var(--surface); color: var(--text-2); line-height: 1.25; }
.pref-opt:hover { border-color: var(--border-strong); }
.pref-opt.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); font-weight: 500; }
.pref-opt b { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.pref-opt.active b { color: var(--primary-text); }
.pref-opt:disabled { cursor: not-allowed; opacity: .7; }
.criteria-row { display: grid; grid-template-columns: 1fr 120px 150px 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.criteria-head { display: grid; grid-template-columns: 1fr 120px 150px 32px; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 6px; padding: 0 2px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.active { background: var(--primary-soft); color: var(--primary-text); font-weight: 500; }
.seg button:disabled { cursor: not-allowed; }
.qc-list { display: flex; flex-direction: column; gap: 6px; }
.qc-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.qc-item svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.qc-item.pass svg { color: var(--good); } .qc-item.fail svg { color: var(--critical); } .qc-item.warn svg { color: var(--warning); } .qc-item.pending svg { color: var(--muted); }
.qc-item .qc-msg { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.qc-item.running svg { animation: spin 1s linear infinite; color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 14px; font-size: 13px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.tl-item.good::before { border-color: var(--good); background: var(--good); }
.tl-item.crit::before { border-color: var(--critical); background: var(--critical); }
.tl-item.info::before { border-color: var(--info); background: var(--info); }
.tl-item.primary::before { border-color: var(--primary); background: var(--primary); }
.tl-item.serious::before { border-color: var(--serious); background: var(--serious); }
.tl-item .tl-t { font-weight: 500; }
.tl-item .tl-m { color: var(--muted); font-size: 12px; }
.tl-item .tl-b { color: var(--text-2); margin-top: 3px; }
.review-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); }
.review-card .rh { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.review-card .rb { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.score-ring { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; font-weight: 600; font-size: 15px; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .diff-grid { grid-template-columns: 1fr; } }
.code-box { border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; line-height: 1.55; max-height: 420px; overflow: auto; }
.code-box-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.locked { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.locked svg { width: 13px; height: 13px; }
.tag-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker .tagbtn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; color: var(--text-2); }
.tag-picker .tagbtn.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.tag-picker .tagbtn:disabled { cursor: not-allowed; }
.tag-picker .tagbtn.needed::after { content: " •"; color: var(--warning); }

/* ---------- help ---------- */
.faq { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; margin-left: auto; flex: 0 0 auto; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .faq-body { padding: 0 18px 16px 18px; color: var(--text-2); line-height: 1.55; font-size: 14px; }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 12px; padding: 12px 10px; border-radius: 8px; cursor: pointer; align-items: flex-start; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--primary-soft); }
.notif.unread:hover { background: var(--primary-soft-2); }
.notif .nb { flex: 1; min-width: 0; }
.notif .nt { font-size: 13.5px; }
.notif .nm { color: var(--muted); font-size: 12px; margin-top: 2px; }
.notif .ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: 0 0 auto; }
.popover.notif-pop { width: 380px; padding: 0; }
.notif-pop .nh { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.notif-pop .nl { max-height: 420px; overflow: auto; padding: 6px; }
.notif-pop .nf { border-top: 1px solid var(--border); padding: 8px; text-align: center; }

/* ---------- charts ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .bar { fill: var(--series-1); }
.chart .bar.s2 { fill: var(--series-2); }
.chart .bar.s3 { fill: var(--series-3); }
.chart .bar.s4 { fill: var(--series-4); }
.chart .bar.good { fill: var(--good); } .chart .bar.crit { fill: var(--critical); } .chart .bar.serious { fill: var(--serious); } .chart .bar.info { fill: var(--info); }
.chart .bar.muted { fill: var(--axis); }
.chart .bar.dim { opacity: .35; }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s2 { stroke: var(--series-2); }
.chart .area { fill: var(--series-1); opacity: .08; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .dot.s2 { fill: var(--series-2); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .crosshair { stroke: var(--text-2); stroke-width: 1; opacity: 0; }
.chart .hover-dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; opacity: 0; }
.chart .label { fill: var(--text-2); font-size: 11px; }
.chart .label.strong { fill: var(--text); font-weight: 600; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 12.5px; white-space: nowrap; display: none; color: var(--text);
}
.chart-tip .tt { color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.chart-tip .tr { display: flex; align-items: center; gap: 7px; }
.chart-tip .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); } .sw.s3 { background: var(--series-3); } .sw.s4 { background: var(--series-4); }
.sw.good { background: var(--good); } .sw.crit { background: var(--critical); } .sw.serious { background: var(--serious); } .sw.info { background: var(--info); } .sw.muted { background: var(--axis); }
.chart-table { margin-top: 10px; }
.chart-table table.data th, .chart-table table.data td { padding: 6px 10px; font-size: 12.5px; }
.sparkline { display: block; height: 28px; width: 100%; }
.sparkline path { fill: none; stroke: var(--series-1); stroke-width: 1.5; }
.sparkline .sa { fill: var(--series-1); opacity: .1; stroke: none; }

/* ---------- misc ---------- */
.dim { opacity: .55; }
.score { font-variant-numeric: tabular-nums; font-weight: 500; }
.score.good { color: var(--good-text); } .score.warn { color: var(--warning-text); } .score.crit { color: var(--critical-text); }
.eye { color: var(--muted); display: inline-flex; vertical-align: middle; }
.eye svg { width: 15px; height: 15px; }
.world-name { font-weight: 500; color: var(--text); display: inline-flex; align-items: center; gap: 10px; }
.fade-in { animation: fade .18s ease-out; }
.ratio-bar { display: flex; height: 8px; border-radius: 3px; overflow: hidden; gap: 2px; background: transparent; }
.ratio-bar span { display: block; height: 100%; }
.ratio-bar .good { background: var(--good); } .ratio-bar .crit { background: var(--critical); } .ratio-bar .serious { background: var(--serious); } .ratio-bar .info { background: var(--info); } .ratio-bar .neutral { background: var(--axis); }
.inline-ico { width: 14px; height: 14px; vertical-align: -2px; }
.pre-wrap { white-space: pre-wrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 780px) {
  .sidebar { position: fixed; z-index: 50; left: 0; transform: translateX(-100%); }
  .app.mobile-open .sidebar { transform: none; }
  .page-head { flex-direction: column; }
  .view { padding: 18px 16px 40px; }
  .task-layout { grid-template-columns: 1fr; }
  .guide { grid-template-columns: 1fr; }
  .guide-toc { display: none; }
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .acc-row { grid-template-columns: 1fr; gap: 6px; }
  .account { grid-template-columns: 1fr; }
  .account-side { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media print {
  .sidebar, .topbar { display: none; }
  .view { padding: 0; }
}
