/* =========================================================
   BidCore — 标讯智核
   Editorial intelligence UI · warm paper + deep forest + lime
   ========================================================= */

:root {
  /* Bootstrap 5.3 theme palette */
  --bs-blue: #0d6efd;
  --bs-indigo: #6610f2;
  --bs-purple: #6f42c1;
  --bs-pink: #d63384;
  --bs-red: #dc3545;
  --bs-orange: #fd7e14;
  --bs-yellow: #ffc107;
  --bs-green: #198754;
  --bs-teal: #20c997;
  --bs-cyan: #0dcaf0;
  --bs-primary: #0d6efd;
  --bs-secondary: #6c757d;
  --bs-success: #198754;
  --bs-info: #0dcaf0;
  --bs-warning: #ffc107;
  --bs-danger: #dc3545;
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
  --bs-border-color: #dee2e6;

  --bg: #f8f9fa;
  --bg-soft: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #f8f9fa;
  --surface-3: #e9ecef;
  --ink: #212529;
  --ink-2: #343a40;
  --muted: #6c757d;
  --muted-2: #adb5bd;
  --line: #dee2e6;
  --line-strong: #ced4da;
  --green: #198754;
  --green-deep: #0f5132;
  --green-soft: #d1e7dd;
  --lime: #0d6efd;
  --lime-deep: #0b5ed7;
  --mint: #20c997;
  --amber: #997404;
  --amber-soft: #fff3cd;
  --red: #dc3545;
  --red-soft: #f8d7da;
  --blue: #0d6efd;
  --blue-soft: #cfe2ff;
  --gold: #997404;
  --sidebar: #212529;
  --sidebar-2: #1c1f23;
  --shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
  --shadow-lg: 0 .5rem 1rem rgba(0, 0, 0, .15);
  --radius: 12px;
  --radius-sm: 8px;
  --serif: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  background:
    radial-gradient(1000px 540px at 12% -10%, rgba(215, 243, 107, .16), transparent 65%),
    radial-gradient(800px 500px at 96% 4%, rgba(45, 212, 167, .07), transparent 60%),
    linear-gradient(180deg, #f6f4ed 0%, var(--bg) 55%, #efede4 100%);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherited; }
button { font-family: var(--sans); cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 999;
  transform: translateY(-150%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- boot ---------- */
.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: var(--sidebar);
  color: #fff;
}
.boot-mark { display: flex; gap: 5px; align-items: flex-end; height: 44px; }
.boot-mark span { width: 9px; border-radius: 3px; background: var(--lime); animation: bootBar 1s ease-in-out infinite alternate; }
.boot-mark span:nth-child(1) { height: 22px; animation-delay: -.3s; }
.boot-mark span:nth-child(2) { height: 38px; background: var(--mint); animation-delay: -.15s; }
.boot-mark span:nth-child(3) { height: 30px; animation-delay: 0s; }
@keyframes bootBar { from { transform: scaleY(.5); opacity: .5; } to { transform: scaleY(1); opacity: 1; } }
.boot-name { font-family: var(--mono); letter-spacing: .32em; font-size: 13px; color: var(--lime); }
.boot-text { font-size: 12px; color: rgba(255, 255, 255, .45); letter-spacing: .06em; }

/* ---------- shell ---------- */
.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar-backdrop { display: none; }
.sidebar {
  width: 254px;
  flex: 0 0 254px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(420px 300px at 20% 0%, rgba(45, 212, 167, .10), transparent 70%),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  color: #dfe8e4;
  padding: 24px 16px 18px;
  border-right: 1px solid rgba(255, 255, 255, .05);
  overflow: hidden;
  z-index: 40;
}
.sidebar::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 26px; position: relative; z-index: 1; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(145deg, #14261f, #0c1813);
  border: 1px solid rgba(215, 243, 107, .25);
  display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.brand-mark i { display: block; width: 4px; border-radius: 1px; background: var(--lime); }
.brand-mark i:nth-child(1) { height: 10px; opacity: .75; }
.brand-mark i:nth-child(2) { height: 17px; background: var(--mint); }
.brand-mark i:nth-child(3) { height: 13px; opacity: .85; }
.brand-copy { line-height: 1.15; }
.brand-copy strong { display: block; font-size: 16px; letter-spacing: .03em; color: #fff; font-weight: 650; }
.brand-copy span { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: .26em; color: rgba(215,243,107,.7); margin-top: 4px; }
.sidebar-scroll { flex: 1; overflow-y: auto; position: relative; z-index: 1; scrollbar-width: none; }
.sidebar-scroll::-webkit-scrollbar { display: none; }
.nav-section { margin: 0 0 18px; }
.nav-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: rgba(255,255,255,.3); padding: 0 12px 8px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: 10px; color: rgba(228, 238, 233, .66);
  font-size: 13.5px; font-weight: 500;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.045); color: #fff; }
.nav-item.active { background: rgba(215, 243, 107, .10); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px;
  background: var(--lime); border-radius: 0 3px 3px 0;
}
.nav-item .icon { color: rgba(215, 243, 107, .55); transition: color .18s; }
.nav-item.active .icon, .nav-item:hover .icon { color: var(--lime); }
.nav-badge {
  margin-left: auto; font-family: var(--mono); font-size: 9.5px; line-height: 1;
  padding: 4px 6px; border-radius: 5px; color: var(--lime);
  background: rgba(215,243,107,.12); border: 1px solid rgba(215,243,107,.16);
}
.nav-badge.alert { color: #ffb59e; background: rgba(180,71,47,.18); border-color: rgba(255,140,110,.18); }
.sidebar-foot { position: relative; z-index: 1; padding-top: 12px; }
.aegis-mini {
  border: 1px solid rgba(215,243,107,.14);
  background: linear-gradient(135deg, rgba(215,243,107,.07), rgba(45,212,167,.03));
  border-radius: 13px; padding: 12px 13px; margin-bottom: 12px;
}
.aegis-mini-head { display: flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(255,255,255,.55); }
.aegis-mini-head .pulse-dot { margin-left: auto; }
.aegis-mini strong { display: block; color: #fff; font-size: 12.5px; margin-top: 7px; font-weight: 550; }
.aegis-mini small { color: rgba(255,255,255,.34); font-size: 10px; }
.sidebar-user {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px;
  border-radius: 11px; transition: background .18s;
}
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.avatar {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--lime), var(--mint));
  color: var(--sidebar); font-weight: 750; font-size: 13px;
  flex: 0 0 auto;
}
.avatar.dark { background: linear-gradient(145deg, #2b4439, #172b22); color: var(--lime); border: 1px solid rgba(215,243,107,.2); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; border-radius: 7px; }
.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy strong { display: block; font-size: 12px; color: #fff; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-copy span { display: block; font-size: 10px; color: rgba(255,255,255,.35); }
.sidebar-foot .icon { color: rgba(255,255,255,.4); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 72px; padding: 0 34px;
  display: flex; align-items: center; gap: 18px;
  border-bottom: 1px solid rgba(210, 204, 189, .65);
  background: rgba(247, 245, 239, .72);
  backdrop-filter: blur(18px);
  position: sticky; top: 0; z-index: 30;
}
.topbar-crumbs { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); min-width: 0; }
.topbar-crumbs .sep { opacity: .45; }
.topbar-crumbs strong { color: var(--ink); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.command-trigger {
  display: flex; align-items: center; gap: 9px;
  width: 236px; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); background: rgba(255,253,248,.7);
  border-radius: 10px; color: var(--muted); font-size: 12px; text-align: left;
  transition: border-color .18s, background .18s;
}
.command-trigger:hover { border-color: var(--line-strong); background: var(--surface); }
.command-trigger kbd {
  margin-left: auto; font-family: var(--mono); font-size: 9px; padding: 2px 5px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); color: var(--muted-2);
}
.topbar-btn {
  position: relative;
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2);
  transition: background .18s, border-color .18s;
}
.topbar-btn:hover { background: var(--surface); border-color: var(--line); }
.topbar-actions { display: flex; align-items: center; gap: 7px; }
.topbar-login { display: flex; align-items: center; gap: 8px; }
.mobile-menu { display: none !important; }

.tier { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 10px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.tier-pro { color: #6e5214; background: linear-gradient(135deg, #f5e3b3, #ecd18a); border: 1px solid #e4c471; }
.tier-admin { color: var(--green-deep); background: var(--lime); }
.tier-free, .tier-guest { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }

.page {
  width: 100%; max-width: 1500px; margin: 0 auto;
  padding: 32px 34px 72px;
  animation: pageIn .42s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--green);
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .55; }
.eyebrow.no-rule::before { display: none; }
h1, h2, h3, h4, p { margin-top: 0; }
.display {
  font-family: var(--serif); font-weight: 500; letter-spacing: -.035em;
  line-height: 1.08; color: var(--ink);
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-head h1 { font-size: 38px; margin: 9px 0 7px; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin: 0; max-width: 680px; }
.page-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.section-title .count { font-family: var(--mono); font-size: 10px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 20px; padding: 2px 7px; }
.panel-sub { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.tabular { font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 10px;
  border: 1px solid transparent; font-size: 13px; font-weight: 550; white-space: nowrap;
  transition: transform .15s ease, background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 8px 20px -12px rgba(16,27,24,.65); }
.btn-primary:hover { background: #1b2c26; }
.btn-lime { background: var(--lime); color: var(--ink); box-shadow: 0 10px 26px -14px rgba(185,221,62,.8); }
.btn-lime:hover { background: #e2fa83; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--line-strong); background: #fff; }
.btn-soft { background: var(--surface-2); color: var(--ink-2); border-color: transparent; }
.btn-soft:hover { background: var(--surface-3); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.18); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; gap: 5px; }
.btn-xs { height: 27px; padding: 0 8px; font-size: 10.5px; border-radius: 7px; gap: 4px; }
.btn-block { width: 100%; height: 46px; }
.btn .icon { flex: 0 0 auto; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2);
  transition: background .18s, border-color .18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn.active { background: var(--green); border-color: var(--green); color: #fff; }
.link-btn { border: 0; background: none; padding: 0; color: var(--green); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; font-weight: 550; }
.link-btn:hover { text-decoration: underline; }

/* ---------- hero / dashboard ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.hero-main { min-width: 0; }
.hero h1 { font-size: clamp(34px, 3.4vw, 46px); margin: 12px 0 10px; }
.hero h1 em { font-style: italic; color: var(--green); }
.hero-sub { color: var(--muted); font-size: 13.5px; max-width: 640px; margin: 0; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.dateline { text-align: right; line-height: 1.1; }
.dateline strong { display: block; font-family: var(--serif); font-size: 44px; font-weight: 500; letter-spacing: -.04em; }
.dateline span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hero-note { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 14px; min-height: 142px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.kpi-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.kpi-icon.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-icon.lime { background: #f3f8d8; color: #627d12; }
.kpi-value { font-family: var(--serif); font-size: 38px; line-height: 1; letter-spacing: -.04em; margin: 16px 0 7px; font-weight: 500; }
.kpi-value small { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 2px; color: var(--green); font-weight: 600; font-size: 10.5px; }
.delta.down { color: var(--red); }
.kpi-spark { position: absolute; right: 12px; bottom: 10px; width: 92px; height: 34px; opacity: .85; }
.sparkline { width: 100%; height: 100%; overflow: visible; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); gap: 16px; margin-bottom: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 21px 22px; box-shadow: var(--shadow); min-width: 0;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.panel-head h2 { font-size: 16px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 3px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 11.5px; }
.panel-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.legend { display: flex; align-items: center; gap: 12px; font-size: 10.5px; color: var(--muted); }
.legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 4px; }
.chart-wrap { margin: 4px -6px 0; }
.trend-chart { width: 100%; height: auto; overflow: visible; color: var(--ink); }
.chart-axis { font-family: var(--mono); font-size: 9px; fill: var(--muted-2); }
.chart-dot circle:last-child { transition: r .15s; }
.chart-dot:hover circle:last-child { r: 5; }
.range-tabs { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; }
.range-tabs button { border: 0; background: none; font-size: 10.5px; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.range-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.aegis-panel {
  background:
    radial-gradient(460px 280px at 90% 0%, rgba(45,212,167,.15), transparent 70%),
    radial-gradient(360px 260px at 0% 100%, rgba(215,243,107,.08), transparent 70%),
    linear-gradient(150deg, #102019, #0a1511 55%, #0c1a15);
  color: #eaf2ee; border: 1px solid rgba(215,243,107,.12); position: relative; overflow: hidden;
}
.aegis-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(215,243,107,.22) .6px, transparent .6px);
  background-size: 13px 13px;
  mask-image: linear-gradient(130deg, transparent 40%, #000);
}
.aegis-panel .panel-head { position: relative; z-index: 1; margin-bottom: 10px; }
.aegis-panel h2 { color: #fff; }
.aegis-panel .panel-head p { color: rgba(255,255,255,.42); }
.aegis-status { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; color: var(--lime); }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(45,212,167,.5); animation: pulse 2.4s infinite; flex: 0 0 auto; }
.pulse-dot.amber { background: #e0a23c; box-shadow: 0 0 0 0 rgba(224,162,60,.45); }
.pulse-dot.red { background: #e36e51; box-shadow: 0 0 0 0 rgba(227,110,81,.45); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(45,212,167,.45); } 70% { box-shadow: 0 0 0 8px rgba(45,212,167,0); } 100% { box-shadow: 0 0 0 0 rgba(45,212,167,0); } }
.aegis-metric { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 12px; margin: 15px 0 14px; }
.aegis-metric strong { font-family: var(--serif); font-size: 44px; line-height: .9; font-weight: 500; color: var(--lime); letter-spacing: -.05em; }
.aegis-metric span { color: rgba(255,255,255,.48); font-size: 10.5px; line-height: 1.5; }
.aegis-list { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1px; }
.aegis-item { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.07); align-items: flex-start; }
.aegis-item:first-child { border-top: 0; }
.aegis-item .a-icon { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: rgba(215,243,107,.09); color: var(--lime); flex: 0 0 auto; margin-top: 1px; }
.aegis-item .a-copy { min-width: 0; flex: 1; }
.aegis-item strong { display: block; font-size: 11px; font-weight: 550; color: rgba(255,255,255,.86); line-height: 1.45; }
.aegis-item small { display: block; color: rgba(255,255,255,.34); font-size: 9.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aegis-item time { font-family: var(--mono); font-size: 8.5px; color: rgba(255,255,255,.26); white-space: nowrap; margin-top: 2px; }
.aegis-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); margin-top: 10px; padding-top: 11px; font-size: 9.5px; color: rgba(255,255,255,.36); }
.aegis-foot a { color: var(--lime); display: inline-flex; align-items: center; gap: 3px; }

.split-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; }
.notice-table { width: 100%; border-collapse: collapse; }
.notice-table th {
  text-align: left; font-size: 9.5px; font-weight: 500; letter-spacing: .1em; color: var(--muted);
  text-transform: uppercase; padding: 0 10px 10px; border-bottom: 1px solid var(--line);
}
.notice-table td { padding: 13px 10px; border-bottom: 1px solid rgba(228,224,212,.7); vertical-align: middle; }
.notice-table tr:last-child td { border-bottom: 0; }
.notice-table tbody tr { cursor: pointer; transition: background .15s; }
.notice-table tbody tr:hover { background: rgba(248,246,238,.8); }
.notice-table th:first-child, .notice-table td:first-child { padding-left: 0; }
.notice-table th:last-child, .notice-table td:last-child { padding-right: 0; }
.cell-title { max-width: 390px; }
.cell-title strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 550; font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.cell-title small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cell-title small .dot { display: inline-block; width: 3px; height: 3px; margin: 0 5px; background: var(--muted-2); border-radius: 50%; vertical-align: middle; }
.dashboard-table { table-layout: fixed; }
.dashboard-table th:nth-child(2), .dashboard-table td:nth-child(2),
.dashboard-table th:nth-child(4), .dashboard-table td:nth-child(4) { display: none; }
.dashboard-table th:nth-child(3), .dashboard-table td:nth-child(3) { width: 156px; }
.dashboard-table th:nth-child(5), .dashboard-table td:nth-child(5) { width: 78px; }
.dashboard-table th:nth-child(6), .dashboard-table td:nth-child(6) { width: 110px; min-width: 110px; }
.dashboard-table .contact-mini { font-size: 9px; gap: 4px; }
.dashboard-table .cell-company { max-width: 148px; }
.cell-company { font-size: 11.5px; color: var(--ink-2); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-company.win { color: var(--green); font-weight: 550; }
.cell-company.empty { color: var(--muted-2); }
.cell-date { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.contact-mini { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.notice-table th:last-child, .notice-table td:last-child { min-width: 92px; }
.list-table .cell-title { max-width: 500px; }
.contact-mini.locked { color: var(--amber); }
.type-badge {
  display: inline-flex; align-items: center; height: 21px; padding: 0 7px;
  border-radius: 5px; font-size: 9.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.type-badge.success { color: var(--green-deep); background: #e4f2e9; }
.type-badge.blue { color: var(--blue); background: var(--blue-soft); }
.type-badge.amber { color: var(--amber); background: var(--amber-soft); }
.type-badge.muted { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }

.region-list { display: flex; flex-direction: column; gap: 12px; }
.region-row { display: grid; grid-template-columns: 64px 1fr 30px; align-items: center; gap: 10px; font-size: 11px; }
.region-row span:first-child { color: var(--ink-2); }
.region-bar { height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.region-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green), #4a9b80); }
.region-row:nth-child(2) .region-bar i { background: linear-gradient(90deg, #1b7a62, #71b89f); }
.region-row:nth-child(3) .region-bar i { background: linear-gradient(90deg, #2f8a71, #9bcbb9); }
.region-row b { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: right; font-weight: 500; }
.industry-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.industry-chips span { font-size: 10px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--surface-2); }
.industry-chips b { color: var(--ink); font-family: var(--mono); font-weight: 500; margin-left: 4px; }

.upgrade-banner {
  margin-top: 16px; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 22px; justify-content: space-between;
  padding: 22px 26px; border-radius: var(--radius);
  background: linear-gradient(110deg, #0b1813, #11261e 60%, #1b3a2b);
  color: #fff; border: 1px solid rgba(215,243,107,.14);
}
.upgrade-banner::before {
  content: ""; position: absolute; width: 240px; height: 240px; right: 190px; top: -120px;
  border: 1px solid rgba(215,243,107,.18); border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(215,243,107,.03), 0 0 0 60px rgba(215,243,107,.02);
}
.upgrade-banner-copy { position: relative; z-index: 1; }
.upgrade-banner h3 { font-family: var(--serif); font-size: 23px; font-weight: 500; margin: 0 0 5px; letter-spacing: -.02em; }
.upgrade-banner h3 em { color: var(--lime); font-style: normal; }
.upgrade-banner p { margin: 0; color: rgba(255,255,255,.46); font-size: 11.5px; }
.upgrade-banner .btn { position: relative; z-index: 1; flex: 0 0 auto; }
.banner-pro { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; color: rgba(255,255,255,.7); font-size: 12px; }
.banner-pro .icon { color: var(--lime); }

/* ---------- filter chips ---------- */
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  color: var(--muted); font-size: 11px; transition: background .18s, border-color .18s, color .18s;
}
.filter-chip span { font-family: var(--mono); font-size: 8.5px; color: var(--muted-2); }
.filter-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-chip.active span { color: rgba(255,255,255,.55); }

/* ---------- user menu ---------- */
.user-menu-wrap { position: relative; }
.user-menu-trigger {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 7px 0 9px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2);
}
.user-menu-trigger:hover { background: var(--surface); border-color: var(--line); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 218px; z-index: 120;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 22px 50px -22px rgba(16,27,24,.4); padding: 6px;
  animation: menuIn .16s ease both;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.user-menu-head { display: flex; align-items: center; gap: 9px; padding: 9px 8px 11px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.user-menu-head strong { display: block; font-size: 11.5px; }
.user-menu-head small { display: block; color: var(--muted); font-size: 9px; }
.user-menu > a, .user-menu > button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 0;
  background: transparent; border-radius: 7px; color: var(--ink-2); font-size: 11px; text-align: left;
}
.user-menu > a:hover, .user-menu > button:hover { background: var(--surface-2); color: var(--ink); }
.user-menu > button.danger { color: var(--red); }
.user-menu > button.danger:hover { background: var(--red-soft); }
.notify-dot {
  position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); border: 1px solid var(--surface);
}

/* ---------- run status ---------- */
.run-status {
  display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px;
  border-radius: 5px; font-size: 9.5px; font-weight: 600;
}
.run-status.success { background: var(--green-soft); color: var(--green-deep); }
.run-status.partial { background: var(--amber-soft); color: var(--amber); }
.run-status.failed { background: var(--red-soft); color: var(--red); }
.run-status.running { background: var(--blue-soft); color: var(--blue); }
.run-status.idle { background: var(--surface-2); color: var(--muted); }
.run-status .pulse-dot { width: 5px; height: 5px; }

/* ---------- filters / list page ---------- */
.search-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px;
}
.search-main { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 0 12px; height: 52px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.search-main:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15,107,84,.07); }
.search-main .icon { color: var(--muted); flex: 0 0 auto; }
.search-main input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); }
.search-main input::placeholder { color: var(--muted-2); }
.search-main kbd { font-family: var(--mono); font-size: 9px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 5px; padding: 2px 6px; color: var(--muted); }
.search-main .btn { height: 34px; }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.filter-select {
  height: 34px; padding: 0 28px 0 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface) 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='%2373817b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--ink-2); font-size: 11.5px; appearance: none; cursor: pointer;
}
.filter-select:hover { border-color: var(--line-strong); }
.filter-sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.filter-toggle { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); border: 0; background: none; padding: 5px; }
.filter-toggle:hover { color: var(--ink); }
.filter-toggle .icon { transition: transform .2s; }
.filter-toggle.open .icon { transform: rotate(180deg); }
.advanced-row { display: none; gap: 9px; align-items: center; flex-wrap: wrap; padding-top: 13px; margin-top: 13px; border-top: 1px dashed var(--line); }
.advanced-row.open { display: flex; }
.field-label { font-size: 10px; color: var(--muted); margin-right: -3px; }
.text-input, .date-input {
  height: 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--ink); padding: 0 9px; font-size: 11.5px; outline: none;
}
.text-input:focus, .date-input:focus { border-color: var(--green); }
.text-input.w-sm { width: 86px; }
.results-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.results-count { font-size: 12px; color: var(--muted); }
.results-count strong { color: var(--ink); font-family: var(--mono); font-size: 13px; }
.active-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.active-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 5px; background: var(--green-soft); color: var(--green-deep); font-size: 10px; border: 1px solid #cfe2d8; }
.active-chip button { border: 0; background: none; color: inherit; padding: 0; display: grid; place-items: center; opacity: .6; }
.active-chip button:hover { opacity: 1; }
.results-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.table-panel { padding: 6px 20px 4px; }
.table-wrap { overflow-x: auto; }
.list-table th { padding-top: 14px; }
.list-table td { padding-top: 15px; padding-bottom: 15px; }
.list-table .cell-title { max-width: 430px; }
.empty-cell { text-align: center; padding: 50px 20px !important; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px 12px; border-top: 1px solid var(--line); margin-top: 2px; }
.pagination-info { font-size: 10.5px; color: var(--muted); font-family: var(--mono); }
.pager { display: flex; align-items: center; gap: 4px; }
.pager button { min-width: 30px; height: 30px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 11px; display: grid; place-items: center; }
.pager button:hover { background: var(--surface-2); color: var(--ink); }
.pager button.active { background: var(--ink); color: #fff; }
.pager button:disabled { opacity: .3; }
.pager .ellipsis { color: var(--muted-2); padding: 0 3px; font-size: 10px; }

/* ---------- detail ---------- */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb .icon { opacity: .5; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 18px; align-items: start; }
.detail-main { min-width: 0; }
.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin-bottom: 16px; }
.detail-head { display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; }
.detail-head-main { min-width: 0; }
.detail-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 13px; }
.detail-title { font-family: var(--serif); font-size: clamp(26px, 2.7vw, 36px); line-height: 1.25; font-weight: 500; letter-spacing: -.03em; margin: 0 0 14px; }
.detail-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.detail-meta span { display: inline-flex; align-items: center; gap: 5px; }
.detail-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 24px; }
.fact { background: var(--surface); padding: 14px 15px; min-height: 75px; }
.fact-label { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.fact-value { font-size: 12.5px; color: var(--ink); font-weight: 550; line-height: 1.45; word-break: break-word; }
.fact-value.money { font-family: var(--mono); color: var(--green); font-size: 13px; }
.fact-value.blank { color: var(--muted-2); font-weight: 400; }
.detail-section { margin-top: 26px; }
.detail-section h2 { font-size: 13px; font-weight: 600; letter-spacing: .01em; margin: 0 0 13px; display: flex; align-items: center; gap: 8px; }
.detail-section h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.notice-body { font-size: 13px; line-height: 1.95; color: var(--ink-2); word-break: break-word; }
.notice-body > p { margin: 0 0 10px; }
.body-field { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 5px 0; border-bottom: 1px dashed rgba(228,224,212,.7); }
.body-field:last-child { border-bottom: 0; }
.body-field > span { color: var(--muted); font-size: 11px; padding-top: 1px; }
.body-field > p { margin: 0; font-size: 12.5px; color: var(--ink); }
.body-gap { height: 7px; }
.body-table { margin: 12px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
.body-table table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.body-table th, .body-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.body-table th { background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 600; white-space: nowrap; }
.body-table.kv-table tbody th {
  width: 28%; color: var(--ink-2); font-size: 11.5px; font-weight: 550;
  white-space: normal; vertical-align: top; background: #FAFBF8;
}
.body-table.kv-table tbody td { font-size: 11.5px; line-height: 1.7; }
.body-table tr:last-child td { border-bottom: 0; }
.body-table td { color: var(--ink-2); }
@media (max-width: 620px) { .body-field { grid-template-columns: 84px minmax(0, 1fr); gap: 8px; } }
.detail-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.contact-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.contact-head-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.contact-head strong { font-size: 12.5px; display: block; }
.contact-head small { font-size: 9.5px; color: var(--muted); display: block; }
.contact-head .tier { margin-left: auto; }
.contact-body { padding: 16px 18px; }
.contact-line { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line .icon { color: var(--muted); margin-top: 2px; flex: 0 0 auto; }
.contact-line .c-label { font-size: 9px; color: var(--muted); display: block; }
.contact-line .c-value { font-size: 12.5px; color: var(--ink); font-weight: 500; word-break: break-all; }
.contact-line .c-value.mono { font-family: var(--mono); letter-spacing: -.01em; }
.contact-line .copy-btn { margin-left: auto; border: 0; background: var(--surface-2); color: var(--muted); width: 25px; height: 25px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 auto; }
.contact-line .copy-btn:hover { background: var(--green-soft); color: var(--green); }
.contact-locked { position: relative; }
.contact-locked .locked-value { filter: blur(3.5px); user-select: none; color: var(--muted); }
.contact-lock-overlay { display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 11px 12px; border-radius: 9px; background: linear-gradient(120deg, #fbf4e2, #f7f2e1); border: 1px solid #eadcb9; color: #775a1e; }
.contact-lock-overlay .icon { flex: 0 0 auto; }
.contact-lock-overlay strong { display: block; font-size: 10.5px; }
.contact-lock-overlay small { display: block; font-size: 9px; color: #9b7d42; }
.contact-unlock { padding: 13px 18px 16px; border-top: 1px solid var(--line); }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow); }
.source-card h3 { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin: 0 0 12px; }
.source-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; padding: 6px 0; }
.source-row span { color: var(--muted); }
.source-row strong { font-weight: 550; color: var(--ink-2); text-align: right; }
.attachment-count { float: right; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.attachment-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.attachment-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-bottom: 1px dashed rgba(228,224,212,.7); text-decoration: none; }
.attachment-row:last-child { border-bottom: 0; }
.attachment-row.locked { opacity: .72; }
.attachment-icon { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 6px; background: var(--blue-soft); color: var(--blue); margin-top: 1px; }
.attachment-row.locked .attachment-icon { background: var(--surface-2); color: var(--muted); }
.attachment-copy { min-width: 0; display: block; flex: 1; text-decoration: none; }
.attachment-copy strong { display: block; color: var(--ink-2); font-size: 10.5px; font-weight: 550; line-height: 1.4; word-break: break-all; }
.attachment-copy small { display: block; color: var(--muted); font-size: 8.5px; margin-top: 2px; }
.attachment-preview-btn {
  flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--muted); cursor: pointer; margin-top: 1px;
}
.attachment-preview-btn:hover { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.attachment-viewer-shell .modal { max-width: 1000px; width: calc(100vw - 32px); }
.attachment-preview-stage {
  height: min(72vh, 680px); min-height: 360px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: #f8f9fa;
}
.attachment-preview-stage flyfish-file-viewer { width: 100%; height: 100%; display: block; }
.attachment-preview-loading,
.attachment-preview-error {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--muted); font-size: 12px; text-align: center; padding: 24px;
}
.attachment-preview-error strong { color: var(--red); font-size: 13px; }
.attachment-preview-error span { max-width: 460px; line-height: 1.6; }
.quality-mini { display: flex; align-items: center; gap: 12px; padding: 10px 0 3px; }
.quality-ring { position: relative; width: var(--ring-size); height: var(--ring-size); display: grid; place-items: center; flex: 0 0 auto; }
.quality-ring svg { position: absolute; inset: 0; }
.quality-ring span { font-family: var(--mono); font-size: 15px; color: var(--ink); font-weight: 600; }
.quality-copy strong { display: block; font-size: 11.5px; }
.quality-copy small { color: var(--muted); font-size: 9.5px; }
.quality-bars { display: flex; gap: 3px; margin-top: 12px; }
.quality-bars i { height: 4px; flex: 1; background: var(--line); border-radius: 2px; }
.quality-bars i.on { background: var(--green); }
.unlock-strip { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 10px; background: var(--ink); color: #fff; margin-top: 10px; }
.unlock-strip .icon { color: var(--lime); flex: 0 0 auto; }
.unlock-strip strong { display: block; font-size: 10.5px; }
.unlock-strip small { color: rgba(255,255,255,.45); font-size: 9px; }
.unlock-strip button { margin-left: auto; background: var(--lime); border: 0; color: var(--ink); font-size: 10px; font-weight: 600; padding: 7px 9px; border-radius: 6px; flex: 0 0 auto; }
.related-list { display: flex; flex-direction: column; }
.related-item { display: flex; gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); cursor: pointer; }
.related-item:first-child { border-top: 0; padding-top: 0; }
.related-item:hover strong { color: var(--green); }
.related-item .r-date { font-family: var(--mono); font-size: 9.5px; color: var(--muted); flex: 0 0 42px; padding-top: 2px; }
.related-item .r-copy { min-width: 0; }
.related-item strong { font-size: 11.5px; font-weight: 550; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-item small { display: block; color: var(--muted); font-size: 9.5px; margin-top: 3px; }

/* ---------- corporate intelligence ---------- */
.company-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.company-summary-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; box-shadow: var(--shadow);
}
.company-summary-card strong {
  display: block; font-family: var(--serif); font-size: 29px; font-weight: 500;
  letter-spacing: -.04em; margin-top: 7px; line-height: 1;
}
.company-summary-card small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.company-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.company-card {
  display: block; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 19px 20px 15px; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.company-card::after {
  content: ""; position: absolute; width: 110px; height: 110px; right: -45px; top: -55px;
  border-radius: 50%; border: 1px solid rgba(15,107,84,.1);
  box-shadow: 0 0 0 18px rgba(15,107,84,.025);
}
.company-card:hover { transform: translateY(-2px); border-color: #c4cfc7; box-shadow: 0 24px 50px -32px rgba(16,27,24,.45); }
.company-card-head { display: flex; align-items: flex-start; gap: 11px; position: relative; z-index: 1; }
.company-avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #e5f2e9, #cfe5d9);
  color: var(--green-deep); font-family: var(--serif); font-size: 20px; font-weight: 600;
  border: 1px solid #cfe1d6;
}
.company-avatar.xl {
  width: 76px; height: 76px; border-radius: 20px; font-size: 34px;
  background: linear-gradient(145deg, #dff0e5, #bfdccb); border-color: #b9d4c4;
}
.company-card-title { min-width: 0; flex: 1; }
.company-card-title h3 { margin: 0 0 5px; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.company-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 9px; }
.company-type { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; font-size: 8px; font-weight: 600; }
.company-type-company { color: var(--green-deep); background: var(--green-soft); }
.company-type-gov { color: var(--blue); background: var(--blue-soft); }
.company-type-medical { color: #8a4c3e; background: #f7e9e4; }
.company-type-edu { color: #7b5e17; background: #f8efd8; }
.company-type-other { color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.company-arrow { color: var(--muted-2); transition: color .18s, transform .18s; margin-top: 4px; }
.company-card:hover .company-arrow { color: var(--green); transform: translate(1px, -1px); }
.company-intro {
  margin: 12px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  position: relative; z-index: 1; min-height: 33px;
}
.company-card-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  border-top: 1px solid var(--line); padding-top: 11px; position: relative; z-index: 1;
}
.company-card-stats span { display: block; font-size: 8.5px; color: var(--muted); white-space: nowrap; }
.company-card-stats strong {
  display: block; font-family: var(--serif); font-size: 17px; font-weight: 500;
  color: var(--ink); margin-top: 2px; white-space: nowrap; letter-spacing: -.03em;
}
.company-card-stats strong small { font-family: var(--sans); font-size: 8.5px; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.company-card-stats div:nth-child(2) strong { color: var(--green); font-size: 15px; }
.company-card-stats .company-stat-split strong { display: flex; align-items: baseline; gap: 1px; }
.company-card-stats .company-stat-split strong i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted-2); margin: 0 3px; font-weight: 400; }
.company-card-stats .company-stat-split strong small { margin-left: 3px; }
.company-card-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 11px; padding-top: 9px;
  font-size: 8.5px; color: var(--muted-2); position: relative; z-index: 1;
}
.company-card-foot span { display: inline-flex; align-items: center; gap: 4px; }
.company-card-link { margin-left: auto; color: var(--green); font-weight: 550; }
.company-hero {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 22px;
  background:
    radial-gradient(500px 240px at 95% 0%, rgba(215,243,107,.11), transparent 65%),
    var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.company-hero::after {
  content: ""; position: absolute; right: -90px; top: -120px; width: 300px; height: 300px;
  border-radius: 50%; border: 1px solid rgba(15,107,84,.09);
  box-shadow: 0 0 0 35px rgba(15,107,84,.02); pointer-events: none;
}
.company-hero-main { display: flex; gap: 18px; min-width: 0; position: relative; z-index: 1; }
.company-hero-copy { min-width: 0; }
.company-title { font-family: var(--serif); font-size: clamp(27px, 2.6vw, 36px); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; margin: 3px 0 8px; }
.company-hero-intro { color: var(--ink-2); font-size: 11.5px; line-height: 1.8; margin: 0 0 11px; max-width: 800px; }
.company-hero-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 9.5px; }
.company-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }
.company-hero-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; position: relative; z-index: 1; }
.company-tag { display: inline-flex; height: 20px; align-items: center; padding: 0 6px; border-radius: 4px; background: #f1f6e3; color: #617a1f; font-size: 8.5px; }
.company-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; margin-bottom: 16px; }
.company-stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; box-shadow: var(--shadow); }
.company-stat-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; }
.company-stat-label .icon { color: var(--green); }
.company-stat-card strong { display: block; font-family: var(--serif); font-size: 23px; font-weight: 500; letter-spacing: -.04em; margin-top: 8px; line-height: 1.1; white-space: nowrap; }
.company-stat-card strong small { font-family: var(--sans); font-size: 10px; color: var(--muted); margin-left: 2px; letter-spacing: 0; }
.company-stat-card > small { display: block; color: var(--muted); font-size: 8.5px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-contacts-panel { margin-bottom: 16px; }
.company-contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.company-contact-card {
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2);
  padding: 13px 14px; min-width: 0; position: relative;
}
.company-contact-card.masked { background: linear-gradient(135deg, #fbf8ee, #f7f4e9); border-color: #e7dfca; }
.company-contact-head { display: flex; align-items: center; gap: 8px; }
.company-contact-avatar {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(145deg, #dff0e5, #c9e1d3); color: var(--green-deep);
  font-size: 12px; font-weight: 650; flex: 0 0 auto;
}
.company-contact-card.masked .company-contact-avatar { background: #ece5d2; color: #8a732f; }
.company-contact-title { min-width: 0; flex: 1; }
.company-contact-title strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-contact-title span { display: block; color: var(--muted); font-size: 8.5px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-contact-lock-icon { color: var(--amber); flex: 0 0 auto; }
.company-contact-copy { flex: 0 0 auto; }
.company-contact-copy button { width: 23px; height: 23px; border: 0; border-radius: 6px; background: var(--surface); color: var(--muted); display: grid; place-items: center; }
.company-contact-copy button:hover { background: var(--green-soft); color: var(--green); }
.company-contact-values { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; min-width: 0; }
.company-contact-values span { display: flex; align-items: center; gap: 5px; color: var(--ink-2); font-family: var(--mono); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.company-contact-values .icon { color: var(--muted-2); flex: 0 0 auto; }
.company-contact-card.masked .company-contact-values span { color: var(--muted); filter: blur(.2px); }
.company-contact-project { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 7px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.company-contact-project > span { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--muted); }
.company-contact-project button { border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 8.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 2px; }
.company-contact-project button:hover { color: var(--green); }
.company-contact-lock {
  display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 10px 12px;
  border-radius: 8px; background: #fbf4e2; border: 1px solid #eadcb9; color: #775a1e;
}
.company-contact-lock > .icon { flex: 0 0 auto; }
.company-contact-lock strong { display: block; font-size: 10px; }
.company-contact-lock small { display: block; color: #9b7d42; font-size: 8.5px; margin-top: 1px; }
.company-contact-lock .btn { margin-left: auto; flex: 0 0 auto; }
.company-contact-foot { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8.5px; margin-top: 10px; }
.company-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 16px; align-items: start; }
.company-side { display: flex; flex-direction: column; gap: 14px; }
.company-notice-table td:first-child { width: 70px; }
.company-notice-table .cell-title { max-width: 460px; }
.partner-list { display: flex; flex-direction: column; }
.partner-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.partner-item:first-child { border-top: 0; padding-top: 0; }
.partner-item:hover strong { color: var(--green); }
.partner-copy { min-width: 0; flex: 1; }
.partner-copy strong { display: block; font-size: 10.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.partner-copy small { display: block; color: var(--muted); font-size: 8.5px; margin-top: 1px; }
.partner-count { font-family: var(--mono); font-size: 9px; color: var(--green); background: var(--green-soft); border-radius: 4px; padding: 2px 5px; flex: 0 0 auto; }
.company-side-foot { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; color: var(--muted-2); font-size: 8.5px; text-align: right; }
.company-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.company-tags span { display: inline-flex; align-items: center; height: 21px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 8.5px; }
.company-note { display: flex; align-items: flex-start; gap: 9px; background: var(--surface-2); }
.company-note > .icon { color: var(--green); flex: 0 0 auto; margin-top: 1px; }
.company-note strong { display: block; font-size: 10px; }
.company-note p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.company-notice-table .cell-title small { max-width: 440px; }

/* ---------- monitor ---------- */
.monitor-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.monitor-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow); }
.monitor-kpi-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--muted); }
.monitor-kpi strong { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; font-family: var(--serif); font-size: 30px; font-weight: 500; letter-spacing: -.04em; margin-top: 8px; }
.monitor-kpi strong small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.monitor-kpi small { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.monitor-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.monitor-scroll { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 4px; }
.monitor-scroll-tasks, .monitor-scroll-ai { max-height: 420px; }
.monitor-scroll-runs { max-height: 360px; }
.monitor-scroll-alerts { max-height: 220px; }
.monitor-scroll-sources { max-height: 340px; }
.monitor-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.monitor-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.monitor-scroll::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
.monitor-scroll-tasks thead th, .monitor-scroll-runs thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface);
}
.task-table td { padding: 14px 8px; }
.task-table .run-actions .btn { width: 29px; padding: 0; }
.health { white-space: nowrap; }
.task-name { font-size: 11.5px; font-weight: 550; }
.task-name small { display: block; color: var(--muted); font-size: 9.5px; font-weight: 400; margin-top: 2px; }
.task-source-link {
  display: inline-flex; align-items: center; gap: 3px; max-width: 340px;
  color: var(--blue); text-decoration: none; font-size: 9px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
}
.task-source-link:hover { text-decoration: underline; color: var(--blue-deep, var(--blue)); }
.health { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; padding: 3px 7px; border-radius: 5px; background: var(--green-soft); color: var(--green-deep); }
.health.degraded { background: var(--amber-soft); color: var(--amber); }
.health.down { background: var(--red-soft); color: var(--red); }
.health i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.run-actions { display: flex; gap: 4px; justify-content: flex-end; }
.mini-progress { width: 74px; height: 4px; background: var(--surface-3); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.mini-progress i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.ai-timeline { position: relative; display: flex; flex-direction: column; gap: 0; }
.ai-event { display: flex; gap: 11px; padding: 0 0 16px; position: relative; }
.ai-event:last-child { padding-bottom: 0; }
.ai-event::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 1px; background: var(--line); }
.ai-event:last-child::before { display: none; }
.ai-event-icon { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: 0 0 auto; z-index: 1; border: 3px solid var(--surface); box-sizing: content-box; }
.ai-event.warn .ai-event-icon { background: var(--amber-soft); color: var(--amber); }
.ai-event.critical .ai-event-icon { background: var(--red-soft); color: var(--red); }
.ai-event-copy { min-width: 0; flex: 1; }
.ai-event-copy strong { display: block; font-size: 11px; font-weight: 550; line-height: 1.45; }
.ai-event-copy p { margin: 3px 0 0; font-size: 9.5px; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-event-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 8.5px; color: var(--muted-2); }
.ai-event-foot .status-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.ai-event-foot .status-dot.monitoring { background: var(--amber); }
.ai-event-foot .status-dot.failed { background: var(--red); }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; gap: 9px; padding: 10px 11px; border-radius: 9px; background: var(--amber-soft); border: 1px solid #efdfbf; }
.alert-item.critical { background: var(--red-soft); border-color: #eccfc7; }
.alert-item.info { background: var(--blue-soft); border-color: #d8e4f1; }
.alert-item .icon { color: var(--amber); flex: 0 0 auto; margin-top: 1px; }
.alert-item.critical .icon { color: var(--red); }
.alert-item.info .icon { color: var(--blue); }
.alert-item strong { display: block; font-size: 10.5px; font-weight: 550; }
.alert-item p { margin: 2px 0 0; font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.alert-actions { margin-left: auto; display: flex; align-items: flex-start; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.source-tile { border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; background: var(--surface-2); }
.source-platform-kicker { display: block; color: var(--muted); font-size: 8.5px; letter-spacing: .12em; margin-bottom: 3px; }
.source-tile-top strong { display: block; font-size: 12.5px; line-height: 1.35; }
.source-task-names { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.source-task-names > span { color: var(--muted); font-size: 9px; margin-right: 2px; }
.source-task-names > b { font-weight: 500; font-size: 9px; color: var(--blue); background: var(--blue-soft); border: 1px solid #d8e4f1; border-radius: 4px; padding: 2px 5px; }
.source-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.source-tile-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.source-edit {
  width: 27px; height: 27px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--muted); transition: color .18s, border-color .18s, background .18s;
}
.source-edit:hover { color: var(--bs-primary); border-color: var(--bs-primary); background: var(--blue-soft); }
.source-tile strong { font-size: 11.5px; font-weight: 550; }
.source-tile p { font-size: 9.5px; color: var(--muted); margin: 5px 0 9px; line-height: 1.5; min-height: 28px; }
.source-tile-stats { display: flex; gap: 12px; font-size: 9px; color: var(--muted); }
.source-tile-stats b { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-2); font-weight: 500; }
.switch { position: relative; width: 32px; height: 18px; border-radius: 20px; background: var(--line-strong); border: 0; transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .2s; }
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(14px); }
.run-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 14px; }
.run-detail-stat { background: var(--surface-2); border-radius: 9px; padding: 10px; }
.run-detail-stat span { font-size: 9px; color: var(--muted); display: block; }
.run-detail-stat strong { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.run-error { background: var(--red-soft); border: 1px solid #edcdc4; border-radius: 9px; padding: 10px 12px; font-size: 10.5px; color: #7c3c2d; margin: 10px 0; }
.run-saved { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.run-saved-row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 10.5px; }
.run-saved-row:first-child { border-top: 0; }
.run-saved-row .q { margin-left: auto; font-family: var(--mono); color: var(--green); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 9px 12px; font-size: 11.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--ink); border-color: var(--green); font-weight: 550; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; position: relative; z-index: 1; }
.auth-visual {
  position: relative; overflow: hidden; color: #fff; padding: 48px 56px;
  background:
    radial-gradient(700px 500px at 85% 15%, rgba(45,212,167,.14), transparent 65%),
    radial-gradient(500px 400px at 10% 90%, rgba(215,243,107,.10), transparent 65%),
    linear-gradient(150deg, #0b1813, #0a1511 60%, #0d1d17);
  display: flex; flex-direction: column;
}
.auth-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(215,243,107,.2) .65px, transparent .65px);
  background-size: 15px 15px;
  mask-image: linear-gradient(120deg, transparent 30%, #000);
  opacity: .55;
}
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-brand .brand-mark { width: 42px; height: 42px; }
.auth-brand strong { font-size: 17px; letter-spacing: .02em; }
.auth-brand span { display: block; font-family: var(--mono); font-size: 8px; letter-spacing: .24em; color: rgba(215,243,107,.65); }
.auth-hero { position: relative; z-index: 1; margin: auto 0; max-width: 620px; }
.auth-hero .eyebrow { color: var(--lime); }
.auth-hero h1 { font-family: var(--serif); font-size: clamp(42px, 4.7vw, 70px); line-height: 1.14; letter-spacing: -.04em; font-weight: 500; margin: 22px 0 20px; }
.auth-hero h1 em { font-style: italic; color: var(--lime); }
.auth-hero p { color: rgba(255,255,255,.45); font-size: 13px; max-width: 470px; line-height: 1.85; }
.auth-stats { display: flex; gap: 34px; margin-top: 38px; }
.auth-stats div strong { display: block; font-family: var(--serif); font-size: 28px; font-weight: 500; color: #fff; letter-spacing: -.02em; }
.auth-stats div span { font-size: 9.5px; color: rgba(255,255,255,.35); letter-spacing: .06em; }
.auth-orbit { position: absolute; width: 420px; height: 420px; border: 1px solid rgba(215,243,107,.10); border-radius: 50%; right: -150px; bottom: -90px; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; border: 1px solid rgba(215,243,107,.08); border-radius: 50%; }
.auth-orbit::before { inset: 46px; }
.auth-orbit::after { inset: 110px; }
.auth-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; color: rgba(255,255,255,.28); font-size: 9.5px; letter-spacing: .04em; }
.auth-foot a { color: rgba(255,255,255,.45); }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 32px; position: relative; }
.auth-back { position: absolute; top: 28px; left: 30px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.auth-back:hover { color: var(--ink); }
.auth-card { width: 100%; max-width: 404px; }
.auth-card .eyebrow { margin-bottom: 13px; }
.auth-card h2 { font-family: var(--serif); font-size: 32px; font-weight: 500; letter-spacing: -.03em; margin: 0 0 7px; }
.auth-card .auth-sub { color: var(--muted); font-size: 12px; margin: 0 0 25px; }
.auth-tabs { display: flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; height: 34px; border: 0; background: transparent; border-radius: 7px; font-size: 12px; color: var(--muted); transition: background .2s, color .2s; }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.07); font-weight: 550; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-select {
  width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); padding: 0 12px; color: var(--ink); font-size: 13px; outline: none;
}
.form-select:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15,107,84,.07); }
.user-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.user-filters .search-main { padding-right: 6px; }
.checkbox-row { display: flex; align-items: center; gap: 7px; height: 44px; font-size: 11px; color: var(--ink-2); }
.delete-warning { padding: 14px; border: 1px solid #eccfc7; border-radius: 9px; background: var(--red-soft); margin-bottom: 18px; }
.delete-warning strong { display: block; font-size: 13px; }
.delete-warning span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.failure-message { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 10.5px; }
.failure-detail { display: grid; gap: 10px; }
.failure-detail-row { display: flex; justify-content: space-between; gap: 18px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 10.5px; }
.failure-detail-row span { color: var(--muted); }
.failure-detail-row strong, .failure-detail-row a { text-align: right; overflow-wrap: anywhere; color: var(--ink-2); font-weight: 500; }
.failure-detail-block { padding: 12px; border-radius: 8px; background: var(--surface-2); }
.failure-detail-block > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.failure-detail-block pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-family: var(--mono); font-size: 10px; line-height: 1.6; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; color: var(--muted); font-size: 10px; }
.pagination-actions { display: flex; gap: 6px; }
.form-group { margin-bottom: 13px; }
.form-label { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.form-label small { color: var(--muted); font-weight: 400; }
.form-input {
  width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); padding: 0 12px; color: var(--ink); font-size: 13px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.form-input:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(15,107,84,.07); }
.form-input::placeholder { color: var(--muted-2); }
.form-hint { font-size: 9.5px; color: var(--muted); margin-top: 5px; }
.auth-submit { width: 100%; height: 46px; margin-top: 8px; }
.auth-error { display: none; padding: 9px 11px; border-radius: 8px; background: var(--red-soft); border: 1px solid #eccfc7; color: var(--red); font-size: 10.5px; margin-bottom: 10px; }
.auth-error.show { display: block; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 9px; margin: 21px 0 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-accounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.demo-account { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 6px; text-align: left; transition: border-color .18s, background .18s; }
.demo-account:hover { border-color: var(--green); background: var(--green-soft); }
.demo-account strong { display: block; font-size: 10px; font-weight: 600; }
.demo-account span { display: block; font-size: 8px; color: var(--muted); margin-top: 1px; }
.auth-legal { font-size: 9px; color: var(--muted-2); text-align: center; margin-top: 18px; line-height: 1.7; }
.auth-legal a { text-decoration: underline; }

/* ---------- account ---------- */
.account-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 16px; }
.plan-card { background: linear-gradient(140deg, #0c1914, #12271f); color: #fff; border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; border: 1px solid rgba(215,243,107,.12); }
.plan-card::after { content: ""; position: absolute; right: -70px; top: -80px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(215,243,107,.16); box-shadow: 0 0 0 30px rgba(215,243,107,.03), 0 0 0 70px rgba(215,243,107,.02); }
.plan-card .eyebrow { color: var(--lime); }
.plan-card h2 { font-family: var(--serif); font-size: 30px; font-weight: 500; margin: 12px 0 4px; }
.plan-card p { color: rgba(255,255,255,.42); font-size: 11.5px; }
.plan-features { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 9px; position: relative; z-index: 1; }
.plan-features li { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: rgba(255,255,255,.75); }
.plan-features .icon { color: var(--lime); }
.plan-card .btn { position: relative; z-index: 1; }
.account-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 21px 22px; box-shadow: var(--shadow); }
.account-card h3 { font-size: 13px; margin: 0 0 13px; }
.profile-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.profile-row:last-child { border-bottom: 0; }
.profile-row span { color: var(--muted); }
.profile-row strong { font-weight: 550; }
.order-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.order-row:last-child { border-bottom: 0; }
.order-row .o-icon { width: 27px; height: 27px; border-radius: 7px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.order-row small { display: block; color: var(--muted); font-size: 9px; }
.order-row .o-amount { margin-left: auto; font-family: var(--mono); font-size: 11px; }

/* ---------- quality ---------- */
.quality-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.quality-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; box-shadow: var(--shadow); }
.quality-tile span { font-size: 10px; color: var(--muted); }
.quality-tile strong { display: block; font-family: var(--serif); font-size: 28px; font-weight: 500; margin-top: 4px; }
.quality-tile small { color: var(--muted); font-size: 9.5px; }
.q-score { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; }
.q-score i { width: 32px; height: 4px; border-radius: 2px; background: var(--line); display: inline-block; position: relative; overflow: hidden; }
.q-score i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--amber); }
.q-score.good i::after { background: var(--green); }
.q-score.bad i::after { background: var(--red); }

/* ---------- modal / toast ---------- */
.modal-root { position: relative; z-index: 200; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 18, 14, .48);
  backdrop-filter: blur(5px); display: grid; place-items: center; padding: 24px;
  opacity: 0; transition: opacity .2s ease; overflow-y: auto;
}
.modal-backdrop.open { opacity: 1; }
.modal {
  width: 100%; background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-lg); padding: 26px;
  transform: translateY(12px) scale(.985); transition: transform .24s cubic-bezier(.2,.7,.3,1);
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.modal-backdrop.open .modal { transform: none; }
.modal-sm { max-width: 400px; }
.modal-md { max-width: 520px; }
.modal-lg { max-width: 760px; }
.modal-head .modal-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--green); margin-bottom: 8px; }
.modal-head h2 { font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 7px; }
.modal-head p { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal.modal-has-actions { overflow: hidden; display: flex; flex-direction: column; }
.modal.modal-has-actions .modal-flex-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.modal.modal-has-actions .modal-flex-form .modal-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.modal.modal-has-actions > .modal-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 4px; }
.modal.modal-has-actions .modal-actions {
  flex: 0 0 auto; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line); background: var(--surface); z-index: 2;
}
.modal-close { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); display: grid; place-items: center; z-index: 2; }
.modal-upgrade .modal { padding: 0; background: transparent; box-shadow: none; overflow: visible; }
.upgrade-modal {
  position: relative; overflow: hidden; color: #fff; border-radius: 22px; padding: 32px;
  background:
    radial-gradient(500px 300px at 95% 0%, rgba(45,212,167,.18), transparent 65%),
    radial-gradient(440px 320px at 0% 100%, rgba(215,243,107,.10), transparent 65%),
    linear-gradient(150deg, #0c1a14, #0a1511 62%, #10231b);
  border: 1px solid rgba(215,243,107,.16);
  box-shadow: var(--shadow-lg);
}
.upgrade-orbit { position: absolute; right: -130px; top: -150px; width: 360px; height: 360px; border: 1px solid rgba(215,243,107,.14); border-radius: 50%; box-shadow: 0 0 0 40px rgba(215,243,107,.03), 0 0 0 90px rgba(215,243,107,.02); }
.upgrade-kicker { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--lime); margin-bottom: 12px; position: relative; z-index: 1; }
.upgrade-modal h2 { position: relative; z-index: 1; font-family: var(--serif); font-size: 34px; line-height: 1.2; font-weight: 500; letter-spacing: -.03em; margin: 0 0 10px; }
.upgrade-sub { position: relative; z-index: 1; color: rgba(255,255,255,.46); font-size: 11.5px; margin: 0 0 20px; max-width: 360px; line-height: 1.7; }
.upgrade-benefits { position: relative; z-index: 1; display: grid; gap: 9px; margin-bottom: 21px; }
.upgrade-benefits > div { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.upgrade-benefits .icon { color: var(--lime); flex: 0 0 auto; }
.upgrade-benefits strong { display: block; font-size: 11px; font-weight: 550; }
.upgrade-benefits small { color: rgba(255,255,255,.36); font-size: 9px; }
.upgrade-price { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 17px; margin-bottom: 17px; }
.upgrade-price .price-currency { font-family: var(--serif); font-size: 18px; color: var(--lime); }
.upgrade-price .price-number { font-family: var(--serif); font-size: 46px; line-height: 1; color: #fff; letter-spacing: -.05em; }
.upgrade-price .price-unit { color: rgba(255,255,255,.4); font-size: 11px; }
.upgrade-price small { color: rgba(255,255,255,.32); font-size: 9px; }
.upgrade-modal .btn-block { position: relative; z-index: 1; }
.upgrade-fineprint { position: relative; z-index: 1; text-align: center; color: rgba(255,255,255,.28); font-size: 8.5px; margin: 10px 0 0; }

.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px;
  background: var(--ink); color: #fff; border-radius: 10px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5);
  transform: translateY(12px); opacity: 0; transition: transform .22s, opacity .22s;
  border: 1px solid rgba(255,255,255,.08);
}
.toast.show { transform: none; opacity: 1; }
.toast-icon { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: rgba(215,243,107,.12); color: var(--lime); flex: 0 0 auto; }
.toast-error .toast-icon { background: rgba(255,129,100,.16); color: #ff9e86; }
.toast-warn .toast-icon { background: rgba(255,193,94,.16); color: #ffc15e; }
.toast-copy strong { display: block; font-size: 11px; font-weight: 550; }
.toast-copy small { display: block; font-size: 9.5px; color: rgba(255,255,255,.45); margin-top: 2px; }
.toast-close { margin-left: auto; border: 0; background: none; color: rgba(255,255,255,.35); padding: 1px; }
.spinner { width: 13px; height: 13px; border: 2px solid rgba(255,255,255,.3); border-top-color: currentColor; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- command palette ---------- */
.command-modal .modal { padding: 0; max-width: 620px; overflow: hidden; }
.command-input-wrap { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.command-input-wrap .icon { color: var(--muted); }
.command-input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; }
.command-shortcut { font-family: var(--mono); font-size: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.command-results { max-height: 420px; overflow-y: auto; padding: 7px; }
.command-empty { padding: 34px; text-align: center; color: var(--muted); font-size: 11px; }
.command-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.command-item:hover, .command-item.active { background: var(--surface-2); }
.command-item .cmd-type { flex: 0 0 auto; }
.command-item .cmd-copy { min-width: 0; }
.command-item strong { display: block; font-size: 11px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.command-item small { color: var(--muted); font-size: 9px; }
.command-foot { display: flex; align-items: center; gap: 14px; padding: 9px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; background: var(--surface-2); }
.command-foot kbd { font-family: var(--mono); font-size: 8px; border: 1px solid var(--line); border-radius: 3px; padding: 1px 4px; background: var(--surface); }

/* ---------- empty / skeleton ---------- */
.empty-state { padding: 62px 24px; text-align: center; }
.empty-icon { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.empty-state h3 { font-size: 14px; margin: 0 0 5px; }
.empty-state p { color: var(--muted); font-size: 11px; margin: 0 auto 15px; max-width: 380px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.skeleton { background: linear-gradient(90deg, #ece9df 25%, #f5f2e9 37%, #ece9df 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: var(--radius); }
.skeleton-card { height: 142px; }
.skeleton-row { height: 55px; border-radius: 10px; margin-bottom: 8px; }
.skeleton-panel { height: 320px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- footer ---------- */
.site-footer { margin-top: 30px; padding: 18px 2px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted-2); font-size: 9.5px; flex-wrap: wrap; }
.site-footer .f-brand { font-family: var(--mono); letter-spacing: .14em; color: var(--muted); }
.site-footer .f-links { display: flex; gap: 14px; }
.site-footer a:hover { color: var(--green); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .sidebar { width: 234px; flex-basis: 234px; }
  .page { padding-left: 26px; padding-right: 26px; }
  .topbar { padding: 0 26px; }
  .command-trigger { width: 190px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 330px; }
}
@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .monitor-grid { grid-template-columns: 1fr; }
  .aegis-panel { min-height: 360px; }
  .split-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .account-grid { grid-template-columns: 1fr; }
  .source-grid { grid-template-columns: 1fr 1fr; }
  .monitor-kpis { grid-template-columns: repeat(2, 1fr); }
  .company-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .company-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .company-detail-grid { grid-template-columns: 1fr; }
  .company-contact-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 100; transform: translateX(-102%);
    transition: transform .26s cubic-bezier(.2,.7,.3,1); width: 264px; flex-basis: 264px;
    box-shadow: 30px 0 60px rgba(0,0,0,.3);
  }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open { overflow: hidden; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: rgba(33, 37, 41, .5); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .24s ease;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .main { width: 100%; }
  .mobile-menu { display: inline-grid !important; }
  .topbar { height: 64px; padding: 0 18px; gap: 10px; }
  .command-trigger { width: 42px; padding: 0; justify-content: center; }
  .command-trigger span, .command-trigger kbd { display: none; }
  .page { padding: 24px 18px 60px; }
  .hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .hero-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; width: 100%; justify-content: space-between; }
  .hero-actions { width: 100%; justify-content: flex-start; }
  .hero-note { width: 100%; }
  .dateline { text-align: left; }
  .dateline strong { font-size: 34px; }
  .hero h1 { font-size: 38px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .page-head h1 { font-size: 32px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-main { min-height: 100vh; padding-top: 80px; }
  .detail-side { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .upgrade-banner { flex-direction: column; align-items: flex-start; gap: 15px; }
  .quality-summary { grid-template-columns: 1fr; }
  .company-hero { flex-direction: column; padding: 22px 20px; }
  .company-hero-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .company-card-grid { grid-template-columns: 1fr; }
  .company-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { gap: 10px; }
  .kpi { min-height: 128px; padding: 15px; }
  .kpi-value { font-size: 32px; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 33px; }
  .hero-side .dateline { display: none; }
  .topbar-crumbs .sep, .topbar-crumbs .crumb-parent { display: none; }
  .topbar-login .btn span { display: none; }
  .page { padding: 20px 14px 55px; }
  .topbar { padding: 0 14px; }
  .panel { padding: 17px 15px; border-radius: 14px; }
  .detail-card { padding: 20px 17px; border-radius: 14px; }
  .detail-title { font-size: 25px; }
  .detail-head { flex-direction: column-reverse; }
  .detail-actions { align-self: flex-end; }
  .form-grid { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 11px; min-height: 68px; }
  .notice-table .hide-sm { display: none; }
  .cell-title { max-width: 240px; }
  .search-main kbd { display: none; }
  .search-main { height: 48px; }
  .filter-toggle { margin-left: 0; }
  .search-panel { padding: 12px; }
  .pagination { flex-direction: column; align-items: flex-start; }
  .source-grid { grid-template-columns: 1fr; }
  .monitor-kpis { grid-template-columns: 1fr 1fr; }
  .run-detail-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { justify-content: flex-start; }
  .auth-main { padding: 74px 20px 30px; }
  .demo-accounts { grid-template-columns: 1fr; }
  .upgrade-modal { padding: 24px 20px; border-radius: 18px; }
  .upgrade-modal h2 { font-size: 28px; }
  .upgrade-price .price-number { font-size: 38px; }
  .modal { padding: 20px; }
  .toast-root { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .skeleton-grid { grid-template-columns: 1fr 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .company-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .company-hero-main { flex-direction: column; gap: 12px; }
  .company-hero-intro { font-size: 10.5px; }
  .company-card-stats { grid-template-columns: repeat(2, 1fr); gap: 9px 12px; }
  .company-card-stats div:nth-child(3) { border-top: 1px dashed var(--line); padding-top: 8px; }
  .company-card-stats div:nth-child(4) { border-top: 1px dashed var(--line); padding-top: 8px; }
  .company-card { padding: 16px 15px 13px; }
  .company-summary-card { padding: 13px; }
  .company-contact-grid { grid-template-columns: 1fr; }
  .company-contact-lock { flex-wrap: wrap; }
  .company-contact-lock .btn { margin-left: 23px; }
  [data-source-form] > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* =========================================================
   Bootstrap 5 palette alignment
   Primary #0d6efd · Secondary #6c757d · Success #198754
   Info #0dcaf0 · Warning #ffc107 · Danger #dc3545
   Light #f8f9fa · Dark #212529 · Border #dee2e6
   ========================================================= */

body {
  background: var(--bs-light);
  color: var(--bs-body-color);
  font-family: var(--sans);
}
body::before { display: none; }
::selection { background: var(--bs-primary); color: #fff; }
:focus-visible { outline: 2px solid rgba(13, 110, 253, .55); outline-offset: 2px; }

.display, .hero h1, .page-head h1, .detail-title, .company-title,
.auth-hero h1, .auth-card h2, .plan-card h2, .upgrade-modal h2, .modal-head h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -.025em;
}
.hero h1 em { color: var(--bs-primary); font-style: normal; }
.eyebrow { color: var(--bs-primary); }
.eyebrow::before { background: var(--bs-primary); }
.kpi-value, .dateline strong, .monitor-kpi strong, .company-stat-card strong,
.company-card-stats strong, .quality-tile strong, .upgrade-price .price-number,
.aegis-metric strong { font-family: var(--sans); font-weight: 600; }

/* Sidebar */
.sidebar {
  background: var(--bs-dark);
  border-right: 1px solid #343a40;
}
.sidebar::after { display: none; }
.brand-mark {
  background: var(--bs-primary);
  border: 1px solid #0b5ed7;
  box-shadow: none;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
}
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-mark i { background: #fff; }
.brand-mark i:nth-child(2) { background: #9ec5fe; }
.brand-copy span { color: #9ec5fe; }
.nav-label { color: #6c757d; }
.nav-item { color: #adb5bd; }
.nav-item:hover { background: #2b3035; color: #fff; }
.nav-item.active { background: rgba(13, 110, 253, .18); color: #fff; }
.nav-item.active::before { background: var(--bs-primary); }
.nav-item .icon { color: #6c757d; }
.nav-item.active .icon, .nav-item:hover .icon { color: #6ea8fe; }
.nav-badge {
  color: #9ec5fe;
  background: rgba(13, 110, 253, .18);
  border-color: rgba(13, 110, 253, .35);
}
.nav-badge.alert { color: #ea868f; background: rgba(220, 53, 69, .18); border-color: rgba(220, 53, 69, .35); }
.aegis-mini {
  background: #2b3035;
  border-color: #343a40;
}
.aegis-mini-head { color: #adb5bd; }
.aegis-mini-head .pulse-dot { background: var(--bs-success); animation: none; box-shadow: 0 0 0 3px rgba(25, 135, 84, .2); }
.aegis-mini strong { color: #fff; }
.aegis-mini small { color: #6c757d; }
.avatar {
  background: var(--bs-primary);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-indent: 0;
}
.avatar.sm { font-size: 12px; }
.avatar.dark { background: #343a40; color: #9ec5fe; border-color: #495057; }
.sidebar-user:hover { background: #2b3035; }
.sidebar-user-copy span { color: #6c757d; }

/* Topbar and navigation controls */
.topbar {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: var(--bs-border-color);
}
.command-trigger { background: #fff; border-color: var(--bs-border-color); }
.command-trigger:hover { background: var(--bs-light); border-color: var(--bs-secondary); }
.command-trigger kbd { background: var(--bs-light); border-color: var(--bs-border-color); }
.topbar-btn:hover { background: var(--bs-light); border-color: var(--bs-border-color); }
.tier-pro { color: #664d03; background: #fff3cd; border: 1px solid #ffe69c; }
.tier-admin { color: #fff; background: var(--bs-primary); border: 1px solid var(--bs-primary); }
.tier-free, .tier-guest { color: var(--bs-secondary); background: var(--bs-light); border-color: var(--bs-border-color); }

/* Buttons */
.btn-primary {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover { background: #0b5ed7; border-color: #0a58ca; color: #fff; }
.btn-lime {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
  box-shadow: none;
}
.btn-lime:hover { background: #0b5ed7; border-color: #0a58ca; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--bs-border-color); color: var(--bs-secondary); }
.btn-ghost:hover { background: var(--bs-light); border-color: var(--bs-secondary); color: var(--bs-dark); }
.btn-soft { background: var(--bs-light); color: var(--bs-secondary); }
.btn-soft:hover { background: var(--bs-secondary-bg, #e9ecef); color: var(--bs-dark); }
.btn-danger { background: var(--bs-danger); color: #fff; }
.icon-btn { background: #fff; border-color: var(--bs-border-color); color: var(--bs-secondary); }
.icon-btn:hover { background: var(--bs-light); border-color: var(--bs-secondary); }
.icon-btn.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.link-btn { color: var(--bs-primary); }

/* Cards and surfaces */
.panel, .kpi, .monitor-kpi, .source-card, .account-card, .detail-card, .contact-card,
.company-card, .company-hero, .company-stat-card, .company-summary-card, .quality-tile,
.plan-card, .company-contacts-panel {
  border-color: var(--bs-border-color);
  box-shadow: var(--shadow);
}
.panel, .detail-card, .contact-card, .company-hero, .company-card, .company-contacts-panel { border-radius: 12px; }
.kpi, .monitor-kpi, .company-stat-card, .company-summary-card, .source-card, .account-card { border-radius: 10px; }
.kpi:hover, .company-card:hover { border-color: var(--bs-secondary); }
.kpi-icon.lime { background: var(--green-soft); color: var(--green-deep); }
.kpi-icon.amber { background: var(--amber-soft); color: #664d03; }
.kpi-icon.blue { background: var(--blue-soft); color: #084298; }
.delta { color: var(--bs-success); }
.delta.down { color: var(--bs-danger); }

/* Search, forms and active states */
.search-panel { background: #fff; }
.search-main { background: #fff; border-color: var(--bs-border-color); }
.search-main:focus-within { border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .2); }
.form-input:focus, .text-input:focus, .date-input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .2);
}
.filter-chip.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.filter-chip.active span { color: rgba(255, 255, 255, .7); }
.active-chip { background: var(--blue-soft); color: #084298; border-color: #9ec5fe; }

/* Status badges — Bootstrap subtle colors */
.type-badge.success { color: #0f5132; background: #d1e7dd; }
.type-badge.blue { color: #084298; background: #cfe2ff; }
.type-badge.amber { color: #664d03; background: #fff3cd; }
.type-badge.muted { color: #41464b; background: #e2e3e5; border-color: #d3d6d8; }
.health { background: #d1e7dd; color: #0f5132; }
.health.degraded { background: #fff3cd; color: #664d03; }
.health.down { background: #f8d7da; color: #842029; }
.run-status.success { background: #d1e7dd; color: #0f5132; }
.run-status.partial { background: #fff3cd; color: #664d03; }
.run-status.failed { background: #f8d7da; color: #842029; }
.run-status.running { background: #cfe2ff; color: #084298; }
.run-status.idle { background: #e9ecef; color: #495057; }

/* Charts and bars */
.region-bar i { background: var(--bs-primary); }
.region-row:nth-child(2) .region-bar i { background: #6ea8fe; }
.region-row:nth-child(3) .region-bar i { background: #9ec5fe; }
.industry-chips span { background: var(--bs-light); }
.quality-bars i.on { background: var(--bs-success); }

/* AEGIS dark panel */
.aegis-panel {
  background: var(--bs-dark);
  border-color: #343a40;
  color: #fff;
}
.aegis-panel::after { display: none; }
.aegis-panel .panel-head p { color: #adb5bd; }
.aegis-status { color: #9ec5fe; }
.aegis-status .pulse-dot { animation: none; box-shadow: 0 0 0 3px rgba(25, 135, 84, .2); }
.aegis-metric strong { color: #6ea8fe; }
.aegis-metric span { color: #adb5bd; }
.aegis-item { border-top-color: #343a40; }
.aegis-item .a-icon { background: #2b3035; color: #6ea8fe; }
.aegis-item strong { color: #f8f9fa; }
.aegis-item small { color: #adb5bd; }
.aegis-foot { border-top-color: #343a40; color: #adb5bd; }
.aegis-foot a { color: #6ea8fe; }

/* Upgrade banners and membership surfaces */
.upgrade-banner {
  background: var(--bs-dark);
  border: 1px solid #343a40;
}
.upgrade-banner::before { border-color: rgba(13, 110, 253, .22); box-shadow: 0 0 0 28px rgba(13, 110, 253, .04), 0 0 0 60px rgba(13, 110, 253, .025); }
.upgrade-banner h3 em { color: #6ea8fe; }
.upgrade-banner p { color: #adb5bd; }
.banner-pro .icon { color: #6ea8fe; }
.plan-card { background: var(--bs-dark); border-color: #343a40; }
.plan-card::after { border-color: rgba(13, 110, 253, .2); box-shadow: 0 0 0 30px rgba(13, 110, 253, .04), 0 0 0 70px rgba(13, 110, 253, .025); }
.plan-card .eyebrow, .plan-features .icon { color: #9ec5fe; }

/* Auth */
.auth-visual { background: var(--bs-dark); }
.auth-visual::after { display: none; }
.auth-brand span { color: #9ec5fe; }
.auth-orbit, .auth-orbit::before, .auth-orbit::after { border-color: rgba(13, 110, 253, .18); }
.auth-hero .eyebrow { color: #9ec5fe; }
.auth-hero h1 em { color: #6ea8fe; font-style: normal; }
.auth-hero p { color: #adb5bd; }
.auth-stats div span { color: #adb5bd; }
.auth-main { background: var(--bs-light); }
.auth-back { color: var(--bs-secondary); }
.demo-account:hover { border-color: var(--bs-primary); background: var(--blue-soft); }
.auth-tabs { background: var(--bs-light); }

/* Upgrade modal */
.upgrade-modal {
  background: var(--bs-dark);
  border-color: #343a40;
}
.upgrade-orbit { border-color: rgba(13, 110, 253, .2); box-shadow: 0 0 0 40px rgba(13, 110, 253, .04), 0 0 0 90px rgba(13, 110, 253, .025); }
.upgrade-kicker { color: #9ec5fe; }
.upgrade-sub { color: #adb5bd; }
.upgrade-benefits > div { background: #2b3035; border-color: #343a40; }
.upgrade-benefits .icon { color: #6ea8fe; }
.upgrade-benefits small { color: #adb5bd; }
.upgrade-price .price-currency { color: #9ec5fe; }
.upgrade-price small { color: #adb5bd; }
.upgrade-fineprint { color: #6c757d; }
.modal-backdrop { background: rgba(33, 37, 41, .55); }
.modal { border-radius: 12px; }
.modal-head .modal-kicker { color: var(--bs-primary); }
.toast { background: var(--bs-dark); border-color: #343a40; border-radius: 8px; }
.toast-icon { background: rgba(13, 110, 253, .18); color: #6ea8fe; }

/* Company surfaces */
.company-card::after { border-color: rgba(13, 110, 253, .14); box-shadow: 0 0 0 18px rgba(13, 110, 253, .03); }
.company-card:hover { border-color: var(--bs-secondary); }
.company-avatar {
  background: #e7f1ff;
  color: #084298;
  border-color: #cfe2ff;
}
.company-avatar.xl { background: #e7f1ff; border-color: #cfe2ff; }
.company-card:hover .company-arrow, .partner-item:hover strong,
.company-contact-project button:hover, .related-item:hover strong { color: var(--bs-primary); }
.company-hero { background: #fff; }
.company-hero::after { border-color: rgba(13, 110, 253, .12); box-shadow: 0 0 0 35px rgba(13, 110, 253, .025); }
.company-stat-label .icon, .company-note > .icon { color: var(--bs-primary); }
.company-contact-avatar { background: #e7f1ff; color: #084298; }
.company-contact-card.masked { background: #fffdf5; border-color: #ffe69c; }
.company-contact-card.masked .company-contact-avatar { background: #fff3cd; color: #664d03; }
.company-contact-lock { background: #fff3cd; border-color: #ffe69c; color: #664d03; }
.company-contact-lock small { color: #997404; }
.company-contact-lock-icon { color: #997404; }
.partner-count { color: #084298; background: var(--blue-soft); }
.company-tag { background: #e7f1ff; color: #084298; }
.company-card-link { color: var(--bs-primary); }
.company-note { background: var(--bs-light); }

/* Contact masking */
.contact-lock-overlay { background: #fff3cd; border-color: #ffe69c; color: #664d03; }
.contact-lock-overlay small { color: #997404; }
.contact-head-icon { background: var(--blue-soft); color: #084298; }
.contact-lock-icon { color: #997404; }

/* Misc */
.contact-mini.locked { color: #997404; }
.contact-line .copy-btn:hover { background: var(--blue-soft); color: #084298; }
.unlock-strip { background: var(--bs-dark); }
.unlock-strip .icon { color: #9ec5fe; }
.unlock-strip button { background: var(--bs-primary); color: #fff; }
.source-tile { background: var(--bs-light); }
.company-note, .account-card .o-icon { background: var(--bs-light); }
.site-footer { border-top-color: var(--bs-border-color); }
.site-footer a:hover { color: var(--bs-primary); }
.skeleton { background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 37%, #e9ecef 63%); background-size: 400% 100%; }
.boot-screen { background: var(--bs-dark); }
.boot-mark span { background: var(--bs-primary); }
.boot-mark span:nth-child(2) { background: var(--bs-info); }
.boot-name { color: #9ec5fe; }


/* Feedback inbox */
.type-badge.warning { color: #a86900; background: #fff3cd; }
.feedback-reply-preview {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f5f8ff;
  border: 1px solid #e3ecfb;
  color: #526071;
  font-size: 10px;
  line-height: 1.55;
}
.feedback-reply-preview svg { flex: 0 0 auto; margin-top: 1px; color: #0d6efd; }
.feedback-quote {
  margin: 0 0 16px;
  padding: 13px 15px;
  border-radius: 10px;
  background: #f6f8fb;
  border: 1px solid #e8edf4;
  color: #2b3038;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Feedback inbox: task table fixes action buttons to 29px, but feedback needs a labelled button */
.feedback-table .run-actions .btn {
  width: auto;
  min-width: 64px;
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
}
