:root {
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  --tr: 0.18s ease;
}

/* ---------------------------- Dark theme ---------------------------- */
[data-theme='dark'] {
  --bg: #060b18;
  --bg-grad: radial-gradient(1200px 600px at 78% -8%, rgba(45, 212, 191, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(56, 189, 248, 0.06), transparent 55%), #060b18;
  --sidebar-bg: #070d1c;
  --panel: #0c1526;
  --panel-2: #0e1930;
  --panel-hover: #12203a;
  --card: #0c1526;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.22);
  --text: #e7eefb;
  --text-dim: #9fb0cc;
  --text-faint: #6b7c9c;
  --brand: #2dd4bf;
  --brand-2: #38bdf8;
  --accent: #7c5cff;
  --high: #34d399;
  --high-bg: rgba(52, 211, 153, 0.12);
  --medium: #fbbf24;
  --medium-bg: rgba(251, 191, 36, 0.12);
  --low: #60a5fa;
  --low-bg: rgba(96, 165, 250, 0.12);
  --input-bg: #0a1526;
  --track: rgba(148, 163, 184, 0.16);
}

/* ---------------------------- Light theme --------------------------- */
[data-theme='light'] {
  --bg: #eef2f9;
  --bg-grad: radial-gradient(1100px 560px at 80% -10%, rgba(45, 212, 191, 0.12), transparent 60%),
    radial-gradient(900px 500px at 100% 100%, rgba(124, 92, 255, 0.08), transparent 55%), #eef2f9;
  --sidebar-bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-hover: #f4f7fc;
  --card: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.14);
  --text: #0f1b30;
  --text-dim: #556282;
  --text-faint: #8593ac;
  --brand: #0d9488;
  --brand-2: #0284c7;
  --accent: #7c5cff;
  --high: #059669;
  --high-bg: rgba(5, 150, 105, 0.12);
  --medium: #d97706;
  --medium-bg: rgba(217, 119, 6, 0.12);
  --low: #2563eb;
  --low-bg: rgba(37, 99, 235, 0.12);
  --input-bg: #f4f7fc;
  --track: rgba(15, 23, 42, 0.1);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font);
  background: var(--bg-grad);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 20px;
}

/* ------------------------------ Shell ------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.main {
  flex: 1;
  min-width: 0;
  padding: 24px 40px 60px;
}
.view {
  max-width: clamp(1200px, 92vw, 1500px);
  margin: 0 auto;
}

/* ------------------------------ Brand ------------------------------- */
.brand {
  padding: 4px 8px 18px;
}
.brand h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
}
.brand h1 .i {
  color: var(--brand);
}
.brand small {
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 500;
}

/* ------------------------------ Nav --------------------------------- */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 14.5px;
  font-weight: 500;
  transition: var(--tr);
}
.nav-item:hover {
  background: var(--panel-hover);
  color: var(--text);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.16), rgba(56, 189, 248, 0.06));
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav-item.active svg {
  color: var(--brand);
}
.nav-spacer {
  flex: 1;
}
.side-card {
  margin-top: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.1), rgba(124, 92, 255, 0.08));
  border: 1px solid var(--border);
}
.side-card .sc-icon {
  color: var(--brand);
  margin-bottom: 8px;
}
.side-card h4 {
  margin: 0 0 4px;
  font-size: 14px;
}
.side-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}
.side-card .btn {
  width: 100%;
  justify-content: center;
}

/* --------------------------- AI card -------------------------------- */
.ai-card {
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.14), rgba(124, 92, 255, 0.12));
}
.brand-logo-wrap {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}
.brand-logo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.ai-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.ai-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ai-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0;
}
.ai-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
}
.ai-stats b {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.ai-stats span {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}
.ai-actions {
  display: flex;
  gap: 8px;
}
.ai-actions .btn {
  flex: 1;
  justify-content: center;
}
.ai-actions .ai-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.ai-actions .ai-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* -------------------------- Voice card ------------------------------ */
.voice-card {
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.14), rgba(124, 92, 255, 0.12));
}
.vc-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.vc-ic {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 34px;
  margin: 12px 0 14px;
}
.waveform span {
  width: 3px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  animation: wave 1.1s ease-in-out infinite;
}
@keyframes wave {
  0%, 100% {
    height: 8px;
    opacity: 0.6;
  }
  50% {
    height: 26px;
    opacity: 1;
  }
}

/* ---------------------------- Top bar ------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}
.crumbs a:hover {
  color: var(--text);
}
.crumbs .sep {
  color: var(--text-faint);
}
.crumbs .cur {
  color: var(--text);
  font-weight: 600;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  width: 300px;
  color: var(--text-faint);
}
.searchbox input {
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  width: 100%;
  font-size: 14px;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  position: relative;
  transition: var(--tr);
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.icon-btn .dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

/* ----------------------------- Buttons ------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  transition: var(--tr);
}
.btn:hover {
  background: var(--panel-hover);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  border: none;
  color: #fff;
}
.btn.primary:hover {
  filter: brightness(1.08);
}
.btn.brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border: none;
  color: #04121a;
}
.btn.sm {
  padding: 7px 12px;
  font-size: 12.5px;
}

/* ------------------------------ Hero -------------------------------- */
.hero {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.hero-copy {
  flex: 1 1 55%;
}
.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}
.hero h2 {
  font-size: 54px;
  line-height: 1.05;
  margin: 8px 0 16px;
  font-weight: 800;
  letter-spacing: -1px;
}
.hero h2 .g {
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  color: var(--text-dim);
  font-size: 16px;
  max-width: 1000px;
  line-height: 1.6;
  margin: 0;
}
.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.hero-art {
  width: 600px;
  max-width: 46%;
  height: 360px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  position: relative;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 40px rgba(56, 189, 248, 0.25));
}
/* The artwork has a dark backdrop baked in, so on light mode present it inside a
   polished dark feature panel (keeps the glowing cube fully visible). */
[data-theme='light'] .hero-art {
  background: radial-gradient(120% 120% at 50% 28%, #14243f, #0a1526);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 70px rgba(56, 189, 248, 0.1);
}
.hero-cube {
  font-size: 44px;
  font-weight: 800;
  color: var(--brand-2);
  text-shadow: 0 0 30px rgba(56, 189, 248, 0.6);
}

/* --------------------------- Stat strip ----------------------------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 30px;
}
.stat-strip .stat {
  background: var(--panel);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stat .stat-ic {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(45, 212, 191, 0.12);
  color: var(--brand);
}
.stat .stat-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-faint);
  font-weight: 600;
  text-transform: uppercase;
}
.stat .stat-val {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}
.stat .stat-sub {
  font-size: 12px;
  color: var(--text-dim);
}
.stat .stat-val.high {
  color: var(--high);
}

/* --------------------------- Section head --------------------------- */
.section-head {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.section-head h3 {
  font-size: 20px;
  margin: 0;
  font-weight: 700;
}
.section-head .link {
  margin-left: auto;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ------------------------- Image tile cards ------------------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--tr);
  display: flex;
  flex-direction: column;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.tile-img {
  height: 132px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
.tile-watermark {
  position: absolute;
  right: -10px;
  bottom: -22px;
  opacity: 0.22;
  transform: rotate(-8deg);
  pointer-events: none;
}
.tile-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(6, 11, 24, 0.5));
}
.tile-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.tile-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tile-body h4 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 700;
}
.tile-body p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.tile-body .sc-foot {
  margin-top: 14px;
}

/* --------------------------- Sector grid ---------------------------- */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sector-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--tr);
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}
.sector-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.sector-card .sc-ic {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.sector-card h4 {
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 700;
}
.sector-card p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.sector-card .sc-foot {
  display: flex;
  align-items: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-faint);
  font-weight: 500;
}
.sector-card .sc-foot .go {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

/* --------------------------- Sector header -------------------------- */
.page-head {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head .ph-ic {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.page-head .ph-body {
  flex: 1;
  min-width: 240px;
}
.page-head h2 {
  font-size: 30px;
  margin: 0 0 6px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-head p {
  color: var(--text-dim);
  margin: 0;
  font-size: 14.5px;
  max-width: 560px;
  line-height: 1.55;
}
.mini-stats {
  display: flex;
  gap: 12px;
}
.mini-stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 130px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.mini-stat .ms-ic {
  color: var(--brand);
}
.mini-stat .ms-label {
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 600;
}
.mini-stat .ms-val {
  font-size: 20px;
  font-weight: 800;
}
.mini-stat .ms-val.high {
  color: var(--high);
}

/* ------------------------------ Tabs -------------------------------- */
.tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
.tab {
  padding: 12px 2px;
  font-size: 14.5px;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--text);
  border-color: var(--brand);
  font-weight: 600;
}

/* ----------------------------- Filters ------------------------------ */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
  flex: 1;
  min-width: 200px;
  color: var(--text-faint);
}
.filter-search input {
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  width: 100%;
  font-size: 13.5px;
}
.select {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px 0 13px;
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 500;
}
.select select {
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 13.5px;
  padding: 10px 4px;
  appearance: none;
  font-family: inherit;
}
.select select option {
  background: var(--panel);
  color: var(--text);
}

/* ------------------------------ Table ------------------------------- */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 18px;
}
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
table.data thead th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--tr);
}
table.data thead th.sortable:hover {
  color: var(--text);
}
th.sortable .sort-ind {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 5px;
  opacity: 0.3;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
th.sortable.sorted-asc,
th.sortable.sorted-desc {
  color: var(--brand);
}
th.sortable.sorted-asc .sort-ind,
th.sortable.sorted-desc .sort-ind {
  opacity: 1;
  color: var(--brand);
}
th.sortable.sorted-asc .sort-ind {
  transform: rotate(180deg);
}
table.data tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
table.data tbody tr:last-child td {
  border-bottom: none;
}
table.data tbody tr {
  transition: var(--tr);
  cursor: pointer;
}
table.data tbody tr:hover {
  background: var(--panel-hover);
}
.acc-cell {
  display: flex;
  gap: 13px;
  align-items: center;
}
.acc-logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}
.acc-logo.has-logo,
.ph-ic.has-logo {
  background: #ffffff;
}
.acc-logo img,
.ph-ic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.ph-ic img {
  padding: 10px;
}
.acc-logo .logo-fb,
.ph-ic .logo-fb {
  display: none;
}
.acc-logo.noimg .logo-fb,
.ph-ic.noimg .logo-fb {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.acc-name {
  font-weight: 600;
  font-size: 14px;
}
.acc-desc {
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 2px;
  max-width: 220px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}
.pill.active {
  background: var(--high-bg);
  color: var(--high);
}
.leader-cell {
  display: flex;
  gap: 11px;
  align-items: center;
}
.leader-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-2), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.leader-name {
  font-weight: 600;
  font-size: 13.5px;
}
.leader-role {
  font-size: 11.5px;
  color: var(--text-faint);
}
.story-cell .story-top {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  width: 150px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}
.story-cell .pct {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
}
.story-cell .story-status {
  color: var(--brand);
  font-size: 11.5px;
  margin-top: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge.high {
  background: var(--high-bg);
  color: var(--high);
}
.badge.medium {
  background: var(--medium-bg);
  color: var(--medium);
}
.badge.low {
  background: var(--low-bg);
  color: var(--low);
}
.updated .u-date {
  font-weight: 600;
  font-size: 13px;
}
.updated .u-ago {
  color: var(--text-faint);
  font-size: 11.5px;
}
.table-foot {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--text-faint);
  font-size: 13px;
}
.pager {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.pager button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dim);
  display: grid;
  place-items: center;
}
.pager button.active {
  background: var(--brand);
  color: #04121a;
  border-color: transparent;
  font-weight: 700;
}

/* --------------------------- Account cards -------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.kpi .kpi-ic {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.kpi .kpi-label {
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}
.kpi .kpi-val {
  font-size: 24px;
  font-weight: 800;
  margin-top: 2px;
}
.kpi .kpi-val.high {
  color: var(--high);
}
.kpi .kpi-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
}
.panel-title .num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.sub-panel {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px;
}
.sub-panel h5 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--brand);
}
.sub-panel p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.journey {
  display: flex;
  align-items: center;
  margin-top: 18px;
}
.journey .step {
  flex: 1;
  text-align: center;
  position: relative;
}
.journey .step .dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--panel);
  position: relative;
  z-index: 2;
}
.journey .step.done .dot {
  background: var(--brand);
  border-color: var(--brand);
  color: #04121a;
}
.journey .step .lbl {
  font-size: 11px;
  color: var(--text-dim);
}
.journey .step::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border-strong);
  z-index: 1;
}
.journey .step:first-child::before {
  display: none;
}
.journey .step.done::before {
  background: var(--brand);
}
.outcome-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.outcome {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.outcome .o-label {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
}
.outcome .o-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--high);
  margin: 2px 0;
}
.outcome .o-sub {
  font-size: 10.5px;
  color: var(--text-faint);
}
.quote {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.quote .q-av {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}
.quote .q-role {
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}
.quote .q-text {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 2px;
}
.enabler {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 7px 0;
}
.enabler .en-ic {
  color: var(--brand);
}
.look-ahead {
  background: var(--panel);
  border-color: var(--border);
}
.look-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: center;
}
.look-img {
  width: 150%;
  background: transparent;
}
@media (max-width: 900px) {
  .look-grid {
    grid-template-columns: 1fr;
  }
  .look-img {
    max-width: 360px;
  }
}
.look-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.look-list .li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
  align-items: center;
}
.look-list .li svg {
  color: var(--brand);
}
.span-2 {
  grid-column: span 2;
}

/* --------------------------- Settings ------------------------------- */
.form-panel {
  max-width: 720px;
}
.form-row {
  margin-bottom: 18px;
}
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.form-row .hint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 6px;
}
.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.input:focus {
  border-color: var(--brand);
}
.toggle-theme {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.toggle-theme button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--panel);
  color: var(--text-dim);
  border: none;
  font-size: 13px;
  font-weight: 600;
}
.toggle-theme button.active {
  background: var(--brand);
  color: #04121a;
}
.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  transition: var(--tr);
  cursor: pointer;
}
.drop-zone.drag {
  border-color: var(--brand);
  background: rgba(45, 212, 191, 0.05);
}
.drop-zone .dz-ic {
  color: var(--brand);
  margin-bottom: 8px;
}
.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}
.file-item .fi-ic {
  color: var(--brand);
}
.file-item .fi-size {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
}
.save-ok {
  color: var(--high);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.save-err {
  color: var(--low, #f43f5e);
  font-size: 13px;
  font-weight: 600;
}

/* --------------------------- Empty state ---------------------------- */
.empty {
  padding: 40px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}

/* ------------------------------ Charts ------------------------------ */
.chart-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.chart-donut {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.donut-c {
  fill: var(--text);
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font);
}
.donut-s {
  fill: var(--text-faint);
  font-size: 9px;
  letter-spacing: 1px;
  font-family: var(--font);
}
.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.lg-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
}
.lg-item b {
  color: var(--text);
}
.lg-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding-top: 6px;
}
.cb-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}
.cb-val {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.cb-bar {
  width: 66%;
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  transition: height 0.4s ease;
}
.cb-label {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.chart-hbars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.hb-row {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  align-items: center;
  gap: 12px;
}
.hb-label {
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hb-track {
  height: 10px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.hb-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.hb-val {
  font-size: 12.5px;
  font-weight: 700;
  text-align: right;
  color: var(--text);
}
.clickable {
  cursor: pointer;
}
circle.clickable {
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}
circle.clickable:hover {
  opacity: 0.82;
}
.cb-col.clickable:hover .cb-bar {
  filter: brightness(1.15);
  transform: scaleY(1.02);
  transform-origin: bottom;
}
.cb-col.clickable:hover .cb-label,
.hb-row.clickable:hover .hb-label,
.lg-item.clickable:hover {
  color: var(--brand);
}
.hb-row.clickable:hover .hb-track span {
  filter: brightness(1.15);
}

/* --------------------------- Zoom modal ----------------------------- */
.zoom-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  transition: var(--tr);
}
.zoom-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.66);
  backdrop-filter: blur(4px);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.modal-overlay.open {
  opacity: 1;
}
.modal-card {
  position: relative;
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  padding: 16px;
  transform: scale(0.96);
  transition: transform 0.18s ease;
}
.modal-overlay.open .modal-card {
  transform: scale(1);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  z-index: 2;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body .panel.zoomed {
  border: none;
  font-size: 1.3em;
}
.modal-body .panel.zoomed .panel-title {
  font-size: 24px;
}
.modal-body .panel.zoomed .sub-panel p {
  font-size: 16px;
  line-height: 1.7;
}
.modal-body .panel.zoomed .sub-panel h5 {
  font-size: 16px;
}

/* --------------------------- Fav button ----------------------------- */
.btn.fav-on {
  background: var(--medium-bg);
  color: var(--medium);
  border-color: transparent;
}

/* --------------------------- Timeline ------------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 6px;
}
.tl-item {
  display: flex;
  gap: 14px;
  padding: 6px 0;
  position: relative;
}
.tl-ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 2;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: -6px;
  width: 2px;
  background: var(--border-strong);
}
.tl-item:last-child::before {
  display: none;
}
.tl-body {
  padding-top: 5px;
}
.tl-text {
  font-size: 13.5px;
  font-weight: 600;
}
.tl-meta {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
}

/* ------------------------------ Chat -------------------------------- */
.chat-fab {
  position: fixed;
  right: 26px;
  bottom: 88px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(45, 212, 191, 0.35);
  z-index: 50;
  transition: var(--tr);
}
.chat-fab:hover {
  transform: scale(1.06);
}
.chat-window {
  position: fixed;
  right: 26px;
  bottom: 158px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 560px;
  max-height: calc(100vh - 130px);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  z-index: 51;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, rgba(45, 212, 191, 0.12), rgba(56, 189, 248, 0.05));
}
.chat-header .ch-av {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
}
.chat-header h4 {
  margin: 0;
  font-size: 15px;
}
.chat-header .ch-sub {
  font-size: 11.5px;
  color: var(--text-dim);
}
.chat-header .ch-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-dim);
}
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.msg.bot {
  background: var(--panel-2);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.msg.user {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.msg .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(45, 212, 191, 0.15);
  color: var(--brand);
  font-weight: 600;
  font-size: 12.5px;
}
.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 10px;
}
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}
.chip:hover {
  color: var(--text);
  border-color: var(--brand);
}
.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.chat-mic {
  width: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: var(--tr);
}
.chat-mic:hover {
  color: var(--brand);
  border-color: var(--brand);
}
.chat-mic.listening {
  background: var(--brand);
  color: #04121a;
  border-color: transparent;
  animation: micpulse 1s ease-in-out infinite;
}
@keyframes micpulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.5);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(45, 212, 191, 0);
  }
}
.ch-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  display: grid;
  place-items: center;
  transition: var(--tr);
}
.ch-icon.on {
  color: var(--brand);
  border-color: var(--brand);
}
.chat-input input {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}
.chat-input input:focus {
  border-color: var(--brand);
}
.chat-send {
  width: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
  display: grid;
  place-items: center;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px;
}
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes blink {
  0%, 60%, 100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

/* --------------------------- Responsive ----------------------------- */
@media (max-width: 1080px) {
  .sector-grid,
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-grid {
    grid-template-columns: 1fr;
  }
  .chart-two {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
}
@media (max-width: 720px) {
  .sidebar {
    display: none;
  }
  .searchbox {
    display: none;
  }
  .sector-grid,
  .kpi-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------- Popover menu --------------------------- */
.popmenu {
  position: fixed;
  z-index: 85;
  width: 200px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  animation: popin 0.14s ease;
}
@keyframes popin {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.popmenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  text-align: left;
}
.popmenu-item:hover {
  background: var(--panel-hover);
  color: var(--brand);
}

/* --------------------- Prompt-driven generator ---------------------- */
.gen-mode {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.gen-mode button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.gen-mode button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04121a;
}
.gen-controls {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}
.gen-input {
  flex: 1;
  resize: vertical;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--input-bg, var(--panel-2, var(--panel)));
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}
.gen-input:focus {
  outline: none;
  border-color: var(--brand);
}
.gen-controls .btn {
  align-self: flex-end;
  white-space: nowrap;
}
.gen-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}
.gen-output:not(:empty) {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.gen-loading,
.gen-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13.5px;
}
.gen-error {
  color: var(--low, #e5484d);
}
.gen-loading svg {
  animation: ppspin 1s linear infinite;
}
.gen-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.gen-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 6px 0 18px;
}
.gen-chart {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.gc-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 10px;
}
@media (max-width: 1000px) {
  .gen-charts {
    grid-template-columns: 1fr;
  }
}
.gen-doc {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
.gen-doc h3 {
  font-size: 18px;
  margin: 14px 0 8px;
}
.gen-doc h4 {
  font-size: 15px;
  margin: 14px 0 6px;
  color: var(--brand);
}
.gen-doc h5 {
  font-size: 13.5px;
  margin: 12px 0 6px;
  color: var(--text-dim);
}
.gen-doc p {
  margin: 0 0 10px;
}
.gen-doc ul,
.gen-doc ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.gen-doc li {
  margin: 4px 0;
}
.gen-doc li > ul,
.gen-doc li > ol {
  margin: 6px 0 4px;
}
.gen-doc code {
  background: var(--panel-hover);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12.5px;
}

/* ------------------------------ Toast ------------------------------- */
#toast-host {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.22s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------ Download progress ------------------------- */
#progress-host {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 95;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.progress-pill {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px 13px;
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.progress-pill.show {
  opacity: 1;
  transform: translateY(0);
}
.pp-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--track);
  border-top-color: var(--brand);
  animation: ppspin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes ppspin {
  to {
    transform: rotate(360deg);
  }
}
.pp-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 40%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 3px;
  animation: ppbar 1.1s ease-in-out infinite;
}
@keyframes ppbar {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}
.progress-pill.ok {
  border-color: var(--high);
}
.progress-pill.ok .pp-check {
  color: var(--high);
  font-weight: 800;
}
.progress-pill.err {
  border-color: #f43f5e;
  color: #f43f5e;
}
.progress-pill.ok .pp-bar,
.progress-pill.err .pp-bar {
  display: none;
}

/* ------------------------------ Print ------------------------------- */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sidebar,
  .chat-fab,
  .chat-window,
  .topbar,
  .topbar-right,
  .zoom-btn,
  .tabs,
  .filters,
  .table-foot .pager,
  #favBtn,
  #exportBtn,
  #shareBtn,
  #sectorExport,
  #listExport,
  #industryExport {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  .main {
    padding: 0;
  }
  .view {
    max-width: 100%;
  }
  .panel,
  .kpi,
  .sub-panel,
  .chart-two,
  .table-wrap {
    break-inside: avoid;
  }
  .panel-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ------------------------- Guided tour (Bob) ------------------------ */
.tour-hole {
  position: absolute;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(3, 9, 20, 0.72);
  border: 2px solid var(--brand);
  z-index: 9998;
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour-pop {
  position: absolute;
  z-index: 9999;
  width: 340px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: tourPop 0.25s ease;
}
@keyframes tourPop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tour-bob {
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.16), rgba(124, 92, 255, 0.14));
  padding: 4px;
}
.tour-body {
  flex: 1;
  min-width: 0;
}
.tour-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}
.tour-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 12px;
}
.tour-ctrls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tour-skip {
  background: none;
  border: none;
  color: var(--text-faint);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tour-skip:hover {
  color: var(--text);
}
.tour-dots {
  display: flex;
  gap: 5px;
}
.tour-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}
.tour-dots span.on {
  background: var(--brand);
}
.tour-nav {
  display: flex;
  gap: 6px;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn.ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Bob tour launcher — sits just below the chat bubble */
.tour-fab {
  position: fixed;
  right: 29px;
  bottom: 26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--panel);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  z-index: 49;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
  transition: var(--tr);
}
.tour-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tour-fab .tour-fab-label {
  position: absolute;
  inset: auto 0 -2px 0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(3, 9, 20, 0.72);
  padding: 1px 0 2px;
}
.tour-fab:hover {
  transform: scale(1.08);
}
