/*!*********************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************/
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #080B12;
  --surface: #0D1117;
  --surface-2: #111827;
  --border: #1C2333;
  --border-hover: #243044;
  --text: #E8EDF5;
  --muted: #8B95A8;
  --cyan: #00C9FF;
  --emerald: #10D68A;
  --amber: #F5A623;
  --violet: #9B72FF;
  --rose: #FF5B7A;
  --accent: var(--cyan);
  --accent-2: #0080FF;
  --success: var(--emerald);
  --warning: var(--amber);
  --danger: var(--rose);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Syne', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

.frame-wrap { min-height: 100vh; padding: 0; }
.app-frame {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  overflow: hidden;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 14px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}
.brand-dot {
  width: 8px;
  height: 22px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), #0080FF);
  box-shadow: 0 0 12px rgba(0,201,255,.35);
}
.brand h2 { margin: 0; font-size: 16px; line-height: 1; letter-spacing: .02em; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-family: 'JetBrains Mono', monospace; }

.nav-group-title {
  color: #4A5568;
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 12px 16px 6px;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-nav { display: grid; grid-gap: 2px; gap: 2px; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  transition: all .15s ease;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,.03); }
.sidebar-link.active { color: var(--cyan); background: rgba(0,201,255,.12); border-left-color: var(--cyan); }
.sidebar-icon {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #4A5568;
}
.sidebar-link.active .sidebar-icon { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

.nav-badge {
  margin-left: auto;
  background: rgba(255,91,122,.12);
  border: 1px solid rgba(255,91,122,.25);
  color: var(--rose);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.nav-new {
  margin-left: auto;
  background: rgba(16,214,138,.12);
  border: 1px solid rgba(16,214,138,.25);
  color: var(--emerald);
  font-size: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}
.sidebar-footer a {
  color: var(--muted);
  font-size: 12px;
  padding: 6px 0;
}
.sidebar-footer a:hover { color: var(--text); }

.footer-status { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.status-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.footer-label { font-size: 10px; color: #4A5568; font-family: 'JetBrains Mono', monospace; }

.content {
  background: var(--bg);
  padding: 0;
}

.topbar {
  min-height: 52px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.topbar-title { font-size: 13px; font-weight: 600; color: var(--text); }
.topbar-sub { font-size: 10px; color: #4A5568; margin-left: 8px; font-family: 'JetBrains Mono', monospace; letter-spacing: .08em; }
.flow-links {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.flow-links a {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.flow-links a:hover { border-color: var(--border-hover); color: var(--cyan); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.search-wrap { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #4A5568; pointer-events: none; }
.topbar-search {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 12px 6px 30px;
  font-size: 12px;
  width: 220px;
  border-radius: 4px;
  outline: none;
  font-family: 'Syne', sans-serif;
}
.topbar-search:focus { border-color: var(--cyan); color: var(--text); }
.topbar-btn {
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
}
.topbar-btn:hover { border-color: var(--border-hover); color: var(--text); }
.notif-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 4px var(--rose);
}

.page-header { margin-bottom: 20px; }
.page-eyebrow {
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-desc { font-size: 12px; color: #4A5568; margin-top: 5px; line-height: 1.5; }

.page-hero {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  background: var(--surface);
}
.page-hero h3 { margin: 0 0 4px; font-size: 14px; }
.page-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.demo-steps {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.demo-step {
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  color: #c9d2e9;
  background: rgba(255,255,255,.02);
}
.demo-step.active {
  border-color: rgba(139,92,246,.5);
  background: rgba(139,92,246,.16);
}

.icon-btn {
  height: 36px;
  width: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  color: #cfd6ea;
}
.icon-btn:hover { border-color: rgba(139,92,246,.45); }

.ui-input {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17,24,39,.65);
  color: var(--text);
  padding: 0 12px;
  min-width: 210px;
}
.ui-input::placeholder { color: #7f8aa4; }

.ui-textarea {
  width: 100%;
  min-height: 84px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17,24,39,.65);
  color: var(--text);
  padding: 10px 12px;
  resize: vertical;
}
.ui-textarea::placeholder { color: #7f8aa4; }

.ui-btn {
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 12px;
  font-weight: 600;
  color: #d8def0;
  background: rgba(255,255,255,.02);
}
.ui-btn:hover { transform: translateY(-1px); border-color: rgba(139,92,246,.34); }
.ui-btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: white;
}
.ui-btn-secondary { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.35); }
.ui-btn-ghost { background: transparent; }

.ui-btn:focus-visible,
.ui-input:focus-visible,
.sidebar-link:focus-visible,
.icon-btn:focus-visible {
  outline: 2px solid rgba(139,92,246,.7);
  outline-offset: 1px;
}

.ui-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(99,102,241,.08), transparent 45%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%);
  padding: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.02);
  transition: transform .18s ease, border-color .18s ease;
}
.ui-card:hover {
  transform: translateY(-1px);
  border-color: rgba(139,92,246,.3);
}
.ui-card-header { margin-bottom: 10px; }
.ui-card-title { margin: 0; font-size: 14px; }
.ui-card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.dash-stack { display: grid; grid-gap: 12px; gap: 12px; }
.kpi-grid { display: grid; grid-gap: 12px; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  position: relative;
}
.kpi-card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.kpi-card.cyan::after { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }
.kpi-card.emerald::after { background: linear-gradient(90deg, transparent, var(--emerald), transparent); }
.kpi-card.amber::after { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.kpi-card.violet::after { background: linear-gradient(90deg, transparent, var(--violet), transparent); }
.kpi-label {
  font-size: 9px;
  letter-spacing: .14em;
  color: #4A5568;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi-value { margin: 0; font-size: 30px; font-weight: 800; line-height: 1; }
.kpi-value.cyan { color: var(--cyan); }
.kpi-value.emerald { color: var(--emerald); }
.kpi-value.amber { color: var(--amber); }
.kpi-value.violet { color: var(--violet); }
.kpi-delta { font-size: 10px; color: #8B95A8; font-family: 'JetBrains Mono', monospace; margin-top: 6px; }

.split-panels { display: grid; grid-gap: 12px; gap: 12px; grid-template-columns: 1fr 1fr; }
.research-run { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; transition: border-color .2s; }
.research-run:hover { border-color: var(--border-hover); }
.research-run.active { border-color: var(--cyan); }
.run-header { padding: 12px 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; }
.mono { font-family: 'JetBrains Mono', monospace; }
.text-dim { color: #4A5568; }
.text-xs { font-size: 10px; }
.fade-in { animation: fadeIn .25s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity:1; transform: translateY(0);} }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: conic-gradient(#8b5cf6 0 38%, #6366f1 38% 58%, #4f46e5 58% 78%, #7c3aed 78% 100%);
  display: grid;
  place-items: center;
}
.donut-hole {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #0f1522;
  display: grid;
  place-items: center;
  text-align: center;
}
.donut-hole strong { font-size: 24px; }
.donut-hole span { font-size: 11px; color: var(--muted); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; grid-gap: 8px; gap: 8px; color: #cfd7eb; }
.legend li { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 170px; }
.dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.dot-1 { background: #8b5cf6; } .dot-2 { background: #6366f1; } .dot-3 { background: #4f46e5; } .dot-4 { background: #7c3aed; }

.rev-number { font-size: 30px; margin: 6px 0 10px; font-weight: 700; }
.line-chart {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  height: 140px;
  background: linear-gradient(180deg, rgba(255,255,255,.01), rgba(255,255,255,0));
  overflow: hidden;
}
.gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,.05);
}
.gridline:nth-child(1) { top: 30%; }
.gridline:nth-child(2) { top: 55%; }
.gridline:nth-child(3) { top: 78%; }
.line-chart svg { width: 100%; height: 100%; }
.line-chart polyline {
  fill: none;
  stroke: #8b5cf6;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(139,92,246,.55));
}
.legend-inline { display: flex; gap: 8px; margin-top: 10px; }

.badge, .ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  border-radius: 4px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: #dce3f5;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
}
.badge.new { color: var(--cyan); border-color: rgba(0,201,255,.3); background: rgba(0,201,255,.1); }
.badge.active { color: var(--emerald); border-color: rgba(16,214,138,.3); background: rgba(16,214,138,.1); }
.badge.pending { color: var(--amber); border-color: rgba(245,166,35,.3); background: rgba(245,166,35,.1); }
.badge.done { color: #8B95A8; border-color: rgba(74,85,104,.3); background: rgba(74,85,104,.16); }
.badge.violet { color: var(--violet); border-color: rgba(155,114,255,.3); background: rgba(155,114,255,.1); }
.badge.error { color: var(--rose); border-color: rgba(255,91,122,.3); background: rgba(255,91,122,.1); }
.ui-badge-success { color: #b8f7df; border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.14); }
.ui-badge-warning { color: #ffe6ba; border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.14); }
.ui-badge-danger { color: #ffd0d8; border-color: rgba(251,113,133,.45); background: rgba(251,113,133,.14); }
.ui-badge-info { color: #d1cbff; border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.14); }

.table-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ui-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 10px;
}
.ui-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ui-table th, .ui-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  text-align: left;
}
.ui-table th {
  color: #4A5568;
  font-weight: 600;
  background: rgba(255,255,255,.01);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.ui-table td { font-size: 12px; font-family: 'Syne', sans-serif; }
.ui-table tr:hover td { background: rgba(255,255,255,.02); }
.error-text { color: #ff9cab; margin: 8px 0 2px; }
.muted { color: var(--muted); }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .split-panels { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .frame-wrap { padding: 0; }
  .app-frame { border-radius: 0; min-height: 100vh; }
  .shell { grid-template-columns: 72px 1fr; }
  .brand h2, .brand p, .nav-group-title, .sidebar-label, .sidebar-footer a, .profile-chip { display: none; }
  .brand { justify-content: center; }
  .sidebar-link { justify-content: center; padding: 10px; }
  .topbar { flex-wrap: wrap; }
  .ui-input { min-width: 150px; }
}

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tab {
  padding: 9px 16px;
  font-size: 12px;
  color: #4A5568;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab:hover { color: var(--muted); }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

.post-card { border: 1px solid var(--border); border-radius: 6px; padding: 14px; background: var(--surface-2); transition: all .15s; }
.post-card:hover { border-color: var(--border-hover); }
.post-preview { font-size: 12px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 10px 0; }

.flex { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.mb-8 { margin-bottom: 8px; }
.ml-auto { margin-left: auto; }

.connection-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  transition: border-color .2s;
}
.connection-card:hover { border-color: var(--border-hover); }
.connection-card.connected { border-color: rgba(16,214,138,.28); }

.quota-bar { display: flex; align-items: center; gap: 10px; }
.quota-track { flex: 1 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.quota-fill { height: 100%; border-radius: 2px; }

.gap-12 { gap: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-12 { margin-bottom: 12px; }
.kpi-card.rose::after { background: linear-gradient(90deg, transparent, var(--rose), transparent); }
.empty-state { text-align: center; padding: 40px 20px; color: #4A5568; font-size: 11px; line-height: 1.8; }
.empty-icon { font-size: 28px; margin-bottom: 10px; opacity: .45; }

.channel-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.channel-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.channel-pill:hover { border-color: var(--border-hover); color: var(--text); }
.channel-pill.on { border-color: rgba(16,214,138,.4); color: var(--emerald); background: rgba(16,214,138,.1); }
.channel-pill.on .ch-dot { background: var(--emerald); box-shadow: 0 0 6px var(--emerald); }
.channel-pill.off .ch-dot { background: #4A5568; }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; }

/* --- Premium polish compliance override (Parts 1-11) --- */
* { transition: all .15s ease; }
html, body { font-family: 'Syne', system-ui, sans-serif; }

/* content spacing */
.content { padding: 28px !important; }
.dash-stack { display: grid; grid-gap: 20px; gap: 20px; }
.page-header { margin-bottom: 24px !important; }

/* typography scale */
.page-title { font-size: 22px !important; font-weight: 700 !important; }
.ui-card-title { font-size: 13px !important; font-weight: 600 !important; font-family: 'Syne', sans-serif; }
.ui-card-subtitle, .mono, .text-xs, .kpi-label, .kpi-delta, .page-eyebrow, .nav-group-title, .footer-label, .topbar-sub { font-family: 'JetBrains Mono', monospace !important; }
.page-eyebrow { font-size: 10px !important; letter-spacing: .18em !important; text-transform: uppercase; color: var(--cyan) !important; }
.page-desc, .muted, p { font-size: 12px; }
.kpi-value { font-size: 28px !important; font-weight: 700 !important; font-family: 'Syne', sans-serif; }
.kpi-label { font-size: 9px !important; letter-spacing: .14em !important; text-transform: uppercase; }

/* cards */
.ui-card {
  background: #0D1117 !important;
  border: 1px solid #1C2333 !important;
  border-radius: 6px !important;
  overflow: hidden;
  padding: 18px !important;
}
.ui-card:hover { border-color: #243044 !important; }
.ui-card-header {
  background: #0A0E17;
  border-bottom: 1px solid #1C2333;
  margin: -18px -18px 16px -18px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}
.ui-card-subtitle { font-size: 10px; color: #4A5568; margin: 0; }

/* tables */
.ui-table th, .ui-table td, .data-table th, .data-table td { padding: 11px 14px !important; }
.ui-table th, .data-table th {
  font-size: 9px !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace !important;
}
.ui-table td, .data-table td { font-size: 12px !important; font-family: 'Syne', sans-serif !important; color: var(--muted); }
.ui-table tr:hover td, .data-table tr:hover td { background: rgba(255,255,255,.018) !important; color: var(--text) !important; }

/* inputs */
.ui-input, .ui-textarea, input, select, textarea {
  padding: 8px 12px !important;
  border-radius: 4px !important;
  border: 1px solid #1C2333 !important;
  background: #111827 !important;
  color: var(--text) !important;
  font-family: 'Syne', sans-serif;
}
.ui-input:focus, .ui-textarea:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--cyan) !important;
  box-shadow: 0 0 0 1px rgba(0,201,255,.3);
  outline: none;
}

/* buttons: only 3 visual modes mapped from existing variants */
.ui-btn {
  padding: 8px 16px !important;
  border-radius: 4px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: 'Syne', sans-serif !important;
  cursor: pointer;
  border: 1px solid transparent;
}
.ui-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
.ui-btn-primary {
  background: linear-gradient(135deg, #00C9FF, #0080FF) !important;
  color: #fff !important;
  box-shadow: 0 0 16px rgba(0,201,255,.25);
}
.ui-btn-primary:hover { box-shadow: 0 0 24px rgba(0,201,255,.45); transform: translateY(-1px); }
.ui-btn-secondary {
  background: transparent !important;
  border-color: #243044 !important;
  color: var(--muted) !important;
}
.ui-btn-secondary:hover { border-color: var(--cyan) !important; color: var(--cyan) !important; background: rgba(0,201,255,.08) !important; transform: translateY(-1px); }
.ui-btn-ghost {
  background: transparent !important;
  border-color: rgba(255,91,122,.3) !important;
  color: var(--rose) !important;
}
.ui-btn-ghost:hover { background: rgba(255,91,122,.08) !important; box-shadow: 0 0 12px rgba(255,91,122,.35); transform: translateY(-1px); }

/* badge consistency + dot */
.ui-badge, .badge {
  font-size: 10px !important;
  font-family: 'JetBrains Mono', monospace !important;
  padding: 3px 8px !important;
  border-radius: 3px !important;
  position: relative;
}
.ui-badge::before, .badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  background: currentColor;
}
.ui-badge-default, .badge.done { background: rgba(74,85,104,.2) !important; color: #8B95A8 !important; border: 1px solid rgba(74,85,104,.35) !important; }
.ui-badge-success, .badge.active { background: rgba(16,214,138,.1) !important; color: var(--emerald) !important; border: 1px solid rgba(16,214,138,.25) !important; }
.ui-badge-warning, .badge.pending { background: rgba(245,166,35,.1) !important; color: var(--amber) !important; border: 1px solid rgba(245,166,35,.25) !important; }
.ui-badge-danger, .badge.error { background: rgba(255,91,122,.1) !important; color: var(--rose) !important; border: 1px solid rgba(255,91,122,.25) !important; }
.ui-badge-info, .badge.new { background: rgba(0,201,255,.12) !important; color: var(--cyan) !important; border: 1px solid rgba(0,201,255,.2) !important; }
.badge.violet { background: rgba(155,114,255,.12) !important; color: var(--violet) !important; border: 1px solid rgba(155,114,255,.25) !important; }

/* sidebar polish top line */
.sidebar { position: relative; width: 220px !important; }
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #00C9FF, transparent);
  opacity: .4;
}

/* topbar exact */
.topbar { height: 52px !important; min-height: 52px !important; }

/* clickable card microinteraction */
.post-card:hover, .research-run:hover, .channel-pill:hover {
  box-shadow: inset 2px 0 0 var(--cyan);
}

/* error card utility */
.error-card {
  background: rgba(255,91,122,.08);
  border: 1px solid rgba(255,91,122,.25);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* skeleton base for next pass */
.skeleton {
  border-radius: 4px;
  background: linear-gradient(90deg, #1C2333 25%, #243044 50%, #1C2333 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* targeted fixes before part 12 */
.sidebar-link.active { background: rgba(0,201,255,.08) !important; }

/* ensure no flat cyan buttons */
button.ui-btn-primary,
.ui-btn-primary,
button.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, #00C9FF, #0080FF) !important;
  box-shadow: 0 0 16px rgba(0,201,255,.25) !important;
}
button.ui-btn-primary:hover,
.ui-btn-primary:hover,
button.btn-primary:hover,
.btn-primary:hover {
  box-shadow: 0 0 24px rgba(0,201,255,.45) !important;
}

/* topbar controls exact polish */
.topbar-search::placeholder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #4A5568;
}
.topbar-btn {
  width: 32px !important;
  height: 32px !important;
  border: 1px solid #1C2333 !important;
  border-radius: 4px !important;
  background: #111827 !important;
}
.topbar-btn:hover { border-color: #243044 !important; }
.topbar-profile {
  border-radius: 999px !important;
  background: linear-gradient(135deg, #00C9FF22, #0080FF22) !important;
  border-color: rgba(0,201,255,.35) !important;
  color: var(--cyan) !important;
  font-weight: 700;
}

/* KPI values should always render number text plainly */
.kpi-value::before,
.kpi-value::after { content: none !important; }

/* dynamic elements */
@keyframes pulseDot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: .5; }
}
.status-dot { animation: pulseDot 2s infinite; }

.progress-bar { height: 4px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width .3s ease; }

.toast-wrap {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9999;
  display: grid;
  grid-gap: 8px;
  gap: 8px;
}
.toast {
  min-width: 240px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  animation: toastIn .2s ease;
  font-size: 12px;
}
.toast.info { border-color: rgba(0,201,255,.25); color: var(--cyan); background: rgba(0,201,255,.1); }
.toast.success { border-color: rgba(16,214,138,.25); color: var(--emerald); background: rgba(16,214,138,.1); }
.toast.warning { border-color: rgba(245,166,35,.25); color: var(--amber); background: rgba(245,166,35,.1); }
.toast.error { border-color: rgba(255,91,122,.25); color: var(--rose); background: rgba(255,91,122,.1); }
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }

/* part12 remaining */
.page-slot { animation: pageEnter .2s ease; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.chart-row { display: grid; grid-gap: 4px; gap: 4px; }
.chart-bar {
  height: 6px;
  border-radius: 3px;
  transform-origin: left center;
  animation: barGrow .6s ease-out;
}
.chart-cyan { background: var(--cyan); }
.chart-emerald { background: var(--emerald); }
.chart-violet { background: var(--violet); }
@keyframes barGrow { from { transform: scaleX(0); opacity: .6; } to { transform: scaleX(1); opacity: 1; } }

/* clickable microinteraction accent */
.post-card,
.research-run,
.channel-pill,
.ui-table tbody tr,
.data-table tbody tr { position: relative; }
.post-card::before,
.research-run::before,
.channel-pill::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--cyan);
  opacity: 0;
  transition: opacity .15s ease;
}
.post-card:hover::before,
.research-run:hover::before,
.channel-pill:hover::before { opacity: 1; }

/* ============================================================
   Mobile responsive layer (added 2026-04-19)
   Overrides earlier !important rules with equal specificity.
   ============================================================ */

/* Hamburger button — hidden on desktop, visible on mobile */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  margin-right: 8px;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.menu-toggle:hover { border-color: var(--cyan); }

/* Backdrop overlay for open mobile nav */
.nav-backdrop {
  display: none;
}

@media (max-width: 900px) {
  /* Show hamburger, hide desktop-only flow-links */
  .menu-toggle { display: inline-flex; }
  .flow-links { display: none !important; }
  .topbar-sub { display: none; }

  /* Grid collapses to single column; sidebar becomes slide-in overlay */
  .shell { grid-template-columns: 1fr !important; }
  .sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px !important;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .2s ease;
    overflow-y: auto;
    box-shadow: 2px 0 24px rgba(0,0,0,.6);
  }
  .shell-open .sidebar { transform: translateX(0); }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 50;
  }

  /* Compact content padding */
  .content { padding: 14px !important; }
  .dash-stack { gap: 14px; }
  .page-header { margin-bottom: 14px !important; }
  .page-title { font-size: 18px !important; }
  .page-desc, .muted, p { font-size: 13px; }
  .ui-card { padding: 14px; }
  .ui-card-title { font-size: 14px !important; }

  /* Topbar: stack elements, shrink search */
  .topbar {
    flex-wrap: wrap;
    gap: 8px !important;
    height: auto !important;
    min-height: 52px !important;
    padding: 10px 14px !important;
  }
  .topbar-heading { flex: 1 1; min-width: 0; }
  .topbar-title {
    font-size: 15px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-actions { gap: 6px; }
  .search-wrap { display: none; }
  .topbar-btn {
    min-width: 40px;
    min-height: 40px;
  }

  /* Pop-overs (search/notif/profile) take full width on mobile */
  .topbar-actions .ui-card {
    position: fixed !important;
    top: 64px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
  }

  /* Tables — allow horizontal scroll rather than overflow */
  .ui-table, .data-table, table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* KPI grids: single column */
  .kpi-grid { grid-template-columns: 1fr !important; }
  .split-panels { grid-template-columns: 1fr !important; }

  /* Touch-target minimums */
  button, .ui-button, .sidebar-link {
    min-height: 40px;
  }
  .sidebar-link {
    padding: 12px 16px !important;
    justify-content: flex-start !important;
  }
  .sidebar-label { display: inline !important; font-size: 14px; }
  .brand h2, .brand p, .nav-group-title { display: block !important; }
}

@media (max-width: 480px) {
  .topbar-title { font-size: 14px !important; }
  .content { padding: 10px !important; }
  .kpi-value { font-size: 22px !important; }
}

/* Disable the global transition for reduced-motion users and
   scope the default to specific properties to save CPU on mobile. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ============================================================
   Mobile optimization pass 2 — aggressive inline-style overrides
   React inline styles beat CSS by specificity. We use attribute
   selectors + !important to force single-column grids and full-width
   fixed panels on narrow viewports, without touching page source.
   ============================================================ */

@media (max-width: 900px) {
  /* Any element with an inline grid-template-columns (from inline React
     styles) collapses to a single column on mobile. Covers:
       - "1fr 1fr", "1fr 1fr 1fr"
       - "repeat(N, ...)" with any column count
       - "320px minmax(0,1fr)" split-panel layouts */
  [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Narrow breakpoint (≤640) keep single column but also tighten gaps */
  [style*="grid-template-columns"][style*="gap"] {
    gap: 10px !important;
  }

  /* Fixed-position side drawers (lead detail, research detail) become
     full-width bottom sheets on mobile. Catches width: 360/420/etc. */
  aside[style*="position: fixed"],
  aside[style*="position:fixed"] {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    height: 85vh !important;
    border-left: none !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 16px 16px 0 0 !important;
    overflow-y: auto;
  }

  /* Kanban board columns (Board page) — allow horizontal scroll instead
     of shrinking below readable width */
  [style*="min-width: 240"],
  [style*="minWidth: 240"],
  [style*="min-width:240"] {
    min-width: 260px !important;
  }

  /* Any large inline width value → 100% */
  [style*="width: 360"],
  [style*="width: 420"],
  [style*="width: 340"],
  [style*="width: 320"],
  [style*="width:360"],
  [style*="width:420"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Toolbars of buttons (table-toolbar) wrap instead of overflowing */
  .table-toolbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .table-toolbar .ui-input,
  .table-toolbar input[type="text"],
  .table-toolbar input:not([type]) {
    min-width: 140px;
    flex: 1 1 140px;
  }

  /* Prevent horizontal body scroll from any overflow */
  html, body { overflow-x: hidden; }
  .frame-wrap, .app-frame, .shell, .content { max-width: 100vw; }

  /* ui-input / inputs: stretch to fill available space */
  .ui-input, input[type="text"], input[type="email"], input[type="password"], textarea {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Modal / dialog panels — shrink from ~600px to full width */
  .modal, .dialog, [role="dialog"] {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Typography — relax fixed font-size rules for readability */
  .kpi-value { font-size: 20px !important; }
  .kpi-title, .kpi-label { font-size: 10px !important; }

  /* Research-style "6-KPI" row becomes horizontally scrollable cards
     when the grid-template-columns contains repeat(6,...). Users prefer
     swipe-through over stacking 6 rows tall. */
  [style*="repeat(6"],
  [style*="repeat(5"] {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(130px, 1fr) !important;
    grid-template-columns: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  [style*="repeat(6"] > *,
  [style*="repeat(5"] > * {
    scroll-snap-align: start;
  }

  /* Page header flex wraps */
  .page-header > div { flex-wrap: wrap !important; }
  .page-header [style*="display: flex"],
  .page-header [style*="display:flex"] { flex-wrap: wrap !important; }

  /* Badges and pills inside flex rows wrap cleanly */
  .table-toolbar > * { min-width: 0; }
}

@media (max-width: 480px) {
  .kpi-value { font-size: 18px !important; }
  [style*="repeat(6"],
  [style*="repeat(5"],
  [style*="repeat(4"],
  [style*="repeat(3"] {
    grid-auto-columns: minmax(110px, 1fr) !important;
  }
}

/* ============================================================
   Login page + sidebar footer (auth UI)
   ============================================================ */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(0,201,255,.08), transparent 70%),
    var(--bg, #080B12);
}

.login-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  background: var(--surface, #0D1117);
  border: 1px solid var(--border, #1C2333);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.login-dot {
  width: 10px;
  height: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan, #00C9FF), #0080FF);
  box-shadow: 0 0 14px rgba(0, 201, 255, .4);
}
.login-title {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #E6EDF3);
  letter-spacing: .02em;
  line-height: 1;
}
.login-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted, #7D8590);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-top: 4px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-field span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--muted, #7D8590);
  text-transform: uppercase;
  letter-spacing: .14em;
}
.login-field input {
  background: #080B12;
  border: 1px solid var(--border, #1C2333);
  border-radius: 8px;
  color: var(--text, #E6EDF3);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  min-height: 44px;
  box-sizing: border-box;
}
.login-field input:focus {
  outline: none;
  border-color: var(--cyan, #00C9FF);
  box-shadow: 0 0 0 3px rgba(0, 201, 255, .15);
}
.login-field input:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.login-error {
  padding: 10px 12px;
  background: rgba(239, 68, 68, .1);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #fca5a5;
  border-radius: 8px;
  font-size: 13px;
}

.login-submit {
  min-height: 44px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  color: #001219;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan, #00C9FF), #0080FF);
  box-shadow: 0 6px 18px rgba(0, 201, 255, .3);
  font-family: inherit;
}
.login-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 201, 255, .4);
}
.login-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* Sidebar footer — user identity + sign-out */
.sidebar-footer .footer-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 170px;
  display: inline-block;
}
.footer-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--muted, #7D8590);
  text-transform: uppercase;
  letter-spacing: .18em;
  padding: 0 16px 8px;
}
.footer-logout {
  margin: 4px 12px 12px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border, #1C2333);
  border-radius: 8px;
  color: var(--text, #E6EDF3);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  width: calc(100% - 24px);
  min-height: 36px;
}
.footer-logout:hover {
  border-color: #EF4444;
  color: #FCA5A5;
}

@media (max-width: 900px) {
  .sidebar-footer .footer-label {
    max-width: 220px;
  }
  .footer-logout {
    min-height: 44px;
    font-size: 14px;
  }
}

/* ============================================================
   Nav badges + coming-soon treatment (audit cleanup 2026-04-20)
   ============================================================ */

.nav-beta {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--muted, #7D8590);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.22);
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: auto;
}

.sidebar-link.beta {
  opacity: 0.62;
}
.sidebar-link.beta:hover {
  opacity: 0.85;
}

/* Coming-soon banner inside a scaffolded page */
.coming-soon-banner {
  background: linear-gradient(135deg, rgba(212,175,55,0.06), rgba(95,122,78,0.06));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.coming-soon-banner .cs-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #A8821C;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.35);
}
.coming-soon-banner .cs-text {
  flex: 1 1;
  font-size: 13px;
  color: var(--muted, #7D8590);
  line-height: 1.5;
}

/* ============================================================
   World-class polish layer (2026-04-23)
   ------------------------------------------------------------
   Layered ON TOP of the base dark theme — doesn't replace
   anything, just elevates it.
   ============================================================ */

/* Aurora background — subtle radial bloom behind the app */
body {
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(0,201,255,.08), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(155,114,255,.08), transparent 60%),
    radial-gradient(800px 500px at 50% 100%, rgba(16,214,138,.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Subtle grain / noise on the whole app — adds depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .28;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.app-frame { position: relative; z-index: 1; }

/* Brand-dot animated chroma */
.brand-dot {
  background: linear-gradient(135deg, #00C9FF 0%, #0080FF 50%, #9B72FF 100%);
  animation: brandDotShift 6s ease-in-out infinite alternate;
  box-shadow:
    0 0 14px rgba(0,201,255,.4),
    0 0 32px rgba(155,114,255,.2);
}
@keyframes brandDotShift {
  0%   { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(30deg); }
}

/* Glass topbar */
.topbar {
  background:
    linear-gradient(180deg, rgba(13,17,23,.78), rgba(13,17,23,.62));
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* Glass sidebar */
.sidebar {
  background: linear-gradient(180deg, rgba(13,17,23,.9), rgba(13,17,23,.75));
  backdrop-filter: saturate(130%) blur(8px);
  -webkit-backdrop-filter: saturate(130%) blur(8px);
  border-right: 1px solid rgba(255,255,255,.05);
}

/* Sidebar active: add ambient glow */
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(0,201,255,.14), rgba(0,201,255,.04));
  box-shadow: inset 0 0 0 1px rgba(0,201,255,.12);
}
.sidebar-link.active::after {
  content: '';
  position: absolute;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  top: 50%;
  transform: translateY(-50%);
}
.sidebar-link { position: relative; }

/* ===== World-class Overview hero ====================== */
.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 32px 32px 28px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(0,201,255,.20), transparent 55%),
    radial-gradient(100% 100% at 100% 0%, rgba(155,114,255,.18), transparent 55%),
    radial-gradient(80% 120% at 100% 100%, rgba(16,214,138,.12), transparent 60%),
    linear-gradient(180deg, #0E1624 0%, #0B111C 100%);
  box-shadow:
    0 30px 60px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.05);
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.6px 1.6px at 70% 20%, rgba(255,255,255,.4), transparent),
    radial-gradient(2.4px 2.4px at 40% 70%, rgba(0,201,255,.5), transparent),
    radial-gradient(1.8px 1.8px at 85% 65%, rgba(155,114,255,.5), transparent),
    radial-gradient(1.6px 1.6px at 10% 80%, rgba(16,214,138,.4), transparent);
  animation: twinkle 6s ease-in-out infinite alternate;
  opacity: .6;
  pointer-events: none;
}
@keyframes twinkle {
  0%   { opacity: .4; }
  100% { opacity: .85; }
}
.hero-panel .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,201,255,.12), rgba(155,114,255,.12));
  border: 1px solid rgba(0,201,255,.25);
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .15em;
  font-weight: 600;
}
.hero-panel .hero-eyebrow .live-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .55; transform: scale(.85); }
}
.hero-panel h1.hero-title {
  margin: 16px 0 8px;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #FFFFFF 0%, #C9E6FF 50%, #D8B8FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-panel p.hero-desc {
  margin: 0;
  color: #B0BAC9;
  font-size: 14.5px;
  max-width: 60ch;
  line-height: 1.55;
}
.hero-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: .01em;
  color: #051A24;
  background: linear-gradient(90deg, #00C9FF 0%, #7AD8FF 100%);
  border: 1px solid rgba(0,201,255,.5);
  box-shadow:
    0 10px 30px rgba(0,201,255,.3),
    inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 40px rgba(0,201,255,.45),
    inset 0 1px 0 rgba(255,255,255,.55);
}
.hero-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13.5px;
  color: #D6DFEE;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: background .2s ease, border-color .2s ease;
}
.hero-cta-ghost:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
}
.hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
  color: #8B95A8;
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
}
.hero-meta strong { color: #E8EDF5; font-weight: 600; margin-left: 6px; }

/* ===== KPI v2 — animated gradient border + glow ======= */
.kpi-card {
  padding: 20px 20px 18px;
  background:
    linear-gradient(180deg, rgba(17,24,39,.9), rgba(13,17,23,.9));
  border-radius: 14px;
  position: relative;
  transition: transform .2s ease, box-shadow .25s ease;
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0,201,255,.28), rgba(155,114,255,.22), rgba(0,201,255,.28));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: .55;
  transition: opacity .2s ease;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,.4);
}
.kpi-card:hover::before { opacity: 1; }
.kpi-card::after {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 20px rgba(0,201,255,.4);
}
.kpi-card.cyan::after    { background: linear-gradient(90deg, transparent, var(--cyan), transparent);    box-shadow: 0 0 20px rgba(0,201,255,.5); }
.kpi-card.emerald::after { background: linear-gradient(90deg, transparent, var(--emerald), transparent); box-shadow: 0 0 20px rgba(16,214,138,.5); }
.kpi-card.amber::after   { background: linear-gradient(90deg, transparent, var(--amber), transparent);   box-shadow: 0 0 20px rgba(245,166,35,.5); }
.kpi-card.violet::after  { background: linear-gradient(90deg, transparent, var(--violet), transparent);  box-shadow: 0 0 20px rgba(155,114,255,.5); }
.kpi-value { font-size: 38px; font-weight: 800; letter-spacing: -.03em; }
.kpi-label {
  font-size: 10.5px;
  color: #7C8599;
  font-weight: 600;
  letter-spacing: .14em;
}

/* ===== Card v2 — chromatic subtle border + inner glow === */
.ui-card {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background:
    radial-gradient(130% 110% at 0% 0%, rgba(0,201,255,.08), transparent 50%),
    radial-gradient(100% 100% at 100% 0%, rgba(155,114,255,.06), transparent 55%),
    linear-gradient(180deg, #101724 0%, #0B111C 100%);
  padding: 18px;
  box-shadow:
    0 10px 30px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.04);
}
.ui-card:hover {
  border-color: rgba(0,201,255,.22);
  box-shadow:
    0 16px 42px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.06),
    0 0 0 1px rgba(0,201,255,.08);
}
.ui-card-title { font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: #E8EDF5; }
.ui-card-subtitle { font-size: 12.5px; color: #7F8A9E; }

/* ===== Button v2 ======================================= */
.ui-btn {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  color: #D6DFEE;
  font-weight: 600;
  font-size: 13px;
  transition: all .18s ease;
}
.ui-btn:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(0,201,255,.3);
  color: #E8EDF5;
}
.ui-btn-primary {
  background: linear-gradient(90deg, #00C9FF 0%, #0080FF 100%);
  border-color: transparent;
  color: #051A24;
  box-shadow: 0 8px 24px rgba(0,201,255,.3), inset 0 1px 0 rgba(255,255,255,.4);
}
.ui-btn-primary:hover {
  box-shadow: 0 12px 32px rgba(0,201,255,.45), inset 0 1px 0 rgba(255,255,255,.5);
  color: #031320;
}
.ui-btn-secondary {
  background: rgba(0,201,255,.1);
  border-color: rgba(0,201,255,.25);
  color: #9EE3FF;
}
.ui-btn-secondary:hover { background: rgba(0,201,255,.16); border-color: rgba(0,201,255,.4); }
.ui-btn-ghost { background: transparent; border-color: rgba(255,255,255,.08); }

/* ===== Page hero gradient eyebrow ====================== */
.page-eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,201,255,.12), rgba(155,114,255,.12));
  border: 1px solid rgba(0,201,255,.22);
  color: #9EE3FF;
  font-weight: 600;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
  background: linear-gradient(90deg, #E8EDF5 0%, #B8C4DC 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.page-desc { color: #8B95A8; font-size: 13.5px; line-height: 1.55; }

/* ===== Table v2 (zebra + hover glow) =================== */
.ui-table-wrap {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(13,17,23,.7);
}
.ui-table thead th {
  background: rgba(255,255,255,.03);
  color: #8B95A8;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 12px 14px;
}
.ui-table tbody tr:nth-child(even) { background: rgba(255,255,255,.015); }
.ui-table tbody tr:hover {
  background: rgba(0,201,255,.05);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.ui-table tbody td {
  border-bottom: 1px solid rgba(255,255,255,.05);
  padding: 12px 14px;
  color: #D6DFEE;
}

/* ===== Badge v2 (soft + chromatic borders) ============= */
.ui-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.ui-badge-default { background: rgba(255,255,255,.05); color: #B0BAC9; border: 1px solid rgba(255,255,255,.06); }
.ui-badge-success { background: rgba(16,214,138,.12); color: #44F0B2; border: 1px solid rgba(16,214,138,.25); }
.ui-badge-warning { background: rgba(245,166,35,.12); color: #FFC466; border: 1px solid rgba(245,166,35,.28); }
.ui-badge-danger  { background: rgba(255,91,122,.12); color: #FF8AA0; border: 1px solid rgba(255,91,122,.28); }
.ui-badge-info    { background: rgba(0,201,255,.12); color: #7FDCFF; border: 1px solid rgba(0,201,255,.28); }

/* ===== Route-frame padding wrapper ===================== */
.route-frame { padding: 28px 32px 48px; max-width: 1440px; margin: 0 auto; }
@media (max-width: 880px) { .route-frame { padding: 18px 16px 32px; } }

/* ===== Scrollbar restyle ============================== */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(0,201,255,.25); background-clip: padding-box; border: 2px solid transparent; }

/* ===== Fade-in for all page routes ===================== */
.dash-stack > * {
  animation: fadeUp .5s ease backwards;
}
.dash-stack > *:nth-child(1) { animation-delay: .02s; }
.dash-stack > *:nth-child(2) { animation-delay: .08s; }
.dash-stack > *:nth-child(3) { animation-delay: .14s; }
.dash-stack > *:nth-child(4) { animation-delay: .20s; }
.dash-stack > *:nth-child(5) { animation-delay: .26s; }
.dash-stack > *:nth-child(6) { animation-delay: .32s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Focus ring ================================ */
:focus-visible {
  outline: 2px solid rgba(0,201,255,.55);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ===== Nav v2 — icons + 7-group density (2026-10-25, revised) =====
   The sidebar is a normal grid cell that scrolls WITH the page (no
   independent overflow/sticky container) — that's what kept it in sync
   with the main content and avoided a second, differently-styled
   scrollbar. The brand header still visually anchors the top since the
   page always loads scrolled to 0. */
.nav-group { padding-top: 6px; }
.nav-group + .nav-group {
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,.05);
}
.nav-group-title { margin: 10px 16px 4px; }
.sidebar-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #5B6B85;
  flex-shrink: 0;
  transition: color .15s ease;
}
.sidebar-link.active .sidebar-icon-wrap { color: var(--cyan); filter: drop-shadow(0 0 4px rgba(0,201,255,.5)); }
.sidebar-link:hover .sidebar-icon-wrap { color: var(--text); }

/* ===== Agents page — card accents + stat rows (2026-10-25) ===== */
.agent-card { border-left: 2px solid transparent; }
.agent-card-cyan { border-left-color: var(--cyan); }
.agent-card-violet { border-left-color: var(--violet); }
.agent-card-top {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.agent-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 8px;
  gap: 8px;
  background: rgba(0,0,0,.18);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}
.agent-stat-value { font-size: 18px; font-weight: 700; }
.agent-history-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.015);
}

/* ===== Board (kanban) — token-based columns + cards (2026-10-25) ===== */
.board-cols { display: flex; flex-direction: row; gap: 12px; overflow-x: auto; }
.board-col {
  min-width: 260px;
  max-width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, background .15s ease;
}
.board-col.drag-over { border-color: var(--cyan); background: rgba(0,201,255,.05); }
.board-col-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.board-col-body { flex: 1 1; overflow-y: auto; padding: 8px; }
.board-lead-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: -webkit-grab;
  cursor: grab;
  transition: border-color .15s ease, opacity .15s ease, transform .15s ease;
}
.board-lead-card:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.board-lead-card.dragging { border-color: var(--cyan); opacity: .5; }

/* ===== Help page — step cards + FAQ (2026-10-25) ===== */
.help-steps { display: grid; grid-gap: 10px; gap: 10px; }
.help-step-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background:
    radial-gradient(130% 110% at 0% 0%, rgba(0,201,255,.06), transparent 50%),
    linear-gradient(180deg, #101724 0%, #0B111C 100%);
  box-shadow: 0 10px 30px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .18s ease, transform .18s ease;
}
.help-step-card:hover { border-color: rgba(0,201,255,.22); transform: translateY(-1px); }
.help-step-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 10px;
  background: rgba(0,201,255,.1);
  border: 1px solid rgba(0,201,255,.22);
}
.help-step-body { flex: 1 1; }
.help-step-name { font-weight: 700; font-size: 14px; margin: 2px 0; }
.help-step-arrow { color: var(--cyan); font-size: 18px; }

