/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HUB V8 — Design System (fonte de verdade)
   Tokens · Tipografia · Espaço · Componentes
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  /* ── Neutros ── */
  --bg:           #0B0D11;
  --surface:      #14171D;
  --surface-2:    #1B1F27;
  --border:       #262B34;
  --text:         #F2EFE9;
  --text-muted:   #9BA3B0;
  --text-faint:   #5E6675;

  /* ── Accent único ── */
  --accent:       #3DD2B4;
  --accent-weak:  rgba(61,210,180,.12);
  --on-accent:    #0B0D11;

  /* ── Status — só semântico, nunca decorativo ── */
  --success:      #34D399;
  --success-weak: rgba(52,211,153,.12);
  --warning:      #F2B544;
  --warning-weak: rgba(242,181,68,.12);
  --danger:       #FF6B5C;
  --danger-weak:  rgba(255,107,92,.12);

  /* ── Radius ── */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-pill: 999px;

  /* ── Shadow leve ── */
  --shadow: 0 1px 2px rgba(0,0,0,.25);

  /* ── Aliases compat (app.js usa estes nomes) ── */
  --card:    #14171D;
  --card2:   #1B1F27;
  --card3:   #0F1216;
  --surface-3: #0F1216;
  --text1:   #F2EFE9;
  --text2:   #9BA3B0;
  --text3:   #5E6675;
  --green:   #34D399;
  --green-w: rgba(52,211,153,.12);
  --yellow:  #F2B544;
  --yellow-w:rgba(242,181,68,.12);
  --red:     #FF6B5C;
  --red-w:   rgba(255,107,92,.12);
}

html,body { height:100%; min-height:100vh; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* números tabulares */
.num {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
/* compat alias */
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* label pequeno uppercase */
.label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
}

::selection { background: var(--accent-weak); color: var(--text); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ══════════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════ */
.app { display: flex; min-height: 100vh; width: 100%; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════ */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

/* Brand */
.brand, .logo-wrap {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.brand h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.brand .mark, .logo-v6 { color: var(--accent); font-weight: 600; }
.brand p, .logo-campaign { font-size: 11px; color: var(--text-faint); margin-top: 3px; }
.logo-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Cliente Switcher ── */
.ct-switcher {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.ct-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: background .12s;
  text-align: left;
}
.ct-btn:hover { background: var(--surface-2); }
.ct-ini {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 700; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.02em;
}
.ct-ini.empty { background: var(--surface-2); color: var(--text-faint); }
.ct-info { flex: 1; min-width: 0; }
.ct-nome { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-cargo { font-size: 10px; color: var(--text-faint); margin-top: 1px; }
.ct-chevron { color: var(--text-faint); font-size: 10px; flex-shrink: 0; }
.ct-dropdown {
  position: absolute; left: 12px; right: 12px;
  top: calc(100% - 2px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.ct-dropdown.open { display: block; animation: fadeIn .12s ease; }
.ct-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  font-size: 12px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.ct-opt:last-child { border-bottom: none; }
.ct-opt:hover { background: var(--surface-2); color: var(--text); }
.ct-opt.ct-ativo { color: var(--accent); }
.ct-opt.ct-ativo .ct-ini { background: var(--accent); color: var(--on-accent); }
.ct-opt-add { color: var(--accent); font-weight: 500; }
.ct-nenhum { font-size: 12px; color: var(--text-faint); padding: 10px 12px; }

/* Nav */
.nav { padding: 14px 12px; flex: 1; }
.nav-group { margin-bottom: 18px; }
.nav-group > .label { padding: 0 8px 8px; }

/* compat: nav-section → mesmo visual que .nav-group .label */
.nav-section {
  padding: 12px 8px 7px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}
/* primeiro nav-section não precisa de padding top extra */
.nav > .nav-section:first-child { padding-top: 6px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .12s, color .12s;
  position: relative;
  user-select: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--accent-weak);
  color: var(--text);
  font-weight: 500;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
  border-radius: var(--r-pill);
}

/* nav icon — .nav-ico (referência) e .nav-icon (atual) */
.nav-ico, .nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  /* override quaisquer inline colors herdados */
  color: var(--text-faint) !important;
  background: var(--surface-2) !important;
}
.nav-item.active .nav-ico,
.nav-item.active .nav-icon {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-color: transparent !important;
}

/* nav tag/badge */
.nav-tag, .nav-badge {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
  /* override inline colors */
  background: var(--surface-2) !important;
  color: var(--text-faint) !important;
  border-color: var(--border) !important;
}
.nav-tag.new, .nav-badge.new {
  background: var(--accent-weak) !important;
  color: var(--accent) !important;
  border-color: transparent !important;
}

/* Sidebar footer */
.sidebar-foot, .sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer { flex-direction: column; align-items: stretch; gap: 12px; }

.sidebar-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--r-sm);
  color: var(--text-faint); font-size: 12px;
  transition: background .12s, color .12s;
}
.sidebar-link:hover { background: var(--surface-2); color: var(--text); }

.user-row { display: flex; align-items: center; gap: 10px; }
.avatar, .user-avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  background: var(--accent);
  color: var(--on-accent);
  display: grid; place-items: center;
  font-weight: 600; font-size: 14px;
}
.who, .user-name { font-size: 13px; font-weight: 500; color: var(--text); }
.role, .user-role { font-size: 11px; color: var(--text-faint); }

.live { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.dot, .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-weak);
}
@keyframes pulse {
  0%,100% { opacity:1; box-shadow:0 0 0 3px var(--success-weak); }
  50%      { opacity:.7; box-shadow:0 0 0 6px rgba(52,211,153,.06); }
}
.live-dot { animation: pulse 2s infinite; }

/* ══════════════════════════════════════════════════════════
   MAIN / TOPBAR / CONTENT
══════════════════════════════════════════════════════════ */
.main {
  margin-left: 248px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,17,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 18px 28px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.topbar h2, .page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
}
.topbar .sub, .page-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.topbar .actions, .topbar-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.content { padding: 24px 28px 56px; flex: 1; }

/* ══════════════════════════════════════════════════════════
   PANELS
══════════════════════════════════════════════════════════ */
.panel, .page { display: none; }
.panel.active, .page.active { display: block; animation: fadeIn .16s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }

/* ══════════════════════════════════════════════════════════
   GRID
══════════════════════════════════════════════════════════ */
.grid   { display: grid; gap: 20px; }
.kpis   { grid-template-columns: repeat(4,1fr); }
.row-2-1, .grid-2-1 { grid-template-columns: 1.7fr 1fr;  gap: 20px; margin-bottom: 20px; }
.row-1-1, .grid-2   { grid-template-columns: 1fr 1fr;    gap: 20px; margin-bottom: 20px; }
.row-1-2            { grid-template-columns: 1fr 1.7fr;  gap: 20px; }
.grid-3             { grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.mt                 { margin-top: 20px; }

.metrics-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.metrics-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.metrics-grid-6 { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; margin-bottom: 20px; }

/* ══════════════════════════════════════════════════════════
   CARD
══════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: var(--shadow);
}
/* header: .card-head (referência) e .card-header (atual) */
.card-head, .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .kbd {
  font-size: 10px;
  font-weight: 600;
  font-family: "Geist Mono", monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 5px;
}
/* .card-sub (referência) e .card-subtitle (atual) */
.card-sub, .card-subtitle { font-size: 12px; color: var(--text-faint); margin-top: 1px; }

/* ══════════════════════════════════════════════════════════
   KPI CARDS
══════════════════════════════════════════════════════════ */
.kpi, .metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow);
}
/* padrão KPI: label / número gigante / delta */
.kpi .label { margin-bottom: 0; }
.kpi .num {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1;
  margin: 12px 0 10px;
}
.kpi .unit { font-size: 22px; color: var(--text-muted); font-weight: 500; }

/* metric-card (app.js) — segue o mesmo padrão KPI */
.mc-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 0;
}
.mc-value {
  font-family: "Geist Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin: 12px 0 8px;
  letter-spacing: -.02em;
}
.mc-sub    { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.mc-change { font-size: 12px; font-weight: 500; margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* delta */
.delta { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.delta.up, .up   { color: var(--success); }
.delta.down,.down{ color: var(--danger);  }
.delta.flat,.flat{ color: var(--text-faint); }
.delta .ctx { color: var(--text-faint); font-weight: 400; }

/* ══════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════ */
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background .12s, border-color .12s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
  font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger { background: var(--danger-weak); border-color: rgba(255,107,92,.25); color: var(--danger); }

/* ══════════════════════════════════════════════════════════
   FORM / INPUTS
══════════════════════════════════════════════════════════ */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  margin-bottom: 7px;
}
label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: .07em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.input, .search-input, select.input, select.search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.input::placeholder, .search-input::placeholder { color: var(--text-faint); }
.input:focus, .search-input:focus { border-color: var(--accent); }
.form-2, .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row { margin-bottom: 14px; }
.search-row { display: flex; gap: 10px; }
.search-row .input { flex: 1; }

.notice {
  background: var(--success-weak);
  border: 1px solid transparent;
  color: var(--success);
  font-size: 13px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  margin: 6px 0 16px;
}
.checklist .ci {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.checklist .ci:last-child { border-bottom: 0; }
.checklist .ci .vt {
  font-family: "Geist Mono", monospace; font-size: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-faint); padding: 1px 5px; border-radius: 5px;
}

/* ══════════════════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  padding: 0 12px 12px;
  border-bottom: 1px solid var(--border);
}
thead th.right, tbody td.right { text-align: right; }
tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td .task { color: var(--text); font-weight: 500; }
td .num  { font-family: "Geist Mono", monospace; font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════════════════ */
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.alta,    .badge-warning { background: var(--warning-weak); color: var(--warning); }
.badge.exec,    .badge-accent  { background: var(--accent-weak);  color: var(--accent); }
.badge.ok,      .badge-success { background: var(--success-weak); color: var(--success); }
.badge.pend                    { background: var(--surface-2);    color: var(--text-faint); }
.badge.crit,    .badge-danger  { background: var(--danger-weak);  color: var(--danger); }

/* compat chips com semântica */
.chip { padding: 3px 10px; border-radius: var(--r-pill); font-size: 10px; font-weight: 600; white-space: nowrap; }
.chip-green, .chip-teal  { background: var(--success-weak);  color: var(--success);  border: 1px solid rgba(52,211,153,.2); }
.chip-teal               { background: var(--accent-weak);   color: var(--accent);   border: 1px solid rgba(61,210,180,.2); }
.chip-amber              { background: var(--warning-weak);  color: var(--warning);  border: 1px solid rgba(242,181,68,.2); }
.chip-red                { background: var(--danger-weak);   color: var(--danger);   border: 1px solid rgba(255,107,92,.2); }
/* chip genérico neutro */
.chip-neutral            { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

/* tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  padding: 4px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: 11px; color: var(--text-muted);
}
.tag-hot   { background: var(--danger-weak);  border-color: rgba(255,107,92,.2);  color: var(--danger); }
.tag-trend { background: var(--success-weak); border-color: rgba(52,211,153,.2);  color: var(--success); }
.tag-amber { background: var(--warning-weak); border-color: rgba(242,181,68,.2);  color: var(--warning); }

/* ══════════════════════════════════════════════════════════
   MINI-BAR
══════════════════════════════════════════════════════════ */
.mini-bar {
  width: 90px; height: 5px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  display: inline-block; vertical-align: middle; overflow: hidden;
}
.mini-bar > i { display: block; height: 100%; background: var(--text-faint); border-radius: var(--r-pill); }

/* ══════════════════════════════════════════════════════════
   BAR ROWS (horizontal progress bars)
══════════════════════════════════════════════════════════ */
.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.bar-row:last-child { margin-bottom: 0; }
.bar-label { font-size: 13px; color: var(--text-muted); }
.bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: -6px;
}
.bar-fill { height: 100%; background: var(--text-faint); border-radius: var(--r-pill); }
.bar-fill.accent { background: var(--accent); }
.bar-val { font-size: 13px; font-weight: 500; color: var(--text); }

/* progress compat (app.js) */
.progress-wrap { height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width .6s ease; }

/* ══════════════════════════════════════════════════════════
   SENTIMENTO SPLIT BAR
══════════════════════════════════════════════════════════ */
.split {
  display: flex; height: 30px;
  border-radius: var(--r-sm); overflow: hidden;
  margin-bottom: 12px; border: 1px solid var(--border);
}
.split > div { display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--on-accent); }
.split .pos { background: var(--success); }
.split .neu { background: var(--surface-2); color: var(--text-muted); }
.split .neg { background: var(--danger); }
.split-legend { display: flex; justify-content: space-between; font-size: 11.5px; }
.split-legend .pos { color: var(--success); }
.split-legend .neu { color: var(--text-faint); }
.split-legend .neg { color: var(--danger); }

/* compat sent-card (app.js) */
.sent-card {
  flex: 1; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 10px; text-align: center;
}
.sent-val   { font-size: 22px; font-weight: 700; font-family: "Geist Mono", monospace; font-variant-numeric: tabular-nums; }
.sent-label { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════
   RECOMENDAÇÕES
══════════════════════════════════════════════════════════ */
.rec { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.rec:last-child { border-bottom: 0; padding-bottom: 0; }
.rec:first-child { padding-top: 0; }
.rec-ico {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 7px; display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
}
.rec-ico.ok      { background: var(--success-weak); color: var(--success); }
.rec-ico.warn    { background: var(--warning-weak); color: var(--warning); }
.rec-ico.crit    { background: var(--danger-weak);  color: var(--danger); }
.rec-ico.num-ico { background: var(--accent-weak);  color: var(--accent);  font-family: "Geist Mono", monospace; }
.rec p    { font-size: 13.5px; color: var(--text); }
.rec .meta{ font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   GAUGE (score circular SVG)
══════════════════════════════════════════════════════════ */
.gauge { display: flex; align-items: center; justify-content: center; padding: 6px 0 2px; }
.gauge .score { font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge .of    { font-size: 13px; color: var(--text-faint); }
.gauge-note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; }
.conf { font-size: 11px; color: var(--text-faint); text-align: center; margin-top: 4px; }

/* ══════════════════════════════════════════════════════════
   CHART LEGEND
══════════════════════════════════════════════════════════ */
.legend { display: flex; gap: 18px; margin-top: 14px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }

/* ══════════════════════════════════════════════════════════
   TABS
══════════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab, .rs-plat-btn {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all .12s;
}
.tab.active, .rs-plat-btn.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

/* ══════════════════════════════════════════════════════════
   PROFILE (Radar Social)
══════════════════════════════════════════════════════════ */
.profile { display: flex; gap: 18px; align-items: flex-start; }
.pfp {
  width: 64px; height: 64px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 22px; color: var(--text-faint); flex-shrink: 0;
}
.profile .nm   { font-size: 20px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.profile .handle { font-size: 13px; color: var(--accent); margin: 2px 0 8px; }
.profile .bio  { font-size: 13px; color: var(--text-muted); line-height: 1.5; max-width: 560px; }
.pstats {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-sm); overflow: hidden; margin-top: 18px;
}
.pstat { background: var(--surface); padding: 14px 16px; text-align: center; }
.pstat .v { font-family: "Geist Mono", monospace; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pstat .l { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ══════════════════════════════════════════════════════════
   CHAT / NEXUS
══════════════════════════════════════════════════════════ */
.chat {
  min-height: 380px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 30px;
}
.chat .bot {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: var(--accent-weak); color: var(--accent);
  display: grid; place-items: center;
  font-size: 26px; margin-bottom: 16px;
}
.chat h3 { font-size: 17px; font-weight: 600; }
.chat p  { font-size: 13px; color: var(--text-muted); margin-top: 6px; max-width: 460px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 22px; }
.chips .chip, .chip-btn {
  padding: 9px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 400;
}
.chips .chip:hover, .chip-btn:hover { border-color: var(--accent); color: var(--text); }
.chat-input { display: flex; gap: 10px; margin-top: 18px; }
.chat-input .input { flex: 1; }

/* ══════════════════════════════════════════════════════════
   PRESENCE ROWS (seg-row)
══════════════════════════════════════════════════════════ */
.seg-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.seg-row:last-child { border-bottom: 0; }
.seg-ic {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px; color: var(--text-muted); font-weight: 600;
}
.seg-val { font-size: 13px; color: var(--text-muted); font-family: "Geist Mono", monospace; font-variant-numeric: tabular-nums; }

/* compat: platform-row (app.js) */
.platform-row   { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.platform-icon  {
  width: 32px; height: 32px; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════
   SWOT
══════════════════════════════════════════════════════════ */
.swot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.swot-q {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 16px; min-height: 96px;
}
.swot-q .h {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
}
.swot-q .h .d { width: 8px; height: 8px; border-radius: 50%; }
.swot-q.f .d { background: var(--success); }
.swot-q.w .d { background: var(--warning); }
.swot-q.o .d { background: var(--accent); }
.swot-q.t .d { background: var(--danger); }
.swot-q ul  { list-style: none; font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.swot-q li::before { content: "–  "; color: var(--text-faint); }

/* ══════════════════════════════════════════════════════════
   STEPPER
══════════════════════════════════════════════════════════ */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 13px; }
.step .n {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); display: grid; place-items: center;
  font-size: 12px; font-weight: 600; font-family: "Geist Mono", monospace;
  background: var(--surface);
}
.step.active { color: var(--text); }
.step.active .n { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 14px; }

/* ══════════════════════════════════════════════════════════
   MODULE GRID (Hub Overview)
══════════════════════════════════════════════════════════ */
.mod-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.mod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px;
  cursor: pointer;
  transition: border-color .14s, transform .14s;
}
.mod-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.mod-card .vico {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.mod-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.mod-card p  { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.mod-card .go {
  margin-top: 14px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px;
}
.mod-card:hover .go { color: var(--accent); }

/* Hero */
.hero { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.hero .big {
  font-family: "Geist Mono", monospace;
  font-size: 54px; font-weight: 600;
  letter-spacing: -.03em; line-height: 1;
}
.hero .big b { color: var(--accent); }
.hero h3 { font-size: 22px; font-weight: 600; }
.hero p  { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════
   LIST ITEMS (app.js)
══════════════════════════════════════════════════════════ */
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.list-name   { font-size: 13px; font-weight: 500; color: var(--text); }
.list-detail { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.list-right  { margin-left: auto; text-align: right; }

/* ══════════════════════════════════════════════════════════
   ALERT ITEMS (app.js)
══════════════════════════════════════════════════════════ */
.alert-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.alert-dot  { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.alert-msg  { font-size: 12px; color: var(--text); line-height: 1.4; }
.alert-time { font-size: 10px; color: var(--text-faint); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.6); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 14px; font-weight: 600; color: var(--text); }
.modal-close {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  display: grid; place-items: center;
  cursor: pointer; font-size: 16px; color: var(--text-muted);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: 18px 22px; }

/* ══════════════════════════════════════════════════════════
   DIVIDER / EMPTY STATE
══════════════════════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.empty, .empty-state { text-align: center; padding: 54px 20px; color: var(--text-faint); }
.empty .ic, .empty-state .icon { font-size: 30px; opacity: .5; margin-bottom: 12px; }
.empty .t, .empty-state p { font-size: 14px; color: var(--text-muted); }
.empty .s { font-size: 13px; margin-top: 4px; }

/* ══════════════════════════════════════════════════════════
   RADAR SOCIAL — componentes específicos
══════════════════════════════════════════════════════════ */
#rs-status {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 14px; color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width:1080px) {
  .kpis, .metrics-grid-4, .metrics-grid-6 { grid-template-columns: repeat(2,1fr); }
  .row-2-1, .row-1-1, .row-1-2,
  .grid-2-1, .grid-2, .grid-3, .mod-grid { grid-template-columns: 1fr; }
  .form-2, .form-grid-2 { grid-template-columns: 1fr; }
  .swot { grid-template-columns: 1fr; }
}
@media (max-width:720px) {
  .sidebar { display: none; }
  .main    { margin-left: 0; }
  .topbar, .content { padding: 16px; }
  .kpis, .metrics-grid-4, .metrics-grid-6 { grid-template-columns: 1fr 1fr; }
  .pstats { grid-template-columns: repeat(2,1fr); }
}
