/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   Cool AI internal dashboard — mock styles
   Minimal, exec-grade. Inter + JetBrains Mono via Google Fonts.
   ============================================================ */

:root {
  --bg:          #fafaf9;
  --bg-elev:    #ffffff;
  --bg-sunk:   #f5f5f4;
  --border:     #e7e5e4;
  --border-strong: #d6d3d1;
  --text:        #0c0a09;
  --text-muted:  #57534e;
  --text-dim:    #a8a29e;

  --pos:  #15803d;
  --pos-bg: #f0fdf4;
  --neg:  #b91c1c;
  --neg-bg: #fef2f2;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --info: #7c3aed;
  --info-bg: #f5f3ff;

  /* cool.co channel colors aligned with the brand gradient stops */
  --display: #8b5cf6;    /* violet · gradient mid */
  --search:  #22d3ee;    /* cyan · gradient start */
  --social:  #db2777;    /* fuchsia · gradient ¾ */

  /* brand tokens (canonical cool.co gradient stops) */
  --brand-cyan:    #22d3ee;
  --brand-violet:  #8b5cf6;
  --brand-fuchsia: #d946ef;
  --brand-orange:  #f97316;
  --brand-grad: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);
  --brand-grad-h: linear-gradient(90deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 1px rgba(0,0,0,0.02);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Top nav ===== */
/* Brand stripe at the very top of every page */
body::before {
  content: "";
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad-h);
  z-index: 100;
  pointer-events: none;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topnav .brand {
  display: flex; align-items: center; gap: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  font-size: 13px;
}
.topnav .brand .logo {
  height: 28px; width: auto; display: block;
}
.topnav .brand .crumb {
  padding-left: 14px;
  border-left: 1px solid var(--border);
  color: var(--text);
}
.topnav .brand .crumb a { color: var(--text-muted); }
.topnav .brand .crumb a:hover { color: var(--text); }

.topnav .actions { display: flex; align-items: center; gap: 14px; }
.role-toggle {
  display: inline-flex;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
}
.role-toggle a {
  font-size: 12px;
  padding: 5px 12px;
  color: var(--text-muted);
  border-radius: 4px;
  font-weight: 500;
}
.role-toggle a.active {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: var(--shadow);
}
.range-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.range-toggle a {
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  background: var(--bg-elev);
}
.range-toggle a:last-child { border-right: 0; }
.range-toggle a.active { background: var(--text); color: var(--bg-elev); }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
}
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fb923c, #db2777);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}

/* ===== Page layout ===== */
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 32px 80px;
}
/* Keep the top-nav content aligned to the same centred canvas as .page */
.topnav { padding-left: 0; padding-right: 0; }
.topnav .nav-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 24px;
}
.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
}
.page-title .stripe {
  display: inline-block;
  width: 4px; height: 22px;
  margin-right: 10px;
  border-radius: 2px;
  background: linear-gradient(180deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);
  vertical-align: -3px;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 13px;
}
.section {
  margin-bottom: 28px;
}
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 12px;
}
.section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card.tight { padding: 14px 16px; }
.card.flush { padding: 0; overflow: hidden; }

.grid { display: grid; grid-gap: 16px; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }

/* ===== KPI tiles ===== */
.kpi {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.kpi-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kpi-value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpi-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-muted);
}
.delta-pos { color: var(--pos); }
.delta-neg { color: var(--neg); }
.kpi-foot { font-size: 11px; color: var(--text-dim); }

/* ===== Tables ===== */
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.t thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunk);
}
table.t tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: var(--bg-sunk); }
table.t .num {
  font-family: var(--mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.t-compact tbody td, .t-compact thead th { padding: 8px 12px; }

/* ===== Chips ===== */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-sunk);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip-pos  { background: var(--pos-bg);  color: var(--pos);  border-color: #bbf7d0; }
.chip-neg  { background: var(--neg-bg);  color: var(--neg);  border-color: #fecaca; }
.chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.chip-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot-display { background: var(--display); }
.dot-search  { background: var(--search); }
.dot-social  { background: var(--social); }
.dot-pos { background: var(--pos); }
.dot-neg { background: var(--neg); }
.dot-warn { background: var(--warn); }

/* ===== Narrative block ===== */
.narrative {
  display: flex; gap: 14px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.narrative .badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #0c0a09;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: -0.5px;
  flex: 0 0 32px;
  position: relative;
}
.narrative .badge::before,
.narrative .badge::after {
  content: "|";
  background: linear-gradient(180deg,#22d3ee 0%,#8b5cf6 55%,#f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 300;
}
.narrative .badge .ai {
  margin: 0 1px;
  background: linear-gradient(180deg,#22d3ee 0%,#8b5cf6 55%,#f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 300;
}
.narrative .body { font-size: 14px; color: var(--text); line-height: 1.6; }
.narrative .body .src {
  border-bottom: 1px dotted var(--text-dim);
  cursor: help;
}
.narrative .meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ===== Tabs ===== */
.tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-top: 0; border-left: 0; border-right: 0;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== Code / JSON ===== */
pre.json {
  font-family: var(--mono);
  font-size: 12px;
  background: #0c0a09;
  color: #e7e5e4;
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow: auto;
  line-height: 1.55;
  max-height: 480px;
}
pre.json .k { color: #93c5fd; }
pre.json .s { color: #fcd34d; }
pre.json .n { color: #86efac; }
pre.json .b { color: #f0abfc; }
pre.json .c { color: #a8a29e; font-style: italic; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
}
.btn:hover { background: var(--bg-sunk); }
.btn-primary {
  background: var(--text);
  color: var(--bg-elev);
  border-color: var(--text);
}
.btn-primary:hover { background: #292524; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.field input, .field select, .field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-elev);
}
.field textarea { font-family: var(--mono); font-size: 12px; min-height: 90px; }

/* ===== Misc ===== */
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.num-mono { font-family: var(--mono); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ===== Bars ===== */
.bar-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bar-row .label { flex: 0 0 130px; font-size: 12px; }
.bar-row .num { flex: 0 0 80px; text-align: right; font-family: var(--mono); font-size: 12px; }
.bar-row .track {
  flex: 1 1;
  height: 8px;
  background: var(--bg-sunk);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-row .fill { height: 100%; border-radius: 4px; }

/* Stacked bar (margin breakdown) */
.stacked-bar { display: flex; height: 24px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.stacked-bar div { display: flex; align-items: center; justify-content: center; color: white; font-size: 11px; font-family: var(--mono); }

/* Heatmap cell */
.heat { display: grid; grid-template-columns: repeat(24, 1fr); grid-gap: 2px; gap: 2px; }
.heat .cell { aspect-ratio: 1; border-radius: 2px; background: var(--bg-sunk); }

/* Pillar status grid card */
.pillar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--bg-elev);
  display: flex; flex-direction: column; gap: 6px;
}
.pillar-card .pname { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.pillar-card .pval { font-family: var(--mono); font-size: 18px; }

/* Inline trend arrow */
.trend-up::before { content: "↑"; }
.trend-down::before { content: "↓"; }

/* Severity dots for alerts */
.sev-high { color: var(--neg); }
.sev-med  { color: var(--warn); }
.sev-low  { color: var(--info); }

/* ===== Attainment distribution bar ===== */
.attain-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-sunk);
}
.attain-bar > div {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-family: var(--mono); color: white;
  white-space: nowrap;
}
.attain-beat   { background: #15803d; }
.attain-track  { background: #65a30d; }
.attain-risk   { background: #b45309; }
.attain-crit   { background: #b91c1c; }

.attain-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.attain-legend .dot { width: 10px; height: 10px; }

.col-list-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunk);
}
.col-list-title h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.col-list-title .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Deviation row ===== */
.dev-row {
  display: grid;
  grid-template-columns: 22px 1fr 90px 90px 90px;
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.dev-row:last-child { border-bottom: 0; }
.dev-row .who { font-weight: 500; font-size: 13px; }
.dev-row .what { font-size: 12px; color: var(--text-muted); }
.dev-row .target { font-family: var(--mono); font-size: 12px; color: var(--text-muted); }
.dev-row .actual { font-family: var(--mono); font-size: 13px; }
.dev-row .gap { font-family: var(--mono); font-size: 13px; text-align: right; }

/* ===== Activity feed ===== */
.feed-item { display: grid; grid-template-columns: 80px 24px 1fr; grid-gap: 12px; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); align-items: start; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .when { font-family: var(--mono); font-size: 11px; color: var(--text-dim); padding-top: 2px; }
.feed-item .ico {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  color: white;
}
.feed-item .ico.new   { background: #15803d; }
.feed-item .ico.risk  { background: #b91c1c; }
.feed-item .ico.renew { background: #1d4ed8; }
.feed-item .ico.churn { background: #57534e; }
.feed-item .ico.launch{ background: #6366f1; }
.feed-item .feed-body { font-size: 13px; }
.feed-item .feed-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== Date filter ===== */
.date-filter {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.date-filter .group {
  display: flex;
  align-items: center;
  padding: 0 4px;
  border-right: 1px solid var(--border);
}
.date-filter .group:last-child { border-right: 0; }
.date-filter .preset {
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 5px;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.date-filter .preset:hover { background: var(--bg-sunk); color: var(--text); }
.date-filter .preset.active { background: var(--text); color: var(--bg-elev); }
.date-filter .range {
  display: flex; flex-direction: column;
  padding: 6px 14px;
  min-width: 180px;
}
.date-filter .range .dates { font-family: var(--mono); font-size: 13px; line-height: 1.2; }
.date-filter .range .meta { font-size: 11px; color: var(--text-muted); }
.date-filter .compare {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.date-filter .compare select {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}

/* Tier chips */
.tier {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tier-strategic { background: #0c0a09; color: #fbbf24; }
.tier-growth    { background: var(--info-bg); color: var(--info); }
.tier-stable    { background: var(--bg-sunk); color: var(--text-muted); }
.tier-onboarding{ background: #ecfeff; color: #0e7490; }

/* ===== Fee structure / tier display ===== */
.fee-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 500;
  border-radius: 4px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
}
.fee-pill .pct {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--text);
  color: var(--bg-elev);
  font-weight: 600;
}

.fee-bar {
  position: relative;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-sunk);
  display: flex;
}
.fee-bar .seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-family: var(--mono); color: white;
  position: relative;
  font-weight: 500;
}
.fee-seg-0  { background: #d6d3d1; color: #57534e !important; }
.fee-seg-4  { background: #b45309; }
.fee-seg-7  { background: #65a30d; }
.fee-seg-10 { background: #15803d; }

.fee-bar .marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 24px;
  background: #0c0a09;
  z-index: 2;
}
.fee-bar .marker::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: #0c0a09;
  border-radius: 50%;
  border: 2px solid white;
}
.fee-bar-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-top: 4px;
  padding: 0 2px;
}

/* Hierarchy indent for sub-accounts */
.subrow td:first-child {
  padding-left: 36px;
  position: relative;
}
.subrow td:first-child::before {
  content: "└";
  position: absolute;
  left: 18px;
  color: var(--text-dim);
}
.subrow {
  background: var(--bg-sunk);
}
.subrow td { font-size: 12px; }

/* ============================================================
   Filter bar + pagination
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1;
  min-width: 220px;
  background: var(--bg-sunk);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
}
.filter-search input {
  flex: 1 1;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  padding: 5px 0;
  color: var(--text);
}
.filter-search input::placeholder { color: var(--text-dim); }
.filter-search .icon {
  font-size: 13px;
  opacity: 0.55;
  color: var(--text-muted);
}
.filter-search .kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-elev);
  color: var(--text-muted);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
}
.filter-btn:hover { background: var(--bg-sunk); }
.filter-btn .badge {
  background: var(--text);
  color: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 600;
}
.filter-btn.active {
  background: var(--info-bg);
  border-color: #bfdbfe;
  color: var(--info);
}
.filter-btn.active .badge { background: var(--info); color: white; }
.filter-btn .caret { opacity: 0.5; font-size: 10px; }

/* dropdown panel for filters (mock-open state) */
.filter-panel { position: relative; }
.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 6px;
  min-width: 240px;
  z-index: 20;
}
.filter-dropdown .search-inline {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.filter-dropdown .search-inline input {
  flex:1 1; border:0; background:transparent; outline:0;
  font-size: 12px;
}
.filter-dropdown .opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}
.filter-dropdown .opt:hover { background: var(--bg-sunk); }
.filter-dropdown .opt input[type="checkbox"] { margin: 0; accent-color: var(--text); }
.filter-dropdown .opt .meta { margin-left: auto; font-size: 11px; color: var(--text-muted); font-family: var(--mono); }
.filter-dropdown .foot {
  display: flex; justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding: 6px 8px 4px;
  font-size: 11px;
}
.filter-dropdown .foot a { font-size: 11px; }

/* Active filter chips row */
.filter-active {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
  font-size: 12px;
}
.filter-active .label { color: var(--text-muted); }
.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 2px 10px;
  border-radius: 4px;
  background: var(--info-bg);
  color: var(--info);
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #bfdbfe;
}
.active-chip .key { opacity: 0.7; margin-right: 4px; }
.active-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
}
.active-chip button:hover { opacity: 1; }

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding: 10px 4px;
}
.filter-summary strong { color: var(--text); }

/* Saved views */
.saved-views {
  display: flex; align-items: center; gap: 4px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  font-size: 12px;
}
.saved-view {
  padding: 5px 11px;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
}
.saved-view:hover { color: var(--text); }
.saved-view.active {
  color: var(--text);
  border-bottom-color: var(--text);
}
.saved-view .count {
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 4px;
  font-size: 13px;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  padding: 0 8px;
}
.page-btn:hover { background: var(--bg-sunk); }
.page-btn.active {
  background: var(--text);
  color: var(--bg-elev);
  border-color: var(--text);
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-btn.ellipsis { border: 0; background: transparent; cursor: default; }
.pagination .per-page {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted);
}
.pagination .per-page select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: inherit;
  font-size: 12px;
  background: var(--bg-elev);
}

/* Bulk action bar (shown when rows selected) */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #0c0a09;
  color: var(--bg-elev);
  border-radius: 8px;
  margin: 10px 0;
}
.bulk-bar .selected-count {
  font-family: var(--mono);
  font-size: 13px;
}
.bulk-bar .btn {
  background: rgba(255,255,255,0.1);
  color: var(--bg-elev);
  border-color: transparent;
}
.bulk-bar .btn:hover { background: rgba(255,255,255,0.18); }

/* Row checkboxes / sort headers */
table.t th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
table.t th.sortable .sort-ind {
  margin-left: 4px;
  font-size: 9px;
  color: var(--text-dim);
}
table.t th.sortable.sorted {
  color: var(--text);
}
table.t th.sortable.sorted .sort-ind {
  color: var(--text);
}
table.t td.check, table.t th.check {
  width: 30px;
  text-align: center;
  padding-right: 0;
}
table.t .row-check { accent-color: var(--text); }

/* ============================================================
   Hierarchy / drill-down / ads & creatives / temporal
   ============================================================ */

/* Expandable parent row */
.expand-row td:first-child {
  position: relative;
  padding-left: 32px;
}
.expand-row .twisty {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--text-muted);
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.expand-row.open .twisty { transform: translateY(-50%) rotate(90deg); }

/* Creative preview card */
.ad-card {
  display: flex; gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elev);
}
.ad-preview {
  flex: 0 0 96px;
  height: 96px;
  background: linear-gradient(135deg, #f5f5f4 25%, #e7e5e4 25%, #e7e5e4 50%, #f5f5f4 50%, #f5f5f4 75%, #e7e5e4 75%);
  background-size: 12px 12px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--mono);
  position: relative;
  overflow: hidden;
}
.ad-preview .badge-top {
  position: absolute; top: 4px; left: 4px;
  background: rgba(12,10,9,0.78);
  color: white;
  font-size: 9px;
  font-family: var(--mono);
  padding: 1px 5px;
  border-radius: 3px;
}
.ad-preview.video { background: #0c0a09; color: #d6d3d1; }
.ad-preview.video::before { content: "▶"; font-size: 22px; opacity: 0.6; }
.ad-preview.carousel { background: #1c1917; color: #d6d3d1; }
.ad-preview.carousel::before { content: "▦"; font-size: 22px; opacity: 0.6; }

.ad-card .ad-body { flex: 1 1; font-size: 12px; min-width: 0; }
.ad-card .ad-title { font-weight: 500; font-size: 13px; margin-bottom: 4px; }
.ad-card .ad-copy { color: var(--text-muted); line-height: 1.45; margin: 4px 0; word-break: break-word; }
.ad-card .ad-cta {
  display: inline-block;
  padding: 2px 8px;
  background: var(--info-bg);
  color: var(--info);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.ad-card .ad-stats {
  display: flex; gap: 12px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.ad-card .ad-stats span strong { color: var(--text); margin-right: 4px; }

/* RSA asset rating */
.asset-rating {
  display: inline-block;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 6px;
  vertical-align: middle;
}
.asset-best   { background: #15803d; color: white; }
.asset-good   { background: #65a30d; color: white; }
.asset-low    { background: #b45309; color: white; }
.asset-pending { background: var(--bg-sunk); color: var(--text-muted); border: 1px solid var(--border); }

/* Headline / description rows for Search RSAs */
.rsa-list {
  display: flex; flex-direction: column;
  gap: 4px;
}
.rsa-list .item {
  display: flex; align-items: center;
  padding: 6px 10px;
  background: var(--bg-sunk);
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--mono);
}
.rsa-list .item .pos {
  width: 18px; color: var(--text-dim); font-size: 10px;
}
.rsa-list .item .txt { flex: 1 1; }

/* Ad strength bar */
.strength {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.strength .dot { width: 8px; height: 8px; border-radius: 50%; }
.strength-excellent { background: var(--pos-bg); color: var(--pos); border-color: #bbf7d0; }
.strength-excellent .dot { background: var(--pos); }
.strength-good { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.strength-good .dot { background: var(--info); }
.strength-poor { background: var(--neg-bg); color: var(--neg); border-color: #fecaca; }
.strength-poor .dot { background: var(--neg); }

/* Larger temporal heatmap */
.temporal {
  display: grid;
  grid-template-columns: 44px repeat(24, 1fr);
  grid-gap: 2px;
  gap: 2px;
  font-family: var(--mono);
  font-size: 9px;
}
.temporal .day-label {
  display: flex; align-items: center;
  padding-right: 6px;
  color: var(--text-muted);
  justify-content: flex-end;
  font-size: 10px;
}
.temporal .hr-label {
  text-align: center;
  color: var(--text-dim);
  font-size: 9px;
  padding-bottom: 2px;
}
.temporal .tcell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--bg-sunk);
}
.temporal-legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-muted);
  margin-top: 8px;
}
.temporal-legend .grad {
  display: inline-flex;
  width: 140px; height: 10px;
  border-radius: 2px;
  background: linear-gradient(90deg, #eff6ff 0%, #bfdbfe 25%, #60a5fa 50%, #2563eb 75%, #1e3a8a 100%);
}

/* Value-rule timeline */
.rule-tl {
  display: flex; flex-direction: column;
}
.rule-tl .rule-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  grid-gap: 10px;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rule-tl .rule-row:last-child { border-bottom: 0; }
.rule-tl .rule-when { font-family: var(--mono); font-size: 11px; color: var(--text-muted); padding-top: 2px; }
.rule-tl .rule-body { font-size: 12px; }
.rule-tl .rule-body code { font-size: 11px; }

/* Compact key:value pill */
.kv {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  font-family: var(--mono);
  background: var(--bg-sunk);
  padding: 2px 7px;
  border-radius: 3px;
}
.kv .k { color: var(--text-muted); }

/* Footer-ish */
.note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ============================================================
   Brand treatments — cool.co aligned
   4-stop gradient: cyan #22d3ee → violet #8b5cf6 → fuchsia #d946ef → orange #f97316
   ============================================================ */

.brand-grad-text {
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.brand-stripe-v {
  width: 3px; height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);
}

.btn-brand {
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #d946ef 100%);
  color: white;
  border: 0;
  font-weight: 600;
}
.btn-brand:hover {
  background: linear-gradient(135deg, #06b6d4 0%, #7c3aed 50%, #c026d3 100%);
}

/* Flight cards · first-class block on the business account page */
.flight-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: grid;
  grid-gap: 10px;
  gap: 10px;
}
.flight-card + .flight-card { margin-top: 10px; }
.flight-card.incremental {
  position: relative;
  background: linear-gradient(90deg, #fdf4ff 0%, var(--bg-elev) 28%);
}
.flight-card.incremental::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #22d3ee 0%, #8b5cf6 40%, #d946ef 70%, #f97316 100%);
}
.flight-head {
  display: flex; justify-content: space-between; align-items: start;
  gap: 12px;
}
.flight-name {
  font-weight: 600; font-size: 14px; line-height: 1.3;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.flight-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
}
.flight-status-strip {
  display: flex; gap: 8px; align-items: center; font-size: 11px;
}
.flight-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 14px;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.flight-metric .label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.flight-metric .value {
  font-family: var(--mono);
  font-size: 14px;
  margin-top: 3px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.flight-metric .sub {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--mono);
  margin-top: 1px;
}

/* Incremental chip — distinct from regular .chip */
.incremental-chip {
  background: linear-gradient(135deg, #22d3ee 0%, #8b5cf6 50%, #d946ef 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}

/* Deviation indicators — pp and $ */
.dev-strong-pos { color: var(--pos); font-family: var(--mono); font-weight: 600; }
.dev-strong-neg { color: var(--neg); font-family: var(--mono); font-weight: 600; }
.dev-strong-warn { color: var(--warn); font-family: var(--mono); font-weight: 600; }

/* Estimate vs Actual mini progress bar */
.eva-bar {
  position: relative;
  height: 8px;
  background: var(--bg-sunk);
  border-radius: 4px;
  margin: 6px 0;
}
.eva-bar .actual {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 4px;
  background: var(--text);
}
.eva-bar .target-marker {
  position: absolute; top: -3px;
  width: 2px; height: 14px;
  background: var(--info);
}
.eva-bar.over .actual { background: var(--pos); }
.eva-bar.under .actual { background: var(--neg); }

/* Fee mode panel — used on both portfolio and account-detail */
.fee-mode-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--bg-elev);
}
.fee-mode-panel .fee-mode-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.fee-mode-panel .fee-mode-head h4 {
  margin: 0; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.fee-mode-panel .fee-mode-rev {
  font-family: var(--mono); font-size: 14px; font-weight: 600;
}

/* ===== Skeleton loaders + UX polish (added) ===== */
.skel {
  background: linear-gradient(90deg, var(--bg-sunk) 25%, #ededeb 37%, var(--bg-sunk) 63%);
  background-size: 400% 100%;
  animation: skel 1.4s ease infinite;
  border-radius: 6px;
}
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.fade-in { animation: fade-in 0.25s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Sticky table headers for long lists (sit just below the sticky top-nav) */
table.t thead th { position: -webkit-sticky; position: sticky; top: 52px; z-index: 2; }

input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand-violet); outline-offset: 1px; border-radius: 4px;
}
.btn, .filter-btn { transition: background 0.12s ease, border-color 0.12s ease; }

