/* ═══════════════════════════════════════════════════════
   ZHAZ DESIGN SYSTEM — espelho fiel do zhaz-dashboard_3.html
═══════════════════════════════════════════════════════ */
:root {
  /* VARIAÇÃO A: SÓBRIA PREMIUM */
  --a-bg:           #F5F7FB;
  --a-surface:      #FFFFFF;
  --a-surface-2:    #F8F9FC;
  --a-border:       #E5E9F2;
  --a-border-strong:#D1D7E4;
  --a-primary:      #1739EB;
  --a-primary-soft: #EEF1FE;
  --a-primary-glow: rgba(23,57,235,0.12);
  --a-accent:       #81E61C;
  --a-accent-soft:  #F0FCE0;
  --a-success:      #81E61C;
  --a-success-text: #4A8A0F;
  --a-warning:      #FFDE59;
  --a-warning-text: #A07F00;
  --a-danger:       #FF5757;
  --a-danger-soft:  #FFECEC;
  --a-text-1:       #0D1321;
  --a-text-2:       #4A5367;
  --a-text-3:       #8A93A6;
  --a-text-4:       #B8BFCE;
  --a-shadow:       0 1px 2px rgba(13,19,33,0.04), 0 8px 24px rgba(13,19,33,0.06);
  --a-shadow-lg:    0 4px 12px rgba(13,19,33,0.06), 0 24px 48px rgba(23,57,235,0.08);

  /* ACTIVE = A */
  --bg: var(--a-bg); --surface: var(--a-surface); --surface-2: var(--a-surface-2);
  --border: var(--a-border); --border-strong: var(--a-border-strong);
  --primary: var(--a-primary); --primary-soft: var(--a-primary-soft); --primary-glow: var(--a-primary-glow);
  --accent: var(--a-accent); --accent-soft: var(--a-accent-soft);
  --success: var(--a-success); --success-text: var(--a-success-text);
  --warning: var(--a-warning); --warning-text: var(--a-warning-text);
  --danger: var(--a-danger); --danger-soft: var(--a-danger-soft);
  --text-1: var(--a-text-1); --text-2: var(--a-text-2); --text-3: var(--a-text-3); --text-4: var(--a-text-4);
  --shadow: var(--a-shadow); --shadow-lg: var(--a-shadow-lg);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; overflow-y: auto; }
body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ═══════════════ LOGO COMPONENT ═══════════════ */
.zhaz-icon {
  display: inline-block;
  flex-shrink: 0;
}

/* ═══════════════ SCREEN BASE (sem nav) ═══════════════ */
.screen { display: flex; flex-direction: column; width: 100%; }

/* ═══════════════════════════════════════
   SCREEN 1 — HOME
═══════════════════════════════════════ */
.screen-home {
  height: 100vh;
  max-height: 100vh;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  align-items: center;
  justify-content: center;
}
.home-bg-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(23,57,235,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,57,235,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent);
}
.home-bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: blobFloat 10s ease-in-out infinite;
}
.home-blob-1 { width: 500px; height: 500px; background: var(--primary); top: -100px; right: -80px; }
.home-blob-2 { width: 400px; height: 400px; background: var(--accent); bottom: -100px; left: -80px; animation-delay: -5s; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -20px) scale(1.1); }
}

.home-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: clamp(22px, 3.2vh, 52px);
  padding: clamp(14px, 2vh, 32px) clamp(24px, 4vw, 56px);
  text-align: center;
  max-width: min(1280px, 94vw);
  width: 100%;
  max-height: 100vh;
}
.home-brand {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.home-brand-row {
  display: flex; align-items: center; gap: clamp(10px, 1.4vw, 14px);
}
.home-brand-row .zhaz-icon {
  width: clamp(48px, 5.2vw, 78px);
  height: clamp(48px, 5.2vw, 78px);
}
.home-wordmark {
  font-size: clamp(30px, 4vh, 48px); font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--primary);
}
.home-brand-sub {
  font-size: clamp(12px, 1.45vh, 16px); font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--text-3);
}

.home-main-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(20px, 2.5vh, 32px);
  padding: clamp(42px, 6vh, 88px) clamp(36px, 6vw, 112px);
  width: 100%;
  min-height: clamp(400px, 56vh, 660px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.home-card-accent {
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.home-mascot-wrap {
  --mascot-size: clamp(82px, 10.8vh, 136px);
  margin-bottom: clamp(8px, 2vh, 24px);
  display: inline-block;
  position: relative;
  z-index: 4;
}
.home-mascot {
  font-size: var(--mascot-size); display: block;
  line-height: 1;
  animation: mascotBounce 3s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(23,57,235,0.2));
}
@keyframes mascotBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}

/* ════════════════════════════════════════════════════════
   FLYING ROCKET CONTAINER — Container do foguete voador
═══════════════════════════════════════════════════════ */

.flying-rocket-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 11;
  overflow: hidden;
}

.flying-rocket {
  position: fixed;
  font-size: clamp(60px, 8vh, 100px);
  z-index: 12;
  pointer-events: none;
  transform-origin: center center;
  will-change: left, top, transform;
  /* Movimento suave: ease-in-out para arrancar devagar, acelerar no meio, e desacelerar ao chegar */
  transition:
    left var(--rocket-duration, 5500ms) cubic-bezier(0.45, 0.05, 0.55, 0.95),
    top var(--rocket-duration, 5500ms) cubic-bezier(0.45, 0.05, 0.55, 0.95),
    transform var(--rocket-duration, 5500ms) cubic-bezier(0.45, 0.05, 0.55, 0.95),
    filter 0.4s ease;
  isolation: isolate;
}

/* Estrutura do foguete */
.flying-rocket .rocket-ship {
  display: block;
  position: relative;
  width: 0.6em;
  height: 1em;
}
.flying-rocket .rocket-trail {
  position: absolute;
  bottom: -0.5em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.14em;
  height: 0.5em;
  background: linear-gradient(180deg, rgba(255,222,89,0.7) 0%, rgba(129,230,28,0.3) 50%, rgba(23,57,235,0) 100%);
  filter: blur(5px);
  border-radius: 999px;
}
.flying-rocket .rocket-flame {
  position: absolute;
  bottom: -0.28em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.32em;
  height: 0.36em;
  background:
    radial-gradient(circle at 50% 16%, #FFFFFF 0 15%, transparent 16%),
    radial-gradient(circle at 50% 32%, #FFDE59 0 31%, transparent 32%),
    linear-gradient(180deg, #FFDE59 0%, #FF8A00 46%, #FF5757 100%);
  filter: drop-shadow(0 0 14px rgba(255,138,0,0.85));
  border-radius: 12% 12% 52% 52%;
  animation: rocketFlamePulse 200ms ease-in-out infinite;
  z-index: 1;
}
.flying-rocket .rocket-booster {
  position: absolute;
  bottom: 0.06em;
  width: 0.16em;
  height: 0.32em;
  border-radius: 0 0 45% 45%;
  background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(185,198,222,0.92) 48%, rgba(82,96,132,0.86));
  border: 1px solid rgba(13,19,33,0.12);
  box-shadow: inset -2px 0 4px rgba(23,57,235,0.13);
  z-index: 0;
}
.flying-rocket .rocket-booster-left { left: 0.02em; transform: rotate(-6deg); }
.flying-rocket .rocket-booster-right { right: 0.02em; transform: scaleX(-1) rotate(-6deg); }
.flying-rocket .rocket-fin {
  position: absolute;
  bottom: 0;
  width: 0.22em;
  height: 0.28em;
  background: linear-gradient(180deg, #81E61C 0%, #4A8A0F 100%);
  border-radius: 55% 12% 40% 24%;
  z-index: 0;
  box-shadow: inset -2px -3px 4px rgba(13,19,33,0.14);
}
.flying-rocket .rocket-fin-left { left: -0.06em; transform: rotate(-18deg); }
.flying-rocket .rocket-fin-right { right: -0.06em; transform: scaleX(-1) rotate(-18deg); }
.flying-rocket .rocket-body {
  position: absolute;
  inset: 0;
  border-radius: 52% 52% 34% 34% / 64% 64% 26% 26%;
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, #F6F8FF 42%, #C9D3EA 100%);
  border: 0.02em solid rgba(13,19,33,0.14);
  box-shadow:
    inset -0.06em 0 0.12em rgba(23,57,235,0.12),
    inset 0.05em 0 0.08em rgba(255,255,255,0.85);
  overflow: hidden;
}
.flying-rocket .rocket-body::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  width: 0.42em;
  height: 0.22em;
  border-radius: 80% 80% 18% 18%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--primary) 0%, #2A4DEC 76%, rgba(42,77,236,0) 100%);
}
.flying-rocket .rocket-window {
  position: absolute;
  left: 50%;
  top: 0.32em;
  width: 0.22em;
  height: 0.22em;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 36% 30%, #FFFFFF 0 12%, transparent 13%),
    linear-gradient(135deg, #B8F3FF 0%, #56B8FF 52%, #1739EB 100%);
  border: 0.02em solid rgba(13,19,33,0.16);
  box-shadow: inset 0 0 0.06em rgba(255,255,255,0.8);
  z-index: 2;
}
.flying-rocket .rocket-window::after {
  content: '';
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
}
.flying-rocket .rocket-stripe {
  position: absolute;
  left: 50%;
  bottom: 0.18em;
  width: 0.34em;
  height: 0.09em;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #81E61C 0%, #C7FF5B 50%, #81E61C 100%);
  box-shadow: 0 0 8px rgba(129,230,28,0.38);
  z-index: 2;
}

/* Destino e caminho do foguete */
.flying-rocket-destination,
.flying-rocket-flight-path {
  position: fixed;
  pointer-events: none;
  z-index: 11;
  opacity: 0;
  top: 0;
  left: 0;
}
.flying-rocket-destination {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(129,230,28,0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: beaconPulse 1.6s ease-in-out infinite;
}
.flying-rocket-flight-path {
  height: 3px;
  background: linear-gradient(90deg, rgba(129,230,28,0) 0%, rgba(129,230,28,0.5) 50%, rgba(129,230,28,0.9) 80%, rgba(255,255,255,0) 100%);
  border-radius: 2px;
  transform-origin: 0 50%;
}
.flying-rocket-container.is-flying .flying-rocket-destination,
.flying-rocket-container.is-flying .flying-rocket-flight-path {
  opacity: 1;
}

@keyframes beaconPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.3; }
}

/* ════════════════════════════════════════════════════════
   MASCOT ROCKET VARIATIONS — Variações do mascote-foguete
═══════════════════════════════════════════════════════ */

/* CELEBRAÇÃO - Verde neon vibrante */
.flying-rocket.rocket-celebration .rocket-body {
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, #F6F8FF 42%, #C9D3EA 100%);
  border: 0.025em solid rgba(13,19,33,0.12);
}
.flying-rocket.rocket-celebration .rocket-fin,
.flying-rocket.rocket-celebration .rocket-stripe {
  background: linear-gradient(180deg, #81E61C 0%, #4A8A0F 100%);
  box-shadow: 0 0 12px rgba(129,230,28,0.5);
}
.flying-rocket.rocket-celebration .rocket-flame {
  background: radial-gradient(circle at 50% 16%, #FFFFFF 0 15%, #B5F367 16% 45%, #81E61C 46% 70%, #4A8A0F 100%);
  filter: drop-shadow(0 0 20px rgba(129,230,28,0.9));
  height: 0.5em;
}
.flying-rocket.rocket-celebration .rocket-trail {
  background: linear-gradient(180deg, rgba(181,243,103,0.7) 0%, rgba(129,230,28,0.3) 50%, rgba(23,57,235,0) 100%);
}
.flying-rocket.rocket-celebration .rocket-destination {
  border-color: rgba(129,230,28,0.9);
  box-shadow: 0 0 0 8px rgba(129,230,28,0.1), 0 0 40px rgba(129,230,28,0.5);
}
.flying-rocket.rocket-celebration .rocket-flight-path {
  background: linear-gradient(90deg, rgba(129,230,28,0) 0%, rgba(129,230,28,0.4) 20%, rgba(129,230,28,0.9) 70%, rgba(255,255,255,0) 100%);
}

/* SUCESSO - Azul vibrante (diferente do verde celebration) */
.flying-rocket.rocket-success .rocket-body {
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, #DCE8FF 42%, #7FA3FF 100%);
  border: 0.025em solid rgba(23,57,235,0.4);
}
.flying-rocket.rocket-success .rocket-fin,
.flying-rocket.rocket-success .rocket-stripe {
  background: linear-gradient(180deg, #1739EB 0%, #2A4DEC 50%, #4A6FFF 100%);
  box-shadow: 0 0 12px rgba(23,57,235,0.6);
}
.flying-rocket.rocket-success .rocket-flame {
  background: radial-gradient(circle at 50% 16%, #FFFFFF 0 15%, #B5D9FF 16% 45%, #56B8FF 46% 70%, #1739EB 100%);
  filter: drop-shadow(0 0 18px rgba(23,57,235,0.85));
  height: 0.48em;
}
.flying-rocket.rocket-success .rocket-trail {
  background: linear-gradient(180deg, rgba(86,184,255,0.7) 0%, rgba(23,57,235,0.3) 50%, rgba(23,57,235,0) 100%);
}
.flying-rocket.rocket-success .rocket-destination {
  border-color: rgba(23,57,235,0.9);
  box-shadow: 0 0 0 8px rgba(23,57,235,0.15), 0 0 40px rgba(23,57,235,0.6);
}
.flying-rocket.rocket-success .rocket-flight-path {
  background: linear-gradient(90deg, rgba(23,57,235,0) 0%, rgba(23,57,235,0.4) 20%, rgba(23,57,235,0.9) 70%, rgba(255,255,255,0) 100%);
}

/* URGÊNCIA - Vermelho laranja intenso */
.flying-rocket.rocket-urgency .rocket-body {
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, #FFF0F0 42%, #E8C5C5 100%);
  border: 0.025em solid rgba(255,87,87,0.3);
}
.flying-rocket.rocket-urgency .rocket-fin,
.flying-rocket.rocket-urgency .rocket-stripe {
  background: linear-gradient(180deg, #FF5757 0%, #C43030 100%);
  box-shadow: 0 0 16px rgba(255,87,87,0.6);
}
.flying-rocket.rocket-urgency .rocket-flame {
  background: radial-gradient(circle at 50% 16%, #FFFFFF 0 12%, #FFDE59 13% 35%, #FF8C00 36% 60%, #FF4500 61% 80%, #FF5757 100%);
  filter: drop-shadow(0 0 28px rgba(255,69,0,0.95));
  height: 0.58em;
  animation: rocketFlamePulse100ms ease-in-out infinite;
}
.flying-rocket.rocket-urgency .rocket-trail {
  background: linear-gradient(180deg, rgba(255,69,0,0.8) 0%, rgba(255,87,87,0.4) 50%, rgba(23,57,235,0) 100%);
  filter: blur(12px);
  width: 0.4em;
}
.flying-rocket.rocket-urgency .rocket-destination {
  border-color: rgba(255,87,87,0.9);
  box-shadow: 0 0 0 8px rgba(255,87,87,0.1), 0 0 40px rgba(255,87,87,0.5);
}
.flying-rocket.rocket-urgency .rocket-flight-path {
  background: linear-gradient(90deg, rgba(255,87,87,0) 0%, rgba(255,87,87,0.4) 20%, rgba(255,69,0,0.9) 70%, rgba(255,255,255,0) 100%);
}
.flying-rocket.rocket-urgency {
  --rocket-duration: 3200ms;
}

/* ALERTA - Amarelo mostarda vibrante (diferente do vermelho urgency) */
.flying-rocket.rocket-alert .rocket-body {
  background: linear-gradient(90deg, rgba(255,255,255,0.96) 0%, #FFF4B0 42%, #E8C547 100%);
  border: 0.025em solid rgba(199,148,0,0.5);
}
.flying-rocket.rocket-alert .rocket-fin,
.flying-rocket.rocket-alert .rocket-stripe {
  background: linear-gradient(180deg, #FFD700 0%, #E8B400 50%, #C79400 100%);
  box-shadow: 0 0 12px rgba(199,148,0,0.6);
}
.flying-rocket.rocket-alert .rocket-flame {
  background: radial-gradient(circle at 50% 16%, #FFFFFF 0 15%, #FFF4B0 16% 45%, #FFD700 46% 70%, #C79400 100%);
  filter: drop-shadow(0 0 18px rgba(199,148,0,0.85));
  height: 0.46em;
}
.flying-rocket.rocket-alert .rocket-trail {
  background: linear-gradient(180deg, rgba(255,215,0,0.7) 0%, rgba(199,148,0,0.3) 50%, rgba(199,148,0,0) 100%);
}
.flying-rocket.rocket-alert .rocket-destination {
  border-color: rgba(199,148,0,0.9);
  box-shadow: 0 0 0 8px rgba(199,148,0,0.15), 0 0 40px rgba(199,148,0,0.5);
}
.flying-rocket.rocket-alert .rocket-flight-path {
  background: linear-gradient(90deg, rgba(199,148,0,0) 0%, rgba(199,148,0,0.4) 20%, rgba(255,215,0,0.9) 70%, rgba(255,255,255,0) 100%);
}
.flying-rocket.rocket-alert {
  --rocket-duration: 4200ms;
}

/* Velocidades padrão */
.flying-rocket.rocket-celebration { --rocket-duration: 4500ms; }
.flying-rocket.rocket-success { --rocket-duration: 4800ms; }

@keyframes rocketFlamePulse {
  0%, 100% { transform: translateX(-50%) scaleY(1); }
  50% { transform: translateX(-50%) scaleY(1.15); }
}

.home-pct {
  font-size: clamp(96px, 15vh, 184px); font-weight: 900;
  line-height: 1;
  letter-spacing: -6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: clamp(8px, 1.2vh, 12px);
}
.home-label {
  font-size: clamp(18px, 2.3vh, 30px); color: var(--text-3); font-weight: 800;
  letter-spacing: clamp(2px, 0.25vw, 4px); text-transform: uppercase;
  margin-bottom: clamp(20px, 3.2vh, 42px);
}
.home-progress-wrap {
  width: 100%;
  margin-bottom: clamp(10px, 1.8vh, 28px);
  padding: clamp(12px, 1.8vh, 22px) 0;
}
.home-progress-track {
  height: clamp(26px, 3.2vh, 42px);
  background: linear-gradient(180deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 70%, var(--bg)) 100%);
  border: 1px solid var(--border);
  border-radius: 100px;
  position: relative;
  box-shadow:
    inset 0 2px 4px rgba(13,19,33,0.10),
    inset 0 -1px 1px rgba(255,255,255,0.45);
}
.home-progress-fill {
  height: 100%;
  border-radius: 100px;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.22) 0px,
      rgba(255,255,255,0.22) 10px,
      transparent 10px,
      transparent 20px
    ),
    linear-gradient(90deg, var(--primary) 0%, #2A4DEC 55%, var(--accent) 100%);
  background-size: 28px 28px, 100% 100%;
  background-repeat: repeat, no-repeat;
  animation: progressStripes 1.6s linear infinite;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 22px rgba(23,57,235,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.20),
    inset 0 -2px 4px rgba(0,0,0,0.10);
}
@keyframes progressStripes {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 28px 0, 0 0; }
}
.home-progress-fill::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.65) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: progressShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
  filter: blur(0.5px);
}
@keyframes progressShimmer {
  0%        { transform: translateX(-100%); }
  60%, 100% { transform: translateX(350%); }
}
.home-progress-track::after {
  content: '';
  position: absolute;
  top: 50%;
  left: var(--bar-pct, 0%);
  width: clamp(42px, 4.8vh, 58px);
  height: clamp(42px, 4.8vh, 58px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFFFFF 0%, var(--accent) 55%, #6BC714 100%);
  border: 3px solid #fff;
  box-shadow:
    0 0 0 2px var(--accent),
    0 0 18px rgba(129,230,28,0.85),
    0 6px 18px rgba(129,230,28,0.55);
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  transition: left 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  animation: progressDot 1.7s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}
@keyframes progressDot {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      0 0 0 2px var(--accent),
      0 0 18px rgba(129,230,28,0.85),
      0 6px 18px rgba(129,230,28,0.55);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow:
      0 0 0 5px rgba(129,230,28,0.35),
      0 0 30px rgba(129,230,28,1),
      0 6px 22px rgba(129,230,28,0.65);
  }
}
.home-progress-labels {
  display: flex; justify-content: space-between;
  align-items: baseline;
  gap: clamp(12px, 2vw, 32px);
  margin-top: clamp(18px, 2.2vh, 28px);
  font-size: clamp(18px, 2vh, 26px); color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.home-progress-meta {
  color: var(--primary);
  font-size: clamp(22px, 2.8vh, 36px);
  font-weight: 900;
  letter-spacing: -0.4px;
}
.home-progress-edge {
  min-width: 3.5ch;
}

.goal-celebration-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
}
.goal-confetti {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--size);
  height: calc(var(--size) * 1.45);
  border-radius: 3px;
  background: var(--color);
  opacity: 0;
  transform: translate3d(0, -24px, 0) rotate(0deg);
  animation: goalConfettiFall var(--duration) cubic-bezier(0.18, 0.7, 0.25, 1) var(--delay) forwards;
  box-shadow: 0 2px 8px rgba(13,19,33,0.16);
}
.goal-confetti:nth-child(3n) { border-radius: 50%; }
.goal-confetti:nth-child(4n) { width: calc(var(--size) * 1.8); height: calc(var(--size) * 0.55); }

@keyframes goalConfettiFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -24px, 0) rotate(0deg);
  }
  10% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), 110vh, 0) rotate(var(--spin));
  }
}

.goal-burst {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--accent);
  box-shadow:
    0 -48px 0 #81E61C,
    34px -34px 0 #FFDE59,
    48px 0 0 #1739EB,
    34px 34px 0 #FFFFFF,
    0 48px 0 #81E61C,
    -34px 34px 0 #FFDE59,
    -48px 0 0 #1739EB,
    -34px -34px 0 #FFFFFF;
  animation: goalBurst 900ms ease-out forwards;
}

@keyframes goalBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  20% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.6);
  }
}

.home-main-card.is-celebrating {
  animation: goalCardCelebrate 1.05s ease-in-out 3;
}

@keyframes goalCardCelebrate {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.018) rotate(-0.35deg); }
  70% { transform: scale(1.012) rotate(0.35deg); }
}

/* ═══════════════ CARROSSEL DE PÍLULAS ═══════════════ */
.home-pill-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pill-carousel {
  width: 100%;
  max-width: min(1180px, 94vw);
  min-height: clamp(150px, 16vh, 210px);
  padding: clamp(10px, 1.4vh, 18px) 6px;
  position: relative;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pill-carousel-track {
  position: relative;
  width: 100%; min-height: clamp(126px, 14vh, 184px);
  overflow: visible;
}
.pill-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.16,1,0.3,1);
  pointer-events: none;
}
.pill-slide.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.pill {
  display: inline-flex; align-items: center; gap: clamp(22px, 2.2vw, 34px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: clamp(28px, 3.2vh, 42px) clamp(52px, 5vw, 76px) clamp(28px, 3.2vh, 42px) clamp(34px, 3.4vw, 52px);
  font-size: clamp(26px, 2.8vh, 36px); font-weight: 600; color: var(--text-1);
  box-shadow: 0 4px 12px rgba(13,19,33,0.04), 0 20px 40px rgba(23,57,235,0.10);
  white-space: normal;
  max-width: 100%;
  position: relative;
  letter-spacing: -0.2px;
}

.pill.pill-status {
  background: linear-gradient(135deg, var(--surface) 0%, #F8FEEE 100%);
  border: 2px solid var(--accent);
}
.pill.pill-status.status-warning {
  background: linear-gradient(135deg, var(--surface) 0%, #FFFBE5 100%);
  border-color: var(--warning);
}
.pill.pill-status.status-danger {
  background: linear-gradient(135deg, var(--surface) 0%, #FFECEC 100%);
  border-color: var(--danger);
}

.pill.pill-countdown {
  background: linear-gradient(135deg, var(--primary) 0%, #0F2BC4 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(23,57,235,0.15), 0 20px 40px rgba(23,57,235,0.25);
}
.pill.pill-countdown::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 100px;
  background: radial-gradient(circle at 15% 50%, rgba(129,230,28,0.25), transparent 55%);
  pointer-events: none;
}

.pill-icon-wrap {
  width: clamp(68px, 7vh, 92px); height: clamp(68px, 7vh, 92px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(34px, 3.6vh, 46px);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.pill.pill-status .pill-icon-wrap {
  background: var(--accent-soft);
  color: var(--success-text);
}
.pill.pill-status.status-warning .pill-icon-wrap {
  background: rgba(255,222,89,0.3);
  color: var(--warning-text);
}
.pill.pill-status.status-danger .pill-icon-wrap {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill.pill-countdown .pill-icon-wrap {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(129,230,28,0.3);
}

.pill-content {
  display: flex; flex-direction: column;
  gap: clamp(5px, 0.8vh, 10px);
  min-width: 0;
  position: relative;
  z-index: 1;
}
.pill-label {
  font-size: clamp(15px, 1.6vh, 20px);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0.55;
}
.pill.pill-countdown .pill-label { color: rgba(255,255,255,0.7); opacity: 1; }

.pill-text {
  font-size: clamp(28px, 3vh, 40px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.3px;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.pill.pill-countdown .pill-text { color: #fff; }

.pill-days-number {
  font-weight: 900;
  font-size: clamp(46px, 5vh, 64px);
  color: var(--accent);
  letter-spacing: -1px;
  line-height: 1;
  margin: 0 2px;
  text-shadow: 0 0 20px rgba(129,230,28,0.4);
}

.pill-status-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(129,230,28,0.20);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
  position: absolute;
  top: -3px; right: -3px;
  border: 2px solid var(--surface);
  z-index: 2;
}
.pill.status-warning .pill-status-dot {
  background: var(--warning);
  box-shadow: 0 0 0 3px rgba(255,222,89,0.28);
  animation-name: pulseWarning;
}
.pill.status-danger .pill-status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255,87,87,0.22);
  animation-name: pulseDanger;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(129,230,28,0.20); }
  50% { box-shadow: 0 0 0 7px rgba(129,230,28,0.04); }
}
@keyframes pulseWarning {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,222,89,0.28); }
  50% { box-shadow: 0 0 0 7px rgba(255,222,89,0.06); }
}
@keyframes pulseDanger {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255,87,87,0.22); }
  50% { box-shadow: 0 0 0 7px rgba(255,87,87,0.05); }
}

.pill-indicators {
  display: flex; gap: 8px;
  justify-content: center;
  margin-top: 20px;
  align-items: center;
}
.pill-indicator {
  width: 32px; height: 5px;
  background: var(--border-strong);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
  position: relative;
  overflow: hidden;
  border: none;
  padding: 0;
}
.pill-indicator:hover { background: var(--text-3); }
.pill-indicator.active {
  width: 64px;
  background: var(--border);
}
.pill-indicator.active::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px;
  animation: indicatorFill 9s linear;
  transform-origin: left;
}
@keyframes indicatorFill {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

/* ═══════════════ SHARED HEADER ═══════════════ */
.tv-header {
  display: flex; align-items: center;
  padding: 0 32px;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tv-brand {
  display: flex; align-items: center; gap: 10px;
}
.tv-wordmark {
  font-size: 22px; font-weight: 900;
  letter-spacing: -1px;
  color: var(--primary);
}
.tv-logo-divider { width: 1px; height: 28px; background: var(--border-strong); margin: 0 20px; }

.tv-date-block { display: flex; flex-direction: column; gap: 1px; }
.tv-date-day {
  font-size: 16px; font-weight: 700;
  line-height: 1; color: var(--text-1);
  letter-spacing: -0.2px;
}
.tv-date-sub {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1.5px;
  font-weight: 600; margin-top: 3px;
}
.tv-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 13px; font-weight: 700;
  margin-left: 16px;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.tv-chip .chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(129,230,28,0.3);
}
.tv-quarter {
  margin-left: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #0F2BC4 100%);
  border: none;
  padding: 7px 14px; border-radius: 10px;
  box-shadow:
    0 2px 8px var(--primary-glow),
    inset 0 -2px 4px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; gap: 8px;
  position: relative;
  line-height: 1;
}
.tv-quarter::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(129,230,28,0.7);
}
.tv-spacer { flex: 1; }
.tv-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 600;
  color: var(--text-1);
  letter-spacing: -1px;
}
.tv-clock .colon { animation: blink 1s step-end infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0.3; } }

/* ═══════════════ SHARED CARDS ═══════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s ease;
  display: flex; flex-direction: column;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.card-icon {
  width: 24px; height: 24px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; flex-shrink: 0;
}
.delta {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
.delta.positive { background: var(--accent-soft); color: var(--success-text); }
.delta.negative { background: var(--danger-soft); color: var(--danger); }
.delta.neutral { background: var(--surface-2); color: var(--text-2); }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 700;
}
.status-badge.on-track { background: var(--accent-soft); color: var(--success-text); }
.status-badge.at-risk { background: rgba(255,222,89,0.25); color: var(--warning-text); }
.status-badge.behind { background: var(--danger-soft); color: var(--danger); }
.status-dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ═══════════════ SCREEN 2 — TV DASHBOARD ═══════════════ */
.screen-tv { height: 100vh; overflow: hidden; }
.tv-body {
  flex: 1;
  display: grid;
  grid-template-rows: minmax(0,1.1fr) minmax(0,1.25fr);
  gap: clamp(14px, 1.6vh, 22px);
  padding: clamp(16px, 1.8vh, 26px) clamp(24px, 2.2vw, 40px);
  overflow: hidden;
  min-height: 0;
}
.hero-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1fr;
  gap: clamp(14px, 1.5vw, 24px);
  min-height: 0;
}
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(24px, 2.8vh, 38px) clamp(30px, 3vw, 48px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 0;
  transition:
    transform 0.35s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}
.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.hero-meta:hover { box-shadow: 0 18px 40px rgba(23,57,235,0.35); }
.hero-realizado:hover { border-color: var(--success-text); box-shadow: 0 18px 40px rgba(129,230,28,0.30); }
.hero-faltante:hover { border-color: var(--primary); }
.hero-card-label {
  font-size: clamp(14px, 1.45vh, 20px); font-weight: 800;
  letter-spacing: clamp(1.5px, 0.18vw, 2.4px); text-transform: uppercase;
  color: var(--text-3);
  display: flex; align-items: center; gap: clamp(10px, 1vw, 16px);
}
.hero-card-icon {
  width: clamp(38px, 4vh, 52px); height: clamp(38px, 4vh, 52px);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 2vh, 26px);
}
.hero-card-value {
  font-weight: 900;
  line-height: 1;
  letter-spacing: clamp(-2.4px, -0.12vw, -1px);
  font-size: clamp(46px, 4.4vw, 92px);
  white-space: nowrap;
  width: 100%;
  max-width: 100%;
  text-align: left;
}
.hero-card-value-fit {
  font-size: clamp(40px, 3.55vw, 78px);
}
.hero-card-currency {
  font-size: 0.55em;
  font-weight: 700;
  vertical-align: baseline;
  margin-right: 8px;
  opacity: 0.85;
  letter-spacing: -0.5px;
}
.hero-card-sub {
  font-size: clamp(15px, 1.5vh, 21px); font-weight: 700;
  color: var(--text-2);
  display: flex; align-items: center; gap: clamp(10px, 1vw, 16px);
  flex-wrap: wrap;
  justify-content: flex-start;
  text-align: left;
}
.hero-meta {
  background: linear-gradient(135deg, var(--primary) 0%, #0F2BC4 100%);
  color: #fff;
  border-color: transparent;
}
.hero-meta::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(129,230,28,0.2), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.08), transparent 50%);
  pointer-events: none;
}
.hero-meta .hero-card-label { color: rgba(255,255,255,0.7); }
.hero-meta .hero-card-icon { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); }
.hero-meta .hero-card-value { color: #fff; }
.hero-meta .hero-card-sub { color: rgba(255,255,255,0.85); }

.hero-realizado {
  background: linear-gradient(135deg, #F8FEEE 0%, #FFFFFF 100%);
  border: 2px solid var(--accent);
  position: relative;
}
.hero-realizado::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.hero-realizado .hero-card-icon { background: var(--accent); color: #0D1321; }
.hero-realizado .hero-card-value {
  background: linear-gradient(135deg, var(--primary), var(--success-text));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.hero-realizado .hero-card-value .hero-card-currency {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--primary);
  color: var(--primary);
}
.hero-progress-percent {
  font-size: clamp(24px, 2.4vh, 34px);
  font-weight: 900;
  color: var(--success-text);
  letter-spacing: -0.5px;
}
.hero-realizado-progress { margin-top: clamp(14px, 1.8vh, 24px); }
.hero-realizado-progress-track {
  height: clamp(16px, 1.9vh, 26px);
  background: var(--accent-soft);
  border-radius: 100px;
  overflow: hidden;
}
.hero-realizado-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success-text));
  border-radius: 100px;
  transition: width 1.5s cubic-bezier(0.16,1,0.3,1);
}
.hero-faltante { background: var(--surface); border-color: var(--border-strong); }
.hero-faltante .hero-card-icon { background: var(--danger-soft); color: var(--danger); }
.hero-faltante .hero-card-value { color: var(--text-1); }
.hero-faltante-days {
  display: flex; align-items: center; gap: clamp(10px, 1vw, 16px);
  justify-content: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(14px, 1.8vh, 24px) clamp(16px, 1.6vw, 26px);
  margin-top: clamp(12px, 1.6vh, 22px);
  width: 100%;
  text-align: left;
}
.hero-faltante-days > div {
  min-width: 0;
  text-align: left;
}
.hero-faltante-days-side {
  margin-left: 0;
  text-align: left;
}
.hero-faltante-days-val {
  font-size: clamp(24px, 2.5vh, 40px); font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.hero-faltante-days-label {
  font-size: clamp(12px, 1.3vh, 17px); font-weight: 700;
  color: var(--text-3); text-transform: uppercase;
  letter-spacing: 1px; line-height: 1.3;
}

.secondary-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(14px, 1.5vw, 24px);
  min-height: 0;
}
.chart-card {
  display: flex; flex-direction: column; min-height: 0;
  padding: 22px 26px 18px;
}
.chart-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
}
.chart-legend { display: flex; gap: 16px; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.chart-legend-item { display: flex; align-items: center; gap: 7px; color: var(--text-2); }
.chart-legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-above { background: #81E61C; }
.legend-below { background: #1739EB; }
.chart-legend-ideal-line {
  display: inline-block; width: 22px; height: 0;
  border-top: 2px dashed rgba(23,57,235,0.5);
  border-radius: 0; flex-shrink: 0;
}
/* Legenda da linha diagonal ideal */
.chart-legend-ideal-line-demo {
  display: inline-block; width: 22px; height: 3px;
  background: #FFDE59;
  border-radius: 2px; flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255,222,89,0.6);
}

/* ── Bar chart ─────────────────────────────────────────────────────── */
.chart-bars-wrapper {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  gap: 6px;
  padding-top: 10px;
}

.chart-bars {
  flex: 1; min-height: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  position: relative;
}

/* SVG da linha diagonal ideal — overlay sobre as barras */
.chart-ideal-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 4;
}
.chart-ideal-svg .ideal-line {
  stroke: #FFDE59;
  stroke-width: 2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(255,222,89,0.7));
}

/* Coluna de cada dia útil */
.bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  position: relative;
}

.bar-fill {
  width: 82%;
  border-radius: 5px 5px 2px 2px;
  transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Barra de hoje — mantém glow; background vem do inline gradient */
.bar-col.today .bar-fill {
  box-shadow: 0 -6px 20px rgba(129,230,28,0.45), 0 0 0 1px rgba(129,230,28,0.25);
}
.bar-col.today::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 82%;
  height: 100%;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, rgba(129,230,28,0.12) 0%, transparent 60%);
  pointer-events: none;
  animation: barTodayPulse 2.8s ease-in-out infinite;
}
@keyframes barTodayPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Dias futuros */
.bar-col.future .bar-fill {
  height: 5px !important;
  width: 55%;
  background: rgba(200, 207, 225, 0.35);
  border-radius: 3px;
}

/* Badge de valor em cima da barra de hoje */
.bar-today-badge {
  position: absolute;
  bottom: 100%;
  margin-bottom: 7px;
  background: #0D1321;
  color: #81E61C;
  font-size: 10px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.3px;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.bar-today-badge::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #0D1321;
}

/* Labels do eixo X */
.chart-x-labels {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.bar-x-label {
  flex: 1;
  text-align: center;
  font-size: 9px; font-weight: 600;
  color: var(--text-4);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.bar-x-label.today { color: var(--primary); font-weight: 800; }
.bar-x-label.future { color: rgba(185, 193, 215, 0.5); }

.secondary-right {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 0;
}
.meta-diaria-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.2vw, 18px);
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(16px, 1.8vh, 26px) clamp(18px, 1.6vw, 28px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  transition:
    transform 0.3s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.mini-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.mini-card-label {
  font-size: clamp(12px, 1.25vh, 16px); font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3);
}
.mini-card-value {
  font-size: clamp(32px, 3.3vh, 52px); font-weight: 900;
  line-height: 1;
  color: var(--text-1);
  letter-spacing: -0.5px;
  margin-top: clamp(8px, 1vh, 14px);
}
.mini-card-sub { font-size: clamp(12px, 1.25vh, 16px); color: var(--text-3); font-weight: 600; }

.dias-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: clamp(16px, 1.8vh, 26px) clamp(18px, 1.6vw, 28px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  align-items: stretch;
  text-align: left;
  justify-content: space-between;
  min-height: 0;
  transition:
    transform 0.3s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.dias-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.dias-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.dias-label {
  font-size: clamp(12px, 1.25vh, 16px); font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3);
}
.dias-percent {
  color: var(--text-3);
  font-size: clamp(13px, 1.35vh, 18px);
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}
.dias-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1vw, 14px);
  margin-bottom: clamp(12px, 1.6vh, 22px);
}
.dias-item {
  background: var(--surface-2);
  border-radius: 12px;
  padding: clamp(14px, 1.8vh, 22px) clamp(10px, 1vw, 16px);
  text-align: left;
}
.dias-item-val {
  font-size: clamp(32px, 3.4vh, 54px); font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
}
.dias-item-label {
  font-size: clamp(10px, 1.15vh, 14px);
  color: var(--text-3);
  margin-top: clamp(6px, 0.8vh, 10px);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}
.dias-bar-track {
  height: clamp(10px, 1.25vh, 16px); background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px; overflow: hidden;
}
.dias-bar-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}
.dias-bar-meta {
  display: flex; justify-content: space-between;
  font-size: clamp(12px, 1.2vh, 15px);
  color: var(--text-3);
  margin-top: clamp(8px, 1vh, 12px);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.tv-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 8px;
  box-shadow: 0 -4px 16px rgba(13,19,33,0.04);
}
.footer-block {
  padding: 14px 24px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: default;
}
.footer-block::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.footer-block:hover {
  background: var(--surface-2);
}
.footer-block:hover::before {
  transform: scaleX(1);
}
.footer-block-label {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3); font-weight: 700;
}
.footer-block-val {
  font-size: 22px; font-weight: 800;
  color: var(--text-1); letter-spacing: -0.5px;
  display: flex; align-items: center; gap: 10px;
  line-height: 1;
}
.footer-block-sub { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ═══════════════ SCREEN 3 — SELLERS ═══════════════ */
.screen-sellers {
  height: 100vh;
  overflow: hidden;
  --sellers-page-x: clamp(28px, 3vw, 72px);
  --sellers-page-y: clamp(20px, 2.4vh, 36px);
  --sellers-grid: clamp(68px, 4.4vw, 92px) minmax(180px, 1.6fr) clamp(150px, 10vw, 220px) minmax(280px, 2.25fr) clamp(72px, 5vw, 112px);
  --sellers-gap: clamp(14px, 1.35vw, 28px);
}
.screen-sellers .tv-header {
  height: clamp(72px, 7.4vh, 96px);
  padding: 0 var(--sellers-page-x);
}
.screen-sellers .tv-brand .zhaz-icon {
  width: clamp(42px, 3.5vw, 58px);
  height: clamp(42px, 3.5vw, 58px);
}
.screen-sellers .tv-wordmark { font-size: clamp(24px, 2vw, 34px); }
.screen-sellers .tv-logo-divider {
  height: clamp(32px, 3.4vh, 44px);
  margin: 0 clamp(18px, 1.7vw, 32px);
}
.screen-sellers .tv-date-day { font-size: clamp(18px, 1.35vw, 24px); }
.screen-sellers .tv-date-sub { font-size: clamp(11px, 0.85vw, 14px); }
.screen-sellers .tv-chip {
  padding: clamp(8px, 0.75vh, 11px) clamp(16px, 1.3vw, 24px);
  font-size: clamp(13px, 1vw, 17px);
  margin-left: clamp(16px, 1.4vw, 26px);
}
.screen-sellers .tv-quarter {
  font-size: clamp(14px, 1vw, 18px);
  padding: clamp(8px, 0.75vh, 11px) clamp(14px, 1.1vw, 20px);
}
.screen-sellers .tv-clock { font-size: clamp(28px, 2.2vw, 40px); }
.sellers-body {
  flex: 1;
  padding: var(--sellers-page-y) var(--sellers-page-x) clamp(24px, 3vh, 44px);
  display: flex; flex-direction: column;
  gap: clamp(14px, 1.7vh, 24px);
  overflow: hidden;
  min-height: 0;
}

/* ── Summary cards ── */
.sellers-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.3vw, 24px);
  flex-shrink: 0;
}
@keyframes summaryFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(14px, 1.2vw, 20px);
  padding: clamp(16px, 1.7vh, 26px) clamp(18px, 1.8vw, 32px);
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
  min-height: clamp(78px, 9vh, 118px);
  animation: summaryFadeUp 0.45s cubic-bezier(0.16,1,0.3,1) both;
}
.sellers-summary .summary-card:nth-child(1) { animation-delay: 0.05s; }
.sellers-summary .summary-card:nth-child(2) { animation-delay: 0.12s; }
.sellers-summary .summary-card:nth-child(3) { animation-delay: 0.19s; }
.sellers-summary .summary-card:nth-child(4) { animation-delay: 0.26s; }
.summary-icon {
  width: clamp(50px, 4vw, 72px); height: clamp(50px, 4vw, 72px);
  border-radius: clamp(12px, 1vw, 18px);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(22px, 1.75vw, 34px); flex-shrink: 0;
}
.summary-content { flex: 1; min-width: 0; }
.summary-label {
  font-size: clamp(10px, 0.82vw, 13px); color: var(--text-3);
  font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 3px;
}
.summary-value {
  font-size: clamp(24px, 2vw, 38px); font-weight: 800;
  line-height: 1; letter-spacing: -0.5px;
  color: var(--text-1);
}
.summary-value-top {
  font-size: clamp(18px, 1.25vw, 26px);
  letter-spacing: 0;
  line-height: 1.08;
  padding-top: 3px;
}
.summary-value-top span {
  color: var(--success-text);
  font-size: clamp(15px, 1vw, 20px);
  white-space: nowrap;
}

/* ── List wrap ── */
.sellers-list-wrap {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: clamp(18px, 1.5vw, 26px);
  padding: clamp(18px, 2vh, 30px) clamp(20px, 2vw, 36px);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  min-height: 0;
}
.sellers-list-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: clamp(12px, 1.3vh, 18px);
  padding-bottom: clamp(12px, 1.4vh, 20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sellers-list-title-left {
  font-size: clamp(18px, 1.35vw, 26px); font-weight: 700;
  color: var(--text-1);
  display: flex; align-items: center; gap: 10px;
}
.sellers-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(11px, 0.82vw, 14px); font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 9px;
  border-radius: 6px;
}
.sellers-list-header {
  display: grid;
  grid-template-columns: var(--sellers-grid);
  gap: var(--sellers-gap);
  padding: 0 clamp(14px, 1vw, 22px) clamp(8px, 0.9vh, 14px);
  align-items: center;
  flex-shrink: 0;
}
.sellers-col-label {
  font-size: clamp(10px, 0.78vw, 13px); letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3); font-weight: 700;
}
.sellers-list-scroll {
  flex: 1;
  display: flex; flex-direction: column;
  gap: clamp(6px, 0.7vh, 10px);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sellers-list-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ── Seller rows ── */
@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-22px); }
  to   { opacity: 1; transform: translateX(0); }
}
.seller-row {
  display: grid;
  grid-template-columns: var(--sellers-grid);
  gap: var(--sellers-gap);
  padding: clamp(10px, 1.15vh, 18px) clamp(14px, 1.1vw, 22px);
  align-items: center;
  border-radius: clamp(14px, 1vw, 18px);
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s cubic-bezier(0.16,1,0.3,1),
    background 0.25s ease;
  animation: rowSlideIn 0.45s cubic-bezier(0.16,1,0.3,1) both;
  flex-shrink: 0;
  position: relative;
}
/* Top-3 special glows */
.seller-row.seller-row-rank-1 {
  border-color: rgba(255,199,0,0.45);
  background: linear-gradient(90deg, rgba(255,199,0,0.07) 0%, var(--surface) 22%);
  box-shadow: 0 0 0 1px rgba(255,199,0,0.12), 0 4px 20px rgba(255,199,0,0.08);
}
.seller-row.seller-row-rank-2 {
  border-color: rgba(185,185,185,0.45);
  background: linear-gradient(90deg, rgba(185,185,185,0.06) 0%, var(--surface) 22%);
}
.seller-row.seller-row-rank-3 {
  border-color: rgba(205,127,50,0.4);
  background: linear-gradient(90deg, rgba(205,127,50,0.06) 0%, var(--surface) 22%);
}
.seller-row:hover {
  border-color: var(--primary);
  transform: translateX(3px);
  background: linear-gradient(90deg, var(--primary-soft) 0%, var(--surface) 18%);
  box-shadow:
    inset 4px 0 0 var(--primary),
    0 6px 16px rgba(23,57,235,0.18);
}

/* ── Avatar ── */
.seller-avatar {
  width: clamp(54px, 4vw, 78px); height: clamp(54px, 4vw, 78px); border-radius: 50%;
  border: clamp(2px, 0.2vw, 4px) solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 1.45vw, 28px); font-weight: 800;
  overflow: hidden; flex-shrink: 0;
  transition: border-color 0.3s ease;
}
.seller-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Rank-1 avatar: pulsing gold ring */
@keyframes avatarGoldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,199,0,0.55); }
  50%       { box-shadow: 0 0 0 5px rgba(255,199,0,0); }
}
.seller-row.seller-row-rank-1 .seller-avatar {
  border-color: #FFC700;
  animation: avatarGoldPulse 2.2s ease-in-out infinite;
}

.seller-name {
  font-size: clamp(17px, 1.3vw, 26px);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.15;
}
.seller-role {
  font-size: clamp(12px, 0.92vw, 16px);
  color: var(--text-3);
  font-weight: 500;
  margin-top: clamp(3px, 0.35vh, 6px);
}
.seller-pct {
  font-size: clamp(30px, 2.45vw, 48px); font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  line-height: 1;
}

/* ── Progress bar ── */
.seller-bar-wrap { width: 100%; }
.seller-bar-track {
  height: clamp(13px, 1.25vh, 18px); background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px; overflow: visible;
  position: relative;
}
/* linha de 100% */
.seller-bar-track::after {
  content: '';
  position: absolute;
  right: 0; top: -3px; bottom: -3px;
  width: 1px;
  background: var(--border);
  z-index: 2;
}
.seller-bar-fill {
  height: 100%; border-radius: 100px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
/* Shimmer sweep */
@keyframes barShimmer {
  0%       { left: -70%; }
  60%, 100% { left: 110%; }
}
.seller-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: -70%; width: 55%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.38), transparent);
  animation: barShimmer 2.6s ease-in-out infinite;
}
/* Brilho na ponta da barra */
.seller-bar-fill::before {
  content: '';
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  width: clamp(9px, 0.8vw, 14px); height: clamp(9px, 0.8vw, 14px);
  border-radius: 50%;
  background: inherit;
  filter: brightness(1.5) blur(3px);
  opacity: 0.8;
}
.seller-bar-meta {
  display: flex; justify-content: space-between;
  font-size: clamp(10px, 0.75vw, 13px); color: var(--text-3);
  margin-top: clamp(5px, 0.55vh, 8px); font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.seller-rank {
  font-size: clamp(22px, 1.75vw, 34px); font-weight: 800;
  text-align: center;
  color: var(--text-4);
}
.seller-rank.rank-1 { color: #FFC700; font-size: clamp(28px, 2.2vw, 42px); }
.seller-rank.rank-2 { color: #B8B8B8; font-size: clamp(26px, 2vw, 38px); }
.seller-rank.rank-3 { color: #CD7F32; font-size: clamp(26px, 2vw, 38px); }

/* ── Empty state ── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex: 1; gap: 14px; text-align: center;
  padding: 40px;
}
.empty-icon { font-size: 56px; opacity: 0.4; }
.empty-title { font-size: 20px; font-weight: 700; color: var(--text-2); }
.empty-desc { font-size: 14px; color: var(--text-3); max-width: 360px; line-height: 1.6; }

@media (min-width: 1600px) and (min-height: 850px) {
  .screen-sellers {
    --sellers-grid: clamp(82px, 4.8vw, 104px) minmax(260px, 1.7fr) clamp(190px, 10vw, 240px) minmax(420px, 2.4fr) clamp(92px, 5vw, 120px);
  }
  .seller-row {
    min-height: clamp(92px, 8.8vh, 118px);
  }
}

@media (max-height: 720px) {
  .home-content { gap: clamp(14px, 2vh, 26px); padding-top: 10px; padding-bottom: 10px; }
  .home-brand-row .zhaz-icon { width: clamp(38px, 5vh, 52px); height: clamp(38px, 5vh, 52px); }
  .home-wordmark { font-size: clamp(24px, 4vh, 34px); }
  .home-main-card {
    min-height: clamp(320px, 50vh, 420px);
    padding-top: clamp(28px, 4vh, 44px);
    padding-bottom: clamp(28px, 4vh, 44px);
  }
  .home-mascot-wrap { --mascot-size: clamp(62px, 8vh, 86px); }
  .home-pct { font-size: clamp(74px, 11vh, 118px); }
  .home-label { font-size: clamp(14px, 1.8vh, 18px); margin-bottom: clamp(12px, 2vh, 22px); }
  .home-progress-track { height: clamp(18px, 2.4vh, 26px); }
  .home-progress-track::after { width: clamp(30px, 4vh, 38px); height: clamp(30px, 4vh, 38px); }
  .home-progress-labels { margin-top: 12px; font-size: clamp(13px, 1.8vh, 16px); }
  .home-progress-meta { font-size: clamp(16px, 2.3vh, 22px); }
  .pill-carousel { min-height: clamp(104px, 15vh, 124px); }
  .pill-carousel-track { min-height: clamp(92px, 13vh, 110px); }
  .pill { padding: clamp(18px, 2.4vh, 24px) clamp(30px, 4vw, 44px); }
  .pill-icon-wrap { width: clamp(48px, 6vh, 58px); height: clamp(48px, 6vh, 58px); font-size: clamp(24px, 3.2vh, 30px); }
  .pill-label { font-size: clamp(11px, 1.5vh, 14px); }
  .pill-text { font-size: clamp(20px, 2.6vh, 26px); }
  .pill-days-number { font-size: clamp(32px, 4vh, 42px); }
  .tv-body { gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .hero-row,
  .secondary-row { gap: 10px; }
  .hero-card { padding: 18px 22px; }
  .hero-card-label { font-size: 11px; gap: 8px; }
  .hero-card-icon { width: 28px; height: 28px; font-size: 14px; }
  .hero-card-value { font-size: clamp(38px, 4vw, 64px); }
  .hero-card-value-fit { font-size: clamp(32px, 3.2vw, 56px); }
  .hero-card-sub { font-size: 12px; gap: 8px; }
  .hero-progress-percent { font-size: 18px; }
  .hero-realizado-progress { margin-top: 10px; }
  .hero-realizado-progress-track { height: 10px; }
  .hero-faltante-days { padding: 10px 12px; margin-top: 8px; }
  .hero-faltante-days-val { font-size: 20px; }
  .hero-faltante-days-label { font-size: 10px; }
  .mini-card,
  .dias-card { padding: 12px 14px; }
  .mini-card-label,
  .dias-label { font-size: 10px; }
  .mini-card-value { font-size: 24px; margin-top: 6px; }
  .mini-card-sub { font-size: 10px; }
  .dias-percent { font-size: 10px; }
  .dias-item { padding: 9px 8px; }
  .dias-item-val { font-size: 22px; }
  .dias-item-label { font-size: 9px; margin-top: 4px; }
  .dias-bar-track { height: 6px; }
  .dias-bar-meta { font-size: 10px; margin-top: 5px; }
  .screen-sellers {
    --sellers-page-x: clamp(20px, 2.1vw, 34px);
    --sellers-page-y: 12px;
    --sellers-grid: 60px minmax(160px, 1.7fr) 132px minmax(250px, 2.1fr) 62px;
    --sellers-gap: 12px;
  }
  .screen-sellers .tv-header { height: 60px; }
  .screen-sellers .tv-brand .zhaz-icon { width: 38px; height: 38px; }
  .screen-sellers .tv-wordmark { font-size: 22px; }
  .screen-sellers .tv-date-day { font-size: 15px; }
  .screen-sellers .tv-date-sub { font-size: 10px; }
  .screen-sellers .tv-chip { font-size: 12px; padding: 6px 12px; }
  .screen-sellers .tv-quarter { font-size: 12px; padding: 6px 10px; }
  .screen-sellers .tv-clock { font-size: 24px; }
  .sellers-body { gap: 10px; padding-bottom: 14px; }
  .sellers-summary { gap: 10px; }
  .summary-card { min-height: 68px; padding: 10px 14px; gap: 10px; }
  .summary-icon { width: 42px; height: 42px; font-size: 19px; border-radius: 10px; }
  .summary-label { font-size: 9px; }
  .summary-value { font-size: 21px; }
  .summary-value-top { font-size: 14px; }
  .summary-value-top span { font-size: 12px; }
  .sellers-list-wrap { padding: 12px 14px; }
  .sellers-list-title { margin-bottom: 8px; padding-bottom: 9px; }
  .sellers-list-title-left { font-size: 15px; }
  .sellers-list-header { padding-bottom: 5px; }
  .sellers-col-label { font-size: 9px; }
  .sellers-list-scroll { gap: 5px; }
  .seller-row { padding: 7px 10px; border-radius: 12px; }
  .seller-avatar { width: 48px; height: 48px; font-size: 17px; }
  .seller-name { font-size: 15px; }
  .seller-role { font-size: 10px; margin-top: 2px; }
  .seller-pct { font-size: 25px; }
  .seller-bar-track { height: 10px; }
  .seller-bar-meta { font-size: 9px; margin-top: 3px; }
  .seller-rank { font-size: 19px; }
  .seller-rank.rank-1 { font-size: 23px; }
  .seller-rank.rank-2,
  .seller-rank.rank-3 { font-size: 21px; }
}

/* ═══════════════ EXTRAS — fullscreen + carrossel iframe ═══════════════ */
@media (max-width: 980px) {
  .screen-sellers {
    min-height: 100vh;
    height: auto;
    overflow: auto;
    --sellers-page-x: clamp(14px, 4vw, 28px);
    --sellers-page-y: 14px;
    --sellers-grid: clamp(58px, 14vw, 76px) minmax(0, 1fr) clamp(90px, 18vw, 130px);
    --sellers-gap: 12px;
  }
  .screen-sellers .tv-header {
    height: auto;
    min-height: 66px;
    padding: 12px var(--sellers-page-x);
    flex-wrap: wrap;
    gap: 10px 12px;
  }
  .screen-sellers .tv-logo-divider,
  .screen-sellers .tv-quarter,
  .screen-sellers .tv-spacer {
    display: none;
  }
  .screen-sellers .tv-chip {
    order: 3;
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
  .screen-sellers .tv-clock { margin-left: auto; }
  .sellers-body { overflow: visible; }
  .sellers-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { min-height: 78px; padding: 14px; }
  .summary-value { font-size: clamp(22px, 5.6vw, 30px); }
  .summary-value-top { font-size: clamp(16px, 4.2vw, 22px); }
  .summary-value-top span { font-size: clamp(13px, 3.4vw, 18px); }
  .sellers-list-wrap { overflow: visible; }
  .sellers-list-header {
    grid-template-columns: var(--sellers-grid);
  }
  .sellers-list-header .sellers-col-label:nth-child(4),
  .sellers-list-header .sellers-col-label:nth-child(5),
  .seller-bar-wrap,
  .seller-rank {
    display: none;
  }
  .sellers-list-scroll {
    overflow: visible;
  }
  .seller-row {
    grid-template-columns: var(--sellers-grid);
    padding: 10px 12px;
  }
  .seller-avatar { width: clamp(52px, 13vw, 68px); height: clamp(52px, 13vw, 68px); }
  .seller-name { font-size: clamp(16px, 4vw, 22px); }
  .seller-role { font-size: clamp(11px, 3vw, 14px); }
  .seller-pct { font-size: clamp(24px, 6.6vw, 36px); }
}

@media (max-width: 560px) {
  .sellers-summary { grid-template-columns: 1fr; }
  .sellers-list-title-left { font-size: 17px; }
  .sellers-list-header { display: none; }
  .seller-row {
    grid-template-columns: clamp(56px, 16vw, 70px) minmax(0, 1fr);
    gap: 12px;
  }
  .seller-pct {
    grid-column: 1 / -1;
    text-align: left;
    font-size: 28px;
  }
}

.tv-fullscreen-btn {
  position: fixed;
  bottom: 14px; right: 14px;
  width: 118px; height: 34px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
  box-shadow: none;
  display: flex; align-items: center; justify-content: center;
  gap: 7px;
  z-index: 50;
  opacity: 1;
  overflow: hidden;
  padding: 0 13px;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.tv-fullscreen-btn::before {
  content: '';
  position: absolute;
  right: 11px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(23,57,235,0.10), 0 4px 12px rgba(23,57,235,0.18);
  opacity: 0.45;
  transform: translateY(-50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.tv-fullscreen-btn:hover,
.tv-fullscreen-btn:focus-visible {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(23,57,235,0.28);
  outline: none;
}
.tv-fullscreen-btn:hover::before,
.tv-fullscreen-btn:focus-visible::before {
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
}
.tv-fullscreen-icon,
.tv-fullscreen-label {
  opacity: 0;
  transition: opacity 0.12s ease;
}
.tv-fullscreen-icon {
  font-size: 14px;
  line-height: 1;
}
.tv-fullscreen-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.tv-fullscreen-btn:hover .tv-fullscreen-icon,
.tv-fullscreen-btn:hover .tv-fullscreen-label,
.tv-fullscreen-btn:focus-visible .tv-fullscreen-icon,
.tv-fullscreen-btn:focus-visible .tv-fullscreen-label {
  opacity: 1;
}

.tv-loop-page {
  width: 100vw; height: 100vh;
  margin: 0; padding: 0;
  background: var(--bg);
  overflow: hidden;
}
.tv-loop-shell {
  width: 100%; height: 100%;
}
.tv-loop-iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
}

/* ════════════════════════════════════════════════════════
   EMOTION SYSTEM — Sistema modular de emoções motivacionais
═══════════════════════════════════════════════════════ */

/* Base emotion container */
.emotion-success { --emotion-color: #81E61C; --emotion-bg: #F0FCE0; --emotion-text: #4A8A0F; }
.emotion-neutral { --emotion-color: #1739EB; --emotion-bg: #EEF1FE; --emotion-text: #1739EB; }
.emotion-warning { --emotion-color: #FFDE59; --emotion-bg: #FFF7D6; --emotion-text: #A07F00; }
.emotion-danger  { --emotion-color: #FF5757; --emotion-bg: #FFECEC; --emotion-text: #C43030; }

/* Mascot bounce animation (felicidade, orgulho) */
@keyframes emotionBounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-14px) rotate(3deg); }
}

/* Pulse animation (confianca, inicio) */
@keyframes emotionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Celebrate animation (extase - mais intenso) */
@keyframes emotionCelebrate {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    25% { transform: scale(1.12) rotate(4deg); }
    50% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.1) rotate(3deg); }
}

/* Attention animation (atencao, preocupacao) */
@keyframes emotionAttention {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-3px); }
    30% { transform: translateX(3px); }
    45% { transform: translateX(-2px); }
    60% { transform: translateX(2px); }
    75% { transform: translateX(-1px); }
}

/* Shake animation (tensao, frustracao) */
@keyframes emotionShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    10% { transform: translateX(-4px) rotate(-5deg); }
    20% { transform: translateX(4px) rotate(5deg); }
    30% { transform: translateX(-4px) rotate(-4deg); }
    40% { transform: translateX(4px) rotate(4deg); }
    50% { transform: translateX(-3px) rotate(-3deg); }
    60% { transform: translateX(3px) rotate(3deg); }
    70% { transform: translateX(-2px) rotate(-2deg); }
    80% { transform: translateX(2px) rotate(2deg); }
    90% { transform: translateX(-1px) rotate(-1deg); }
}

/* Emotion classes for mascot */
.home-mascot.emotion-success { animation: emotionBounce 2.5s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(129,230,28,0.3)); }
.home-mascot.emotion-neutral { animation: emotionPulse 3s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(23,57,235,0.25)); }
.home-mascot.emotion-warning { animation: emotionAttention 2s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(255,222,89,0.3)); }
.home-mascot.emotion-danger  { animation: emotionShake 1.5s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(255,87,87,0.3)); }

/* Emotion classes for pill icon wrap */
.pill.emotion-success .pill-icon-wrap { background: var(--emotion-bg, var(--accent-soft)); color: var(--emotion-text, var(--success-text)); }
.pill.emotion-neutral .pill-icon-wrap { background: var(--emotion-bg, var(--primary-soft)); color: var(--emotion-text, var(--primary)); }
.pill.emotion-warning .pill-icon-wrap { background: var(--emotion-bg, rgba(255,222,89,0.3)); color: var(--emotion-text, var(--warning-text)); }
.pill.emotion-danger .pill-icon-wrap { background: var(--emotion-bg, var(--danger-soft)); color: var(--emotion-text, var(--danger)); }

/* Emotion classes for pill status dot */
.pill.emotion-success .pill-status-dot { background: var(--emotion-color, var(--success)); box-shadow: 0 0 0 3px rgba(129,230,28,0.20); animation: pulse 2s ease-in-out infinite; }
.pill.emotion-neutral .pill-status-dot { background: var(--emotion-color, var(--primary)); box-shadow: 0 0 0 3px rgba(23,57,235,0.20); animation: pulse 2s ease-in-out infinite; }
.pill.emotion-warning .pill-status-dot { background: var(--emotion-color, var(--warning)); box-shadow: 0 0 0 3px rgba(255,222,89,0.28); animation-name: pulseWarning; }
.pill.emotion-danger .pill-status-dot { background: var(--emotion-color, var(--danger)); box-shadow: 0 0 0 3px rgba(255,87,87,0.22); animation-name: pulseDanger; }

/* Pill background colors by emotion */
.pill.pill-status.emotion-success { background: linear-gradient(135deg, var(--surface) 0%, #F8FEEE 100%); border-color: var(--emotion-color, var(--accent)); }
.pill.pill-status.emotion-neutral { background: linear-gradient(135deg, var(--surface) 0%, #EEF1FE 100%); border-color: var(--emotion-color, var(--primary)); }
.pill.pill-status.emotion-warning { background: linear-gradient(135deg, var(--surface) 0%, #FFFBE5 100%); border-color: var(--emotion-color, var(--warning)); }
.pill.pill-status.emotion-danger { background: linear-gradient(135deg, var(--surface) 0%, #FFECEC 100%); border-color: var(--emotion-color, var(--danger)); }

/* Glow effects for mascots */
.emotion-success .home-mascot { filter: drop-shadow(0 8px 24px rgba(129,230,28,0.4)); }
.emotion-neutral .home-mascot { filter: drop-shadow(0 8px 24px rgba(23,57,235,0.35)); }
.emotion-warning .home-mascot { filter: drop-shadow(0 8px 24px rgba(255,222,89,0.4)); }
.emotion-danger .home-mascot { filter: drop-shadow(0 8px 24px rgba(255,87,87,0.4)); }

/* Status badge colors */
.status-badge.emotion-success { background: var(--accent-soft); color: var(--success-text); }
.status-badge.emotion-neutral { background: var(--primary-soft); color: var(--primary); }
.status-badge.emotion-warning { background: rgba(255,222,89,0.25); color: var(--warning-text); }
.status-badge.emotion-danger { background: var(--danger-soft); color: var(--danger); }

/* ════════════════════════════════════════════════════════
   SCREEN — ADMIN /add
════════════════════════════════════════════════════════ */
.screen-admin {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.admin-body {
  flex: 1;
  padding: 28px 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1480px;
  margin: 0 auto;
  width: 100%;
}

.admin-section-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.admin-section-title {
  font-size: 13px; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--text-3);
  display: flex; align-items: center; gap: 10px;
}
.admin-section-title::before {
  content: '';
  width: 18px; height: 2px; background: var(--primary); border-radius: 2px;
}
.admin-section-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ═══ Hero meta card ═══ */
.admin-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0F2BC4 60%, #0A1F8F 100%);
  border-radius: 22px;
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(23,57,235,0.28);
}
.admin-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at top right, rgba(129,230,28,0.18), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(255,255,255,0.06), transparent 60%);
  pointer-events: none;
}
.admin-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr auto;
  gap: 28px;
  align-items: center;
}
.admin-hero-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.admin-hero-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.admin-hero-value {
  font-size: clamp(22px, 2vw, 30px); font-weight: 900;
  letter-spacing: -0.6px;
  line-height: 1.1;
  white-space: nowrap;
}
.admin-hero-value .currency {
  font-size: 0.55em; font-weight: 700;
  margin-right: 6px; opacity: 0.85;
}
.admin-hero-value.accent { color: var(--accent); }
.admin-hero-pct {
  font-size: clamp(36px, 3.8vw, 56px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.admin-hero-bar {
  margin-top: 18px;
  height: 10px;
  background: rgba(255,255,255,0.14);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}
.admin-hero-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #B5F367 100%);
  border-radius: 100px;
  box-shadow: 0 0 16px rgba(129,230,28,0.55);
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.admin-hero-meta-row {
  margin-top: 10px;
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: rgba(255,255,255,0.7);
  font-weight: 600;
}
.admin-hero-meta-row .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

/* ═══ Vendedores grid ═══ */
.admin-vendedores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.admin-vendedor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex; flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  transition:
    transform 0.25s cubic-bezier(0.16,1,0.3,1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  position: relative;
}
.admin-vendedor-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}
.admin-vendedor-card.is-inactive { opacity: 0.55; filter: grayscale(0.4); }

.admin-vendedor-head {
  display: flex; align-items: center; gap: 14px;
}
.admin-vendedor-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  overflow: hidden; flex-shrink: 0;
}
.admin-vendedor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-vendedor-info { flex: 1; min-width: 0; }
.admin-vendedor-name {
  font-size: 15px; font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.3px;
  line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-vendedor-slug {
  font-size: 11px; color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}
.admin-vendedor-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  border-radius: 6px;
  flex-shrink: 0;
}
.admin-vendedor-status.on { background: var(--accent-soft); color: var(--success-text); }
.admin-vendedor-status.off { background: var(--surface-2); color: var(--text-3); }
.admin-vendedor-status .status-dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.admin-vendedor-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 10px;
}
.admin-vendedor-stat-label {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-3);
}
.admin-vendedor-stat-value {
  font-size: 13px; font-weight: 800;
  color: var(--text-1); letter-spacing: -0.3px;
  margin-top: 2px;
}
.admin-vendedor-stat-value.accent { color: var(--success-text); }

.admin-vendedor-progress {
  display: flex; flex-direction: column; gap: 6px;
}
.admin-vendedor-progress-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--text-3); font-weight: 600;
}
.admin-vendedor-progress-meta .pct {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.5px;
}
.admin-vendedor-bar {
  height: 7px; background: var(--surface-2);
  border-radius: 100px; overflow: hidden;
  border: 1px solid var(--border);
}
.admin-vendedor-bar-fill {
  height: 100%; border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}
.pct-low .admin-vendedor-bar-fill,
.pct-low.pct-bar { background: linear-gradient(90deg, var(--danger), #FF8A8A); }
.pct-mid .admin-vendedor-bar-fill,
.pct-mid.pct-bar { background: linear-gradient(90deg, var(--warning), #FFE99A); }
.pct-good .admin-vendedor-bar-fill,
.pct-good.pct-bar { background: linear-gradient(90deg, var(--primary), #5680F0); }
.pct-great .admin-vendedor-bar-fill,
.pct-great.pct-bar { background: linear-gradient(90deg, var(--accent), #B5F367); }

.pct-low .pct { color: var(--danger); }
.pct-mid .pct { color: var(--warning-text); }
.pct-good .pct { color: var(--primary); }
.pct-great .pct { color: var(--success-text); }

.admin-vendedor-actions {
  display: flex; gap: 8px;
  margin-top: auto;
}

.admin-empty {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 44px 24px;
  text-align: center;
}
.admin-empty-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900;
  margin-bottom: 12px;
}
.admin-empty-title {
  font-size: 16px; font-weight: 800;
  color: var(--text-1); margin-bottom: 6px;
}
.admin-empty-desc {
  font-size: 13px; color: var(--text-3);
  max-width: 360px; margin: 0 auto 18px;
  line-height: 1.55;
}

/* ═══ BUTTONS (sistema reutilizável) ═══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  background: transparent;
  color: var(--text-1);
}
.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
  background: #0F2BC4;
  border-color: #0F2BC4;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(23,57,235,0.30);
}
.btn-accent {
  background: var(--accent);
  color: #1A4A03;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(129,230,28,0.35);
}
.btn-accent:hover {
  background: #6BC714;
  border-color: #6BC714;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(129,230,28,0.45);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--text-3);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text-1);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #E03E3E;
  border-color: #E03E3E;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255,87,87,0.35);
}
.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-outline-danger:hover {
  background: var(--danger-soft);
}
.btn-on-dark {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border-color: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
}
.btn-on-dark:hover {
  background: rgba(255,255,255,0.26);
  border-color: rgba(255,255,255,0.4);
}
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-lg { padding: 13px 22px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: 9px;
}

/* ═══ FORMS (sistema reutilizável) ═══ */
.form-grid {
  display: grid;
  gap: 14px;
}
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.col-span-2 { grid-column: span 2; }
.form-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--text-3);
}
.form-input {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--text-1);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-input::placeholder { color: var(--text-4); font-weight: 500; }
.form-input:hover { border-color: var(--text-3); }
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: #fff;
}
.form-input.is-money {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.form-help { font-size: 11px; color: var(--text-3); }

.form-switch {
  display: inline-flex; align-items: center; gap: 12px;
  cursor: pointer;
  user-select: none;
}
.form-switch input { display: none; }
.form-switch-track {
  width: 42px; height: 24px;
  background: var(--border-strong);
  border-radius: 100px;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.form-switch-track::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s ease;
}
.form-switch input:checked + .form-switch-track { background: var(--primary); }
.form-switch input:checked + .form-switch-track::after { transform: translateX(18px); }
.form-switch-label { font-size: 13px; font-weight: 600; color: var(--text-1); }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,19,33,0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.modal-overlay.is-open .modal-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.modal-dialog {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(13,19,33,0.35);
  display: flex; flex-direction: column;
  transform: translateY(8px) scale(0.985);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1), opacity 0.22s ease;
  overflow: hidden;
}
.modal-dialog.modal-md { max-width: 600px; }
.modal-dialog.modal-sm { max-width: 420px; }

.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title-wrap { flex: 1; min-width: 0; }
.modal-eyebrow {
  font-size: 10px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.modal-title {
  font-size: 19px; font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.modal-subtitle {
  font-size: 13px; color: var(--text-3);
  font-weight: 500; margin-top: 4px;
  line-height: 1.5;
}
.modal-close {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 18px; font-weight: 700;
  line-height: 1;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--surface-2);
  color: var(--text-1);
  border-color: var(--text-3);
}
.modal-body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
}
.modal-body.no-pad-top { padding-top: 4px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 26px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.modal-footer .btn { min-width: 110px; }

.modal-icon-bubble {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.modal-icon-bubble.danger { background: var(--danger-soft); color: var(--danger); }
.modal-icon-bubble.primary { background: var(--primary-soft); color: var(--primary); }

body.modal-open { overflow: hidden; }

@media (max-width: 1100px) {
  .screen-tv { overflow: auto; }
  .tv-body {
    grid-template-rows: auto auto;
    overflow: visible;
  }
  .hero-row {
    grid-template-columns: 1fr;
  }
  .secondary-row {
    grid-template-columns: 1fr;
  }
  .hero-card-value {
    font-size: clamp(44px, 9vw, 78px);
  }
  .meta-diaria-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .home-content { gap: 20px; padding: 14px 16px; }
  .home-main-card { min-height: auto; padding: 34px 22px; }
  .home-mascot-wrap { --mascot-size: clamp(64px, 18vw, 92px); }
  .home-pct { font-size: clamp(82px, 24vw, 120px); letter-spacing: -4px; }
  .home-label { font-size: clamp(16px, 4.6vw, 22px); letter-spacing: 2px; }
  .home-progress-track { height: clamp(22px, 6vw, 30px); }
  .home-progress-labels {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 8px;
    font-size: clamp(14px, 4vw, 18px);
  }
  .home-progress-meta {
    order: -1;
    width: 100%;
    font-size: clamp(18px, 5.4vw, 24px);
  }
  .pill-carousel { min-height: 150px; }
  .pill-carousel-track { min-height: 132px; }
  .pill {
    width: 100%;
    white-space: normal;
    border-radius: 28px;
    padding: 22px;
  }
  .pill-text { font-size: 20px; }
  .pill-icon-wrap { width: 52px; height: 52px; font-size: 26px; }
  .admin-hero-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .admin-hero-grid > .admin-hero-block:first-child { grid-column: 1 / -1; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .form-group.col-span-2 { grid-column: auto; }
  .admin-body { padding: 20px 16px 40px; }
}

/* ── Flash messages ──────────────────────────────────────────── */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid transparent;
}
.flash-success {
  background: var(--accent-soft);
  color: var(--success-text);
  border-color: rgba(74,138,15,0.2);
}
.flash-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255,87,87,0.2);
}

/* ── Login screen ────────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-wrap {
  width: 100%; max-width: 400px;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
}
.login-wordmark {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900; font-size: 28px; letter-spacing: 2px;
  color: var(--text-1);
}
.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-title {
  font-size: 20px; font-weight: 700;
  color: var(--text-1);
  margin-bottom: 20px;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-submit { width: 100%; }

/* ── Painel de sincronização com a API de metas ──────────────── */
/* Estado saudável em azul discreto; defasado em âmbar. A cor é o que faz o
   estado ser lido de longe, sem precisar interpretar o texto. */
/* O estado é comunicado pelo ponto colorido no título e pelo fundo, não por uma
   tarja lateral: a borda uniforme mantém o painel igual aos outros cards do
   admin, que também usam border 1px em volta. */
.sync-panel {
  display: flex; align-items: flex-start; gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 24px;
}
.sync-panel.is-stale {
  border-color: rgba(255,222,89,0.55);
  /* Amarelo bem diluído: o --warning cheio (#FFDE59) como fundo apagaria o
     texto. Não existe --warning-soft no tema, então a mistura é local. */
  background: #FFFBEB;
}
.sync-panel-main { flex: 1 1 auto; min-width: 0; }
.sync-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--text-1);
}
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.sync-panel.is-stale .sync-dot { background: var(--warning); }
.sync-comp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--primary); background: var(--primary-soft);
  padding: 2px 7px; border-radius: 5px;
}
.sync-panel-info {
  margin-top: 6px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.sync-panel-info .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-4);
}
.sync-panel-erro {
  margin-top: 8px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
  color: var(--danger);
}
.sync-panel-avisos {
  margin-top: 8px; padding-left: 18px;
  font-size: 12px; line-height: 1.5; color: var(--warning-text);
}
.sync-panel-actions { flex: 0 0 auto; }

@media (max-width: 720px) {
  .sync-panel { flex-direction: column; gap: 12px; }
}

/* ── Campos administrados pela API ───────────────────────────── */
/* Fundo apagado e cursor de "não mexe": o campo continua legível (o valor
   importa) mas não convida a digitar. readOnly em vez de disabled porque
   disabled removeria o valor do envio e tiraria o campo da ordem de tabulação,
   deixando quem usa teclado sem conseguir ler o conteúdo. */
.form-input.is-locked {
  background: var(--surface-2);
  color: var(--text-2);
  cursor: not-allowed;
}
.form-input.is-locked:focus {
  border-color: var(--border);
  box-shadow: none;
}
.modal-aviso {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
