:root {
  /* Paleta Base War Room — Tema Escuro (Black) */
  --bg: #030712;
  --bg-card: rgba(10, 20, 42, 0.76);
  --bg-card-hover: rgba(15, 28, 58, 0.90);
  --border: rgba(46, 109, 246, 0.22);
  --border-highlight: rgba(90, 162, 255, 0.40);

  /* Tipografia */
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;

  --text: #f4f7ff;
  --text-muted: #8ea5c8;
  --text-dim: #5c7299;

  /* Cores de Ação e Ritmo */
  --blue: #2e6df6;
  --blue-light: #5aa2ff;
  --blue-glow: rgba(46, 109, 246, 0.40);
  --blue-big: #93c5fd;

  --green: #10b981;
  --green-light: #34d399;
  --green-glow: rgba(16, 185, 129, 0.40);
  --green-big: #6ee7b7;

  --orange: #f59e0b;
  --orange-light: #fbbf24;
  --orange-glow: rgba(245, 158, 11, 0.40);
  --orange-big: #fcd34d;

  --red: #ef4444;
  --red-light: #f87171;
  --red-glow: rgba(239, 68, 68, 0.40);

  --gold: #facc15;
  --gold-glow: rgba(250, 204, 21, 0.40);
  --purple: #a855f7;
  --cian: #06b6d4;
  --cian-big: #67e8f9;

  --divider-bg: linear-gradient(135deg, rgba(14, 30, 68, 0.95), rgba(6, 16, 38, 0.98));
  --divider-border: rgba(90, 162, 255, 0.55);
  --track-bg: #060e20;
}

/* ========================================================
   TEMA CLARO (WHITE THEME / HIGH CONTRAST)
   ======================================================== */
body.theme-light {
  --bg: #edf2f7;
  --bg-card: rgba(255, 255, 255, 0.96);
  --bg-card-hover: #ffffff;
  --border: #cbd5e1;
  --border-highlight: rgba(37, 99, 235, 0.4);

  --text: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;

  --blue-light: #1d4ed8;
  --blue-big: #1e40af;
  --blue-glow: rgba(37, 99, 235, 0.2);

  --green-light: #047857;
  --green-big: #065f46;
  --green-glow: rgba(16, 185, 129, 0.2);

  --orange-light: #b45309;
  --orange-big: #92400e;
  --orange-glow: rgba(245, 158, 11, 0.2);

  --cian-big: #0e7490;

  --divider-bg: linear-gradient(135deg, #1e293b, #0f172a);
  --divider-border: #3b82f6;
  --track-bg: #020617;
}

body.theme-light {
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(1000px 600px at -10% 115%, rgba(16, 185, 129, 0.06), transparent 55%),
    var(--bg);
}

body.theme-light .meta-label { color: #0f172a; text-shadow: none; }
body.theme-light .clock-time { color: #0f172a; }
body.theme-light .card { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
body.theme-light .kpi-watermark { opacity: 0.05; color: #0f172a !important; }
body.theme-light .brand-logo { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15)); }
body.theme-light .top3-list .rank-row { background: #f8fafc; border-color: #e2e8f0; }
body.theme-light .top3-list .rank-seller { color: #0f172a; }
body.theme-light .top4-feed .feed-item { background: #f8fafc; border-color: #e2e8f0; }
body.theme-light .top4-feed .feed-client { color: #0f172a; }
body.theme-light .radar-box { background: #f8fafc; border-color: #e2e8f0; }
body.theme-light .rbox-val { color: #0f172a; }
body.theme-light .split-title { color: #0f172a; }

/* Termômetro no Tema Claro */
body.theme-light .bar-card.divider-beam {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07), 0 0 16px rgba(37, 99, 235, 0.1);
}
body.theme-light .lbl-beam {
  color: #0f172a;
  text-shadow: none;
}
body.theme-light .bar-pct-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1.5px solid #93c5fd;
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
body.theme-light .bar-track {
  background: #e2e8f0;
  border: 1.5px solid #cbd5e1;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}
body.theme-light .tick {
  background: rgba(15, 23, 42, 0.35);
}
body.theme-light .tk-dot {
  background: #1e293b;
  border: 2px solid #ffffff;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}
body.theme-light .tk-lbl {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
body.theme-light .tick.goal .tk-dot {
  background: #eab308;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5);
}
body.theme-light .tick.goal .tk-lbl {
  background: #059669;
  color: #ffffff;
  border: 1.5px solid #047857;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  background:
    radial-gradient(1400px 800px at 85% -15%, rgba(46, 109, 246, 0.18), transparent 60%),
    radial-gradient(1100px 700px at -10% 115%, rgba(16, 185, 129, 0.10), transparent 55%),
    radial-gradient(900px 600px at 50% 50%, rgba(10, 20, 42, 0.7), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  display: flex;
  flex-direction: column;
  padding: 1.1vmin 1.6vmin 0.6vmin;
  letter-spacing: -0.01em;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ========================================================
   CABEÇALHO EXECUTIVO
   ======================================================== */
.hd {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.6vmin;
  padding-bottom: 0.8vmin;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

/* Banner de Aviso / Motivacional (MOTD) */
.motd-banner {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(16, 185, 129, 0.2));
  border: 1.5px solid rgba(90, 162, 255, 0.45);
  border-radius: 8px;
  padding: 0.35vmin 1.4vmin;
  margin-top: 0.5vmin;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8vmin;
  font-size: clamp(11px, 1.45vmin, 19px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  animation: pulse-border 3s ease infinite;
}
.motd-icon { font-size: clamp(13px, 1.7vmin, 22px); }
body.theme-light .motd-banner {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
  border: 1.5px solid rgba(37, 99, 235, 0.3);
  color: #0f172a;
}

.brand { justify-self: start; }
.brand-logo {
  height: clamp(44px, 6.2vmin, 86px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.45)) drop-shadow(0 0 24px rgba(90, 162, 255, 0.3));
}

.hd-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3vmin;
}

.meta-label {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.8vmin, 25px);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.pacing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6vmin;
  font-size: clamp(10px, 1.3vmin, 17px);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25vmin 1.3vmin;
  border-radius: 999px;
  background: rgba(10, 25, 55, 0.85);
  border: 1px solid var(--border-highlight);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.pacing-dot {
  width: clamp(6px, 0.9vmin, 11px);
  height: clamp(6px, 0.9vmin, 11px);
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 8px var(--blue-light);
  animation: pulse-dot 1.8s infinite;
}

.pacing-badge.ahead {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(6, 40, 28, 0.85);
  color: #a7f3d0;
}
.pacing-badge.ahead .pacing-dot { background: var(--green-light); box-shadow: 0 0 10px var(--green); }

.pacing-badge.behind {
  border-color: rgba(239, 68, 68, 0.6);
  background: rgba(50, 10, 15, 0.85);
  color: #fecaca;
  animation: shake-subtle 4s infinite ease-in-out;
}
.pacing-badge.behind .pacing-dot { background: var(--red-light); box-shadow: 0 0 10px var(--red); }

.pacing-badge.superated {
  border-color: rgba(250, 204, 21, 0.6);
  background: rgba(50, 40, 5, 0.85);
  color: #fef08a;
}
.pacing-badge.superated .pacing-dot { background: var(--gold); box-shadow: 0 0 12px var(--gold); }

.hd-right {
  display: flex;
  align-items: center;
  gap: 1.2vmin;
  justify-self: end;
}

.theme-toggle-btn {
  background: rgba(46, 109, 246, 0.18);
  border: 1px solid var(--border-highlight);
  border-radius: 999px;
  color: var(--blue-light);
  font-size: clamp(10px, 1.2vmin, 15px);
  font-weight: 800;
  padding: 0.4vmin 1.1vmin;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4vmin;
  transition: all 0.2s;
}
.theme-toggle-btn:hover { background: var(--blue); color: #ffffff; }

.sound-toggle-btn {
  background: rgba(250, 204, 21, 0.18);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 999px;
  color: var(--gold);
  font-size: clamp(10px, 1.2vmin, 15px);
  font-weight: 800;
  padding: 0.4vmin 1.1vmin;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4vmin;
  transition: all 0.2s;
}
.sound-toggle-btn:hover { background: rgba(250, 204, 21, 0.35); border-color: var(--gold); }
.sound-toggle-btn.muted { color: var(--text-dim); border-color: rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.05); }

.clock {
  text-align: right;
  line-height: 1.15;
}
.clock-time {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.9vmin, 40px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}
.clock-date {
  font-size: clamp(10px, 1.25vmin, 16px);
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.clock-days {
  font-size: clamp(9px, 1.15vmin, 15px);
  color: var(--blue-light);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-top: 0.15vmin;
}

/* Banner de meta batida */
.meta-banner {
  display: none;
  margin: 0.6vmin 0 0;
  background: linear-gradient(90deg, #1d4ed8, #059669, #eab308);
  background-size: 200% 100%;
  animation: gradient-shift 4s ease infinite;
  color: #040d1a;
  border-radius: 1vmin;
  padding: 0.7vmin 1.8vmin;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35);
  flex: 0 0 auto;
}
.meta-banner.show { display: block; }
.mb-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5vmin; }
.mb-trophy { font-size: clamp(20px, 3vmin, 40px); }
.mb-title { font-family: var(--font-display); font-size: clamp(16px, 2.5vmin, 34px); font-weight: 900; line-height: 1; color: #ffffff; }
.mb-sub { font-size: clamp(11px, 1.4vmin, 20px); font-weight: 700; color: #e2e8f0; margin-top: 0.2vmin; }
.mb-badge {
  background: #ffffff;
  color: #064e3b;
  font-weight: 900;
  font-size: clamp(10px, 1.3vmin, 17px);
  padding: 0.35vmin 1.2vmin;
  border-radius: 999px;
  letter-spacing: 0.06em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ========================================================
   CONTAINER PRINCIPAL WAR ROOM
   ======================================================== */
.war-room {
  display: flex;
  flex-direction: column;
  gap: 0.8vmin;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.6vmin 0 0.2vmin;
}

/* Cartão Base com Glassmorphism */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: 1.2vmin;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
}

/* ========================================================
   NÍVEL 1: GRADE 2x2 COM TIPOGRAFIA AMPLIADA (50% MAIOR)
   ======================================================== */
.kpi-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.8vmin;
  flex: 1 1 54%;
  min-height: 0;
}

.kpi-balanced {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2vmin 2vmin 0.8vmin;
  position: relative;
  overflow: hidden;
}

/* Ícone em Marca D'água no Canto (Estilizado com Transparência) */
.kpi-watermark {
  position: absolute;
  right: -2vmin;
  bottom: -3vmin;
  width: clamp(100px, 16vmin, 200px);
  height: clamp(100px, 16vmin, 200px);
  pointer-events: none;
  transform: rotate(-10deg);
  opacity: 0.08;
  z-index: 1;
}
.kpi-watermark svg { width: 100%; height: 100%; }

.card.meta .kpi-watermark { color: var(--blue-light); opacity: 0.10; }
.card.fat .kpi-watermark { color: var(--green-light); opacity: 0.10; }
.card.missing .kpi-watermark { color: var(--orange-light); opacity: 0.10; }
.card.prog .kpi-watermark { color: var(--cian); opacity: 0.10; }

/* Barra de Topo com Título 50% Maior e Respiro */
.kpi-top-bar {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 0.4vmin;
  position: relative;
  z-index: 2;
}

.kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.8vmin;
  font-size: clamp(12px, 1.8vmin, 24px);
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.35vmin 2.2vmin;
  border-radius: 999px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.pill-ic { font-size: clamp(14px, 2.1vmin, 28px); }

.blue-pill {
  background: rgba(46, 109, 246, 0.25);
  border: 1.5px solid rgba(90, 162, 255, 0.65);
  color: var(--blue-big);
}

.green-pill {
  background: rgba(16, 185, 129, 0.25);
  border: 1.5px solid rgba(52, 211, 153, 0.65);
  color: var(--green-big);
}

.orange-pill {
  background: rgba(245, 158, 11, 0.25);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  color: var(--orange-big);
}

.cian-pill {
  background: rgba(6, 182, 212, 0.25);
  border: 1.5px solid rgba(6, 182, 212, 0.65);
  color: var(--cian-big);
}

/* Miolo Principal: Números Gigantes 50% Maiores para Leitura de Longe */
.kpi-main-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 auto;
}

.card .big {
  font-family: var(--font-display);
  font-size: clamp(38px, 6.4vmin, 92px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
  white-space: nowrap;
  color: #ffffff;
  letter-spacing: -0.025em;
}

.card.meta .big {
  color: var(--blue-big);
  text-shadow: 0 0 30px var(--blue-glow);
}
.card.fat .big {
  color: var(--green-big);
  text-shadow: 0 0 30px var(--green-glow);
}
.card.missing .big {
  color: var(--orange-big);
  text-shadow: 0 0 30px var(--orange-glow);
}
.card.prog .big {
  color: var(--cian-big);
  text-shadow: 0 0 30px rgba(6, 182, 212, 0.55);
}

/* Badges Sub-Informativas Harmoniosas no Card 4 */
.kpi-sub-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8vmin;
  font-size: clamp(10px, 1.35vmin, 18px);
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 0.3vmin;
  white-space: nowrap;
}
.kpi-badge-item strong {
  color: var(--cian);
  font-weight: 900;
}
.kpi-badge-item.dot {
  color: var(--text-dim);
  opacity: 0.45;
}
body.theme-light .kpi-badge-item strong {
  color: #0e7490;
}

.kpi-sub-label {
  font-size: clamp(11px, 1.45vmin, 19px);
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-top: 0.3vmin;
  white-space: nowrap;
}
.kpi-sub-label.ok-lbl { color: var(--text-muted); }
.kpi-sub-label.alert-lbl { color: var(--text-muted); }
.kpi-sub-label.alert-lbl strong { color: var(--orange-light); }

/* ========================================================
   NÍVEL 2: TERMÔMETRO — FAIXA DIVISORA DE ALTA ENERGIA
   ======================================================== */
.bar-card.divider-beam {
  background: var(--divider-bg);
  border: 1.5px solid var(--divider-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px var(--blue-glow);
  padding: 0.7vmin 1.6vmin 1vmin;
  flex: 0 0 auto;
  position: relative;
}

.beam-glow-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #10b981, #facc15, #3b82f6);
  background-size: 200% 100%;
  animation: gradient-shift 3s linear infinite;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35vmin;
}

.bar-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.8vmin;
}

.bar-icon-badge {
  background: #3b82f6;
  color: #ffffff;
  font-size: clamp(12px, 1.5vmin, 20px);
  width: clamp(22px, 2.8vmin, 36px);
  height: clamp(22px, 2.8vmin, 36px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

.lbl-beam {
  font-size: clamp(11px, 1.4vmin, 18px);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.bar-pct-badge {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vmin, 36px);
  font-weight: 900;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.5);
  border: 1px solid #60a5fa;
  padding: 0.2vmin 1.2vmin;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px var(--blue-glow);
}

.bar-wrap {
  position: relative;
  padding: 0 clamp(24px, 4vmin, 64px) 2.2vmin;
}

.bar-track {
  position: relative;
  z-index: 2;
  height: clamp(18px, 2.7vmin, 36px);
  background: var(--track-bg);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.9);
}

.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 25%, #06b6d4 50%, #10b981 75%, #facc15 100%);
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.7);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 0;
}

.bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.4) 50%, transparent 80%);
  background-size: 250% 100%;
  animation: sheen 2.5s linear infinite;
}

.bar-fill.over {
  background: linear-gradient(90deg, #059669 0%, #10b981 40%, #facc15 100%);
  box-shadow: 0 0 32px rgba(16, 185, 129, 0.8);
}

.bar-current {
  position: absolute;
  top: 50%;
  left: 0;
  width: clamp(14px, 2.1vmin, 28px);
  height: clamp(14px, 2.1vmin, 28px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #60a5fa 60%, #1d4ed8 100%);
  box-shadow: 0 0 0 3px #040814, 0 0 20px rgba(96, 165, 250, 1);
  z-index: 3;
  transition: left 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-marks {
  position: absolute;
  inset: 0 clamp(24px, 4vmin, 64px) 2.2vmin clamp(24px, 4vmin, 64px);
  z-index: 1;
  pointer-events: none;
}

.tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.35);
}

.tk-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(6px, 1.0vmin, 12px);
  height: clamp(6px, 1.0vmin, 12px);
  transform: translate(-50%, -50%) rotate(45deg);
  background: #ffffff;
  border: 2px solid #040814;
  box-shadow: 0 0 10px #60a5fa;
}

.tk-lbl {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.3vmin;
  font-size: clamp(10px, 1.2vmin, 15px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.15vmin 0.6vmin;
  border-radius: 4px;
  white-space: nowrap;
}

.tick.goal .tk-dot {
  background: #facc15;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.8), 0 0 16px var(--gold);
}
.tick.goal .tk-lbl {
  transform: translateX(-70%);
  color: #ffffff;
  background: linear-gradient(90deg, #059669, #10b981);
  border: 1.5px solid #34d399;
  border-radius: 999px;
  padding: 0.25vmin 1vmin;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

/* ========================================================
   NÍVEL 3: 3 COLUNAS ESTRATÉGICAS NA BASE
   ======================================================== */
.bottom-3-cols {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 0.95fr;
  gap: 0.8vmin;
  flex: 1 1 38%;
  min-height: 0;
}

.ranking-card, .feed-card, .radar-card {
  display: flex;
  flex-direction: column;
  padding: 0.8vmin 1.1vmin;
  min-height: 0;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5vmin;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.5vmin;
  flex: 0 0 auto;
}

.split-title {
  display: flex;
  align-items: center;
  gap: 0.6vmin;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.4vmin, 19px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  text-transform: uppercase;
}

.split-icon { font-size: clamp(13px, 1.6vmin, 22px); }

.split-badge {
  font-size: clamp(9px, 1.05vmin, 13px);
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2vmin 0.7vmin;
  border-radius: 999px;
  background: rgba(46, 109, 246, 0.15);
  border: 1px solid var(--border);
  color: var(--blue-light);
}

.split-badge.gold {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.3);
  color: var(--gold);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5vmin;
  font-size: clamp(9px, 1.05vmin, 13px);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--green-light);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 1.4s infinite;
}

/* ========================================================
   COLUNA 1: TOP 3 COM FOTOS REDONDAS AMPLIADAS
   ======================================================== */
.top3-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.4vmin;
}

.rank-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 1vmin;
  padding: 0.65vmin 0.9vmin;
  border-radius: 1vmin;
  background: rgba(6, 14, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.rank-avatar-wrap {
  position: relative;
  width: clamp(38px, 4.8vmin, 64px);
  height: clamp(38px, 4.8vmin, 64px);
  border-radius: 50%;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.rank-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(13px, 1.8vmin, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-row.rank-1 {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.14), rgba(6, 14, 30, 0.82) 75%);
  border-color: rgba(250, 204, 21, 0.5);
}
.rank-row.rank-1 .rank-avatar-wrap {
  background: linear-gradient(135deg, #facc15, #ca8a04);
  box-shadow: 0 0 16px var(--gold-glow);
}
.rank-row.rank-1 .rank-avatar-fallback {
  background: linear-gradient(135deg, #ca8a04, #eab308);
}

.rank-row.rank-2 {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12), rgba(6, 14, 30, 0.78) 75%);
  border-color: rgba(148, 163, 184, 0.38);
}
.rank-row.rank-2 .rank-avatar-wrap {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.35);
}

.rank-row.rank-3 {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.12), rgba(6, 14, 30, 0.78) 75%);
  border-color: rgba(217, 119, 6, 0.38);
}
.rank-row.rank-3 .rank-avatar-wrap {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.rank-badge {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vmin, 26px);
  font-weight: 900;
  width: clamp(20px, 2.6vmin, 32px);
  text-align: center;
}

.rank-info { min-width: 0; display: flex; flex-direction: column; gap: 0.15vmin; }
.rank-seller {
  font-size: clamp(12px, 1.5vmin, 20px);
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-meta-sub {
  font-size: clamp(9px, 1.1vmin, 13.5px);
  color: var(--text-muted);
  font-weight: 600;
}
.rank-meta-sub .count-badge { color: var(--blue-light); font-weight: 700; }

.rank-share-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.2vmin;
}
.rank-share-fill { height: 100%; background: var(--blue-light); border-radius: 999px; }
.rank-row.rank-1 .rank-share-fill { background: var(--gold); }

.rank-amount {
  text-align: right;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vmin, 26px);
  font-weight: 900;
  color: var(--green-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ========================================================
   COLUNA 2: FEED DE ÚLTIMAS 4 VENDAS
   ======================================================== */
.top4-feed {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.4vmin;
}

.feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8vmin;
  padding: 0.5vmin 0.8vmin;
  border-radius: 0.8vmin;
  background: rgba(6, 14, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--blue-light);
  transition: transform 0.2s ease;
}

.feed-item.new-arrival {
  animation: flash-green 2s ease-out;
  border-left-color: var(--green);
}

.feed-avatar {
  width: clamp(24px, 3.2vmin, 38px);
  height: clamp(24px, 3.2vmin, 38px);
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #ffffff;
  font-weight: 800;
  font-size: clamp(10px, 1.3vmin, 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.feed-info { min-width: 0; display: flex; flex-direction: column; gap: 0.1vmin; }
.feed-client {
  font-size: clamp(11px, 1.4vmin, 18px);
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-seller {
  font-size: clamp(9px, 1.1vmin, 13.5px);
  color: var(--text-muted);
  font-weight: 600;
}
.feed-seller span { color: var(--blue-light); font-weight: 700; }

.feed-val-wrap { text-align: right; }
.feed-amount {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.8vmin, 26px);
  font-weight: 900;
  color: var(--green-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.feed-time {
  font-size: clamp(8px, 1.05vmin, 13px);
  color: var(--text-dim);
  font-weight: 600;
}

/* ========================================================
   COLUNA 3: RADAR TEMPORAL (3 PERÍODOS)
   ======================================================== */
.radar-content-3ways {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 0.5vmin;
}

.radar-box {
  background: rgba(6, 14, 30, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0.8vmin;
  padding: 0.55vmin 0.8vmin;
}

.rbox-today { border-left: 3.5px solid var(--green); }
.rbox-week  { border-left: 3.5px solid var(--blue-light); }
.rbox-prev  { border-left: 3.5px solid var(--purple); }

.rbox-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15vmin;
}

.rbox-tag {
  font-size: clamp(9px, 1.1vmin, 14px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--green-light);
}
.rbox-tag.week-tag { color: var(--blue-light); }
.rbox-tag.prev-tag { color: #c084fc; text-transform: uppercase; }

.rbox-sub {
  font-size: clamp(9px, 1.1vmin, 14px);
  font-weight: 700;
  color: var(--text-muted);
}

.rbox-body {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.rbox-val {
  font-family: var(--font-display);
  font-size: clamp(15px, 2.2vmin, 30px);
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.rbox-badge {
  font-size: clamp(9px, 1.1vmin, 14px);
  font-weight: 800;
  color: var(--green-light);
  background: rgba(16, 185, 129, 0.15);
  padding: 0.15vmin 0.6vmin;
  border-radius: 4px;
}

.rbox-note {
  font-size: clamp(8px, 1.05vmin, 13px);
  color: var(--text-dim);
  font-weight: 600;
}

/* ========================================================
   OVERLAYS E CELEBRAÇÕES
   ======================================================== */
.overlay {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Backdrop */
.cel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(10, 25, 60, 0.6), rgba(2, 6, 18, 0.92));
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cel-backdrop.show { opacity: 1; visibility: visible; }

/* NOTIFICAÇÃO NOVA VENDA CENTRALIZADA GIGANTE */
.new-sale-monumental {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  display: block;
  opacity: 0;
  visibility: hidden;
  z-index: 60;
  text-align: center;
  min-width: clamp(340px, 50vmin, 720px);
  background: rgba(6, 18, 42, 0.98);
  backdrop-filter: blur(26px);
  border: 2px solid rgba(52, 211, 153, 0.7);
  border-radius: 2.6vmin;
  padding: 4vmin 6vmin;
  box-shadow: 0 0 90px rgba(16, 185, 129, 0.45), 0 30px 100px rgba(0, 0, 0, 0.85);
  transition: all 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.new-sale-monumental.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.ns-fire-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vmin, 44px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--green-light);
  text-shadow: 0 0 24px var(--green-glow);
  margin-bottom: 1vmin;
}

.ns-amount {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vmin, 96px);
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-shadow: 0 0 35px var(--green-glow);
  margin: 1vmin 0 1.6vmin;
}

.ns-details-card {
  background: rgba(10, 25, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.2vmin;
  padding: 1.2vmin 2vmin;
  margin-bottom: 1.4vmin;
  display: flex;
  flex-direction: column;
  gap: 0.4vmin;
}

.ns-seller-badge {
  font-size: clamp(16px, 2.6vmin, 34px);
  color: var(--blue-light);
  font-weight: 800;
}

.ns-customer-text {
  font-size: clamp(13px, 1.8vmin, 24px);
  color: var(--text-muted);
  font-weight: 600;
}

.ns-cheer-sub {
  font-size: clamp(12px, 1.6vmin, 22px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.12em;
}

/* Celebração de Marco */
.celebration {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: block;
  opacity: 0;
  visibility: hidden;
  text-align: center;
  min-width: clamp(340px, 48vmin, 700px);
  background: rgba(6, 16, 38, 0.98);
  backdrop-filter: blur(24px);
  border: 2px solid rgba(90, 162, 255, 0.6);
  border-radius: 2.4vmin;
  padding: 4.5vmin 6vmin;
  box-shadow: 0 0 80px rgba(46, 109, 246, 0.4), 0 24px 80px rgba(0, 0, 0, 0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.celebration.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.celebration.important {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 100px rgba(16, 185, 129, 0.45), 0 24px 80px rgba(0, 0, 0, 0.8);
}

.cel-emoji { font-size: clamp(64px, 10vmin, 140px); line-height: 1; }
.cel-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.8vmin, 80px);
  font-weight: 900;
  line-height: 1.05;
  color: #ffffff;
  margin-top: 1.4vmin;
  text-shadow: 0 0 30px var(--blue-glow);
}
.celebration.important .cel-title { color: var(--green-light); text-shadow: 0 0 34px var(--green-glow); }
.cel-sub {
  font-size: clamp(18px, 2.8vmin, 38px);
  font-weight: 800;
  color: var(--blue-light);
  margin-top: 1.6vmin;
  letter-spacing: 0.16em;
}
.celebration.important .cel-sub { color: var(--green-light); }

/* ========================================================
   MODAL DO PAINEL DE TESTES
   ======================================================== */
.test-sandbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 18, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.test-sandbox-modal.open { opacity: 1; visibility: visible; }

.ts-box {
  background: #091328;
  border: 1px solid var(--border-highlight);
  border-radius: 1.4vmin;
  padding: 2.4vmin;
  width: clamp(320px, 45vmin, 580px);
  box-shadow: 0 20px 80px rgba(0,0,0,0.8);
}
.ts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1vmin; }
.ts-head h3 { font-family: var(--font-display); font-size: 18px; color: #ffffff; }
.ts-close { background: transparent; border: 0; color: var(--text-muted); font-size: 20px; cursor: pointer; }
.ts-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 1.6vmin; line-height: 1.4; }
.ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1vmin; }
.btn-test {
  background: rgba(46, 109, 246, 0.2);
  border: 1px solid var(--border-highlight);
  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-test:hover { background: var(--blue); transform: translateY(-1px); }
.btn-test.btn-sale { background: rgba(16, 185, 129, 0.2); border-color: rgba(16, 185, 129, 0.5); }
.btn-test.btn-sale:hover { background: var(--green); color: #04120c; }
.btn-test.btn-milestone { background: rgba(6, 182, 212, 0.2); border-color: rgba(6, 182, 212, 0.5); }
.btn-test.btn-milestone:hover { background: var(--cian); color: #04120c; }
.btn-test.btn-goal { background: rgba(250, 204, 21, 0.25); border-color: rgba(250, 204, 21, 0.6); }
.btn-test.btn-goal:hover { background: var(--gold); color: #04120c; }

/* Rodapé Limpo — Assinatura Centralizada */
.ft-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 0.4vmin;
  font-size: clamp(10px, 1.2vmin, 15px);
  color: var(--text-dim);
  flex: 0 0 auto;
}
.r3mark-credit {
  letter-spacing: 0.06em;
}
.r3mark-brand {
  color: var(--blue-light);
  font-weight: 800;
}
body.theme-light .r3mark-brand {
  color: #1d4ed8;
}

/* ========================================================
   KEYFRAMES & ANIMAÇÕES
   ======================================================== */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

@keyframes sheen {
  0%   { background-position: 130% 0; }
  100% { background-position: -20% 0; }
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes flash-green {
  0% { background: rgba(16, 185, 129, 0.35); }
  100% { background: rgba(6, 14, 30, 0.65); }
}

@keyframes shake-subtle {
  0%, 100% { transform: translateX(0); }
  2%, 6% { transform: translateX(-2px); }
  4%, 8% { transform: translateX(2px); }
  10% { transform: translateX(0); }
}

/* ========================================================
   RESPONSIVIDADE
   ======================================================== */
@media (max-width: 1100px) {
  .bottom-3-cols { grid-template-columns: 1fr; }
}