:root {
  --bg-main: #070B14;
  --bg-elevated: #0D1322;
  --bg-card: #111827;
  --bg-card-hover: #172033;
  --border-subtle: #1F2937;
  --border-highlight: #374151;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --neon-green: #00F59B;
  --neon-green-dim: rgba(0, 245, 155, 0.14);
  --neon-orange: #FF5E1A;
  --neon-orange-dim: rgba(255, 94, 26, 0.15);
  --neon-blue: #38BDF8;
  --neon-blue-dim: rgba(56, 189, 248, 0.15);
  --neon-purple: #A855F7;
  --neon-purple-dim: rgba(168, 85, 247, 0.16);
  --neon-amber: #F59E0B;
  --neon-red: #EF4444;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 92px;
  position: relative;
}

/* ================= TOP HEADER COCKPIT ================= */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(7, 11, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px;
}

.top-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-bolt {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--neon-green), #059669);
  color: #04130D;
  font-weight: 900;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 245, 155, 0.35);
}

.countdown-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--neon-green);
}

.atleta-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.pill-streak {
  border-color: rgba(255, 94, 26, 0.45);
  background: var(--neon-orange-dim);
  color: #FF8552;
}

.pill-clima {
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--neon-blue-dim);
  color: var(--neon-blue);
}

/* ================= CARDS & CONTAINERS ================= */
.tab-view {
  display: none;
  padding: 14px 16px;
  animation: fadeIn 0.18s ease-out;
}

.tab-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-hero-green {
  background: radial-gradient(circle at top right, rgba(0, 245, 155, 0.13), transparent 60%), var(--bg-card);
  border-color: rgba(0, 245, 155, 0.35);
}

.card-hero-orange {
  background: radial-gradient(circle at top right, rgba(255, 94, 26, 0.14), transparent 60%), var(--bg-card);
  border-color: rgba(255, 94, 26, 0.38);
}

.card-hero-blue {
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 60%), var(--bg-card);
  border-color: rgba(56, 189, 248, 0.38);
}

.card-hero-purple {
  background: radial-gradient(circle at top right, rgba(168, 85, 247, 0.16), transparent 60%), var(--bg-card);
  border-color: rgba(168, 85, 247, 0.42);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* ================= POMERODE PREDICTOR GAUGE ================= */
.predictor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
}

.gauge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gauge-svg {
  width: 155px;
  height: 98px;
}

.gauge-time-big {
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--neon-green);
  margin-top: -12px;
}

.gauge-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.targets-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.target-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 9px 11px;
}

.target-box.meta-a {
  border-left: 3px solid var(--neon-green);
}

.target-box.meta-b {
  border-left: 3px solid var(--neon-blue);
}

.target-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.target-val {
  font-size: 15px;
  font-weight: 900;
  color: var(--text-primary);
  margin-top: 2px;
}

.target-pace {
  font-size: 11px;
  color: var(--neon-green);
  font-weight: 700;
}

.zones-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.zone-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 6px;
  text-align: center;
}

.zone-name {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
}

.zone-pace {
  font-size: 12px;
  font-weight: 900;
  margin-top: 2px;
  color: var(--text-primary);
}

.weight-bonus-banner {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 245, 155, 0.08);
  border: 1px dashed rgba(0, 245, 155, 0.35);
  font-size: 12px;
  color: #D1FAE5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ================= EXPEDIÇÃO PARACATU ➔ POMERODE ================= */
.expedicao-bar-bg {
  width: 100%;
  height: 12px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin: 10px 0;
}

.expedicao-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.checkpoints-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 4px;
  scrollbar-width: none;
}

.checkpoints-scroll::-webkit-scrollbar {
  display: none;
}

.cp-node {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.cp-node.reached {
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
  color: var(--neon-green);
}

.cp-node.next {
  border-color: var(--neon-blue);
  color: var(--text-primary);
}

/* ================= MISSÃO DO DIA & BLOCOS ================= */
.mission-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.cat-CORRIDA { background: var(--neon-green-dim); color: var(--neon-green); border: 1px solid rgba(0, 245, 155, 0.4); }
.cat-HIBRIDO_DUPLO { background: var(--neon-orange-dim); color: #FF7A45; border: 1px solid rgba(255, 94, 26, 0.45); }
.cat-WOD_CROSSFIT { background: var(--neon-orange-dim); color: var(--neon-orange); border: 1px solid rgba(255, 94, 26, 0.45); }
.cat-PISCINA_14M { background: var(--neon-blue-dim); color: var(--neon-blue); border: 1px solid rgba(56, 189, 248, 0.45); }
.cat-BOSS_TEST { background: var(--neon-purple-dim); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.5); }
.cat-DESCANSO_ATIVO { background: rgba(156, 163, 175, 0.14); color: #D1D5DB; border: 1px solid rgba(156, 163, 175, 0.3); }

.mission-title {
  font-size: 19px;
  font-weight: 900;
  line-height: 1.25;
  margin-top: 10px;
  color: var(--text-primary);
}

.mission-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

.mission-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.meta-pill {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
}

.blocks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 16px;
}

.block-item {
  background: var(--bg-elevated);
  border-left: 3px solid var(--neon-green);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.block-item.wod {
  border-left-color: var(--neon-orange);
}

.block-item.pool {
  border-left-color: var(--neon-blue);
}

.block-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-primary);
}

.block-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* ================= BOTÕES ================= */
.btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary-neon {
  background: linear-gradient(135deg, var(--neon-green), #10B981);
  color: #03150E;
  box-shadow: 0 6px 20px rgba(0, 245, 155, 0.3);
}

.btn-orange-neon {
  background: linear-gradient(135deg, var(--neon-orange), #EA580C);
  color: #FFFFFF;
  box-shadow: 0 6px 20px rgba(255, 94, 26, 0.3);
}

.btn-blue-pool {
  background: rgba(56, 189, 248, 0.14);
  color: var(--neon-blue);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.btn-secondary-dark {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-highlight);
}

.btn-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

/* ================= LIVE PLAYER (ABA 2) ================= */
.mode-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: var(--bg-elevated);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.mode-btn.active-run {
  background: var(--neon-green);
  color: #04130D;
}

.mode-btn.active-wod {
  background: var(--neon-orange);
  color: #FFFFFF;
}

.mode-btn.active-pool {
  background: var(--neon-blue);
  color: #041624;
}

.hud-timer-giant {
  font-size: 56px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  line-height: 1.05;
  margin: 8px 0;
}

.hud-metrics-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.hud-metric-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}

.hud-metric-val {
  font-size: 21px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hud-metric-lbl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 3px;
}

.interval-banner {
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 245, 155, 0.4);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.interval-current-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--neon-green);
}

.interval-countdown {
  font-size: 26px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

/* ================= MODO BOLSO (TELA PRETA COM TRAVA 2S) ================= */
.pocket-lock-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 48px 24px;
  color: #374151;
}

.pocket-lock-overlay.active {
  display: flex;
}

.pocket-dim-clock {
  font-size: 48px;
  font-weight: 900;
  color: rgba(0, 245, 155, 0.28);
  font-variant-numeric: tabular-nums;
}

.pocket-unlock-btn {
  width: 220px;
  height: 72px;
  border-radius: 999px;
  background: #090D16;
  border: 2px solid #1F2937;
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.pocket-hold-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: rgba(0, 245, 155, 0.25);
  transition: width 0.05s linear;
}

/* ================= NAVEGAÇÃO INFERIOR (4 ABAS) ================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
}

.bottom-nav-inner {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px 10px;
}

.nav-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.nav-item .nav-icon {
  font-size: 19px;
}

.nav-item.active {
  color: var(--neon-green);
}

/* ================= MODAL PÓS-TREINO & LOGIN ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.86);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pain-chip {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
}

.pain-chip.selected {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--neon-red);
  color: #FCA5A5;
}

.pain-chip.zero-selected {
  background: var(--neon-green-dim);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.input-dark {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.levels-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.level-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  text-align: left;
}

.level-pill.active {
  border-color: var(--neon-green);
  background: var(--neon-green-dim);
}

.shoe-bar-bg {
  width: 100%;
  height: 9px;
  background: var(--bg-main);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.shoe-bar-fill {
  height: 100%;
  background: var(--neon-green);
  border-radius: 999px;
}
