/* =====================================================
   SINAIS FIFA · GoldeBet — design tokens & primitives
   ===================================================== */

:root {
  /* GoldeBet palette — deep navy + gold accent */
  --bg-0: #07101e;
  --bg-1: #0c1729;
  --bg-2: #122340;
  --bg-3: #1a2e52;
  --bg-card: rgba(18, 35, 64, 0.55);
  --bg-card-2: rgba(18, 35, 64, 0.85);

  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(99, 169, 255, 0.18);

  --text-0: #f3f7ff;
  --text-1: #d6e0f0;
  --text-2: #9aabc4;
  --text-3: #6377a0;

  /* GoldeBet brand */
  --brand-blue: #2c6bff;        /* primary blue (the "→ Entrar" button) */
  --brand-blue-2: #4d86ff;
  --brand-blue-bg: rgba(44, 107, 255, 0.12);
  --brand-blue-bd: rgba(44, 107, 255, 0.32);

  --brand-gold: #f5b942;        /* GoldeBet gold */
  --brand-gold-2: #ffce5c;
  --brand-gold-bg: rgba(245, 185, 66, 0.12);
  --brand-gold-bd: rgba(245, 185, 66, 0.35);

  --win:  #36d399;
  --loss: #f15a5a;
  --warn: #f5b942;
  --info: #4d86ff;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --f-ui: 'Inter Tight', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,.35);
  --shadow-glow: 0 0 0 1px var(--brand-blue-bd), 0 12px 40px rgba(44,107,255,0.15);
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
html, body { min-height: 100%; }
html {
  background-color: #07101e;
}
body {
  margin: 0;
  font-family: var(--f-ui);
  color: var(--text-1);
  font-feature-settings: 'cv11','ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #07101e;
}
.shell { background: transparent; }

/* Fixed grid overlay — soft, atmospheric */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(120,180,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,180,255,0.07) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px;
}
.shell, .login-stage { position: relative; z-index: 1; }

/* dotted/grid bg utility */
.gridbg::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(99,169,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99,169,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent 80%);
}

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ============== LOGIN ============== */

.login-stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
}

.login-card {
  position: relative;
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: linear-gradient(180deg, rgba(18,35,64,0.95), rgba(12,23,41,0.95));
  border: 1px solid var(--line-2);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

.login-side { padding: 40px 38px; }
.login-side.left { border-right: 1px solid var(--line-1); background: rgba(7,16,30,0.4); }

.login-h1 {
  font-size: 26px; font-weight: 800; color: var(--brand-blue-2);
  margin: 0 0 8px; letter-spacing: -0.02em;
}
.login-sub { color: var(--text-2); font-size: 14px; line-height: 1.55; margin-bottom: 26px; max-width: 360px; }

.steps { display: flex; flex-direction: column; gap: 14px; }
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  background: rgba(18,35,64,0.55);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 18px;
  align-items: start;
}
.step-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(180deg, var(--brand-blue), #1f4dbf);
  display: grid; place-items: center;
  font-weight: 700; color: #fff; font-size: 15px;
  box-shadow: 0 0 0 4px rgba(44,107,255,0.10);
}
.step-title { color: var(--text-0); font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.step-body { color: var(--text-2); font-size: 13px; line-height: 1.55; }
.step-body a, .login-link { color: var(--brand-blue-2); text-decoration: underline; font-weight: 600; cursor: pointer; }
.step-body strong { color: var(--brand-gold); font-weight: 700; }

.login-h2 { font-size: 24px; font-weight: 800; color: var(--text-0); margin: 0 0 4px; text-align: center; }
.login-cap { color: var(--text-2); font-size: 13px; text-align: center; margin-bottom: 20px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: rgba(44,107,255,0.10);
  border-left: 3px solid var(--brand-blue);
  border-radius: 0 8px 8px 0;
  color: var(--text-1);
  font-size: 12.5px; line-height: 1.5;
  margin-bottom: 18px;
}
.notice b { color: var(--text-0); }

.field-l { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field-l > label { font-size: 13px; font-weight: 600; color: var(--text-1); }
.field-l > input {
  background: #f3f7ff; color: #07101e;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--f-ui); font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field-l > input:focus {
  border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--brand-blue-bg);
}

.checkrow { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--text-2); margin-bottom: 18px; line-height: 1.5; }
.checkrow input { margin-top: 2px; accent-color: var(--brand-blue); }

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: none; cursor: pointer;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-blue), #1f4dbf);
  color: #fff; font-family: var(--f-ui); font-size: 14.5px; font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(44,107,255,0.25), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform .12s, box-shadow .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(44,107,255,0.35), inset 0 1px 0 rgba(255,255,255,0.22); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.login-foot { color: var(--text-2); font-size: 13px; text-align: center; margin-top: 16px; }

/* ============== DASHBOARD ============== */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.afh-banner {
  background: linear-gradient(90deg, rgba(245,185,66,0.10), rgba(245,185,66,0.02));
  border-bottom: 1px solid rgba(245,185,66,0.20);
  color: var(--brand-gold-2);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 7px 14px;
}
  font-family: var(--f-mono); font-size: 11.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 8px 14px;
}
.afh-banner a { color: var(--brand-gold-2); font-weight: 700; text-decoration: underline; }
.afh-banner .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); box-shadow: 0 0 0 0 var(--brand-gold); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,185,66,0.7); } 70% { box-shadow: 0 0 0 8px rgba(245,185,66,0); } 100% { box-shadow: 0 0 0 0 rgba(245,185,66,0); } }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  background: rgba(7,16,30,0.85);
  border-bottom: 1px solid var(--line-1);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(180deg, var(--brand-gold), #c8902d);
  display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 800; color: #1a1208; font-size: 14px;
  box-shadow: 0 0 0 1px rgba(245,185,66,0.25), 0 4px 14px rgba(245,185,66,0.18);
}
.brand-name { color: var(--text-0); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.brand-name span { color: var(--brand-gold); }
.brand-sub { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.btn-soft {
  background: rgba(44,107,255,0.10); color: var(--brand-blue-2);
  border: 1px solid var(--brand-blue-bd);
  padding: 8px 12px; border-radius: 8px;
  font-family: var(--f-ui); font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-soft:hover { background: rgba(44,107,255,0.16); }

.btn-gold {
  background: linear-gradient(180deg, var(--brand-gold), #c8902d);
  color: #1a1208; border: none;
  padding: 8px 14px; border-radius: 8px;
  font-family: var(--f-ui); font-size: 12.5px; font-weight: 800; cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(245,185,66,0.18);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-gold:hover { transform: translateY(-1px); }

.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  padding: 5px 10px 5px 5px; border-radius: 999px;
}
.user-av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-blue), var(--brand-gold)); display: grid; place-items: center; font-weight: 700; font-size: 11px; color: #07101e; }
.user-id { font-size: 12px; color: var(--text-1); font-weight: 600; }
.user-bal { font-family: var(--f-mono); font-size: 11px; color: var(--brand-gold); }

/* main grid: iframe (left) + tools (right) */
.dash-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 18px;
  padding: 18px 22px 28px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .dash-main { grid-template-columns: 1fr; }
}

.house-frame {
  background: #07101e;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  min-height: 760px;
  display: block;
}
.house-iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 760px;
  border: 0;
  background: #07101e;
}

/* tools column */
.tools { display: flex; flex-direction: column; gap: 14px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
}
.card-t { display: flex; align-items: center; gap: 10px; color: var(--text-0); font-weight: 700; font-size: 13.5px; }
.card-t .ico { width: 26px; height: 26px; border-radius: 7px; background: var(--brand-blue-bg); border: 1px solid var(--brand-blue-bd); color: var(--brand-blue-2); display: grid; place-items: center; }
.card-t .ico.gold { background: var(--brand-gold-bg); border-color: var(--brand-gold-bd); color: var(--brand-gold); }
.card-t .ico.green { background: rgba(54,211,153,0.10); border-color: rgba(54,211,153,0.30); color: var(--win); }
.card-sub { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; }
.card-body { padding: 12px 14px; }

/* match items */
.match-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
  cursor: pointer;
  transition: background .15s;
}
.match-row:hover { background: rgba(44,107,255,0.06); }
.match-row:last-child { border-bottom: none; }
.match-time {
  font-family: var(--f-mono); font-size: 13px; font-weight: 700; color: var(--brand-gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 0;
}
.match-time small { font-size: 9px; color: var(--text-3); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.match-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.match-players { display: flex; align-items: center; gap: 8px; color: var(--text-0); font-weight: 600; font-size: 13px; }
.match-players .vs { color: var(--text-3); font-family: var(--f-mono); font-size: 11px; }
.match-meta { display: flex; gap: 10px; align-items: center; font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.05em; text-transform: uppercase; }
.match-meta b { color: var(--brand-blue-2); }
.match-cta { display: flex; align-items: center; justify-content: center; }
.btn-mini {
  background: linear-gradient(180deg, var(--brand-blue), #1f4dbf);
  color: #fff; border: none; cursor: pointer;
  padding: 8px 12px; border-radius: 8px;
  font-family: var(--f-ui); font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.btn-mini.gold { background: linear-gradient(180deg, var(--brand-gold), #c8902d); color: #1a1208; }

/* signal queue items */
.queue-item {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-1);
}
.queue-item:last-child { border-bottom: none; }
.queue-line { color: var(--text-0); font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.queue-meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); }
.queue-meta b { color: var(--brand-gold); font-weight: 600; }
.queue-cd {
  font-family: var(--f-mono); font-size: 13px; font-weight: 700; color: var(--brand-blue-2);
  background: var(--brand-blue-bg); border: 1px solid var(--brand-blue-bd);
  padding: 6px 10px; border-radius: 8px; min-width: 64px; text-align: center;
  align-self: center;
}

/* perf bar list */
.perf-row { display: grid; grid-template-columns: 32px 1fr 50px; gap: 10px; padding: 8px 0; align-items: center; border-bottom: 1px solid var(--line-1); }
.perf-row:last-child { border-bottom: none; }
.perf-rank {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-2); font-weight: 700;
}
.perf-rank.top { background: var(--brand-gold-bg); border-color: var(--brand-gold-bd); color: var(--brand-gold); }
.perf-name { color: var(--text-0); font-size: 12.5px; font-weight: 600; }
.perf-bar { height: 4px; background: var(--bg-2); border-radius: 2px; overflow: hidden; margin-top: 4px; }
.perf-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-blue-2), var(--brand-gold)); }
.perf-meta { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); margin-top: 3px; }
.perf-wr { font-family: var(--f-mono); font-size: 12px; color: var(--win); font-weight: 700; text-align: right; }

/* stat tiles in dashboard */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 14px; }
.tile { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; }
.tile-k { font-family: var(--f-mono); font-size: 9px; color: var(--text-3); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.tile-v { font-family: var(--f-mono); font-weight: 800; font-size: 18px; color: var(--text-0); letter-spacing: -0.01em; }
.tile-v.gold { color: var(--brand-gold); }
.tile-v.win { color: var(--win); }
.tile-d { font-family: var(--f-mono); font-size: 10px; color: var(--win); margin-top: 4px; }

/* footer */
.foot {
  padding: 24px 22px 22px;
  border-top: 1px solid var(--line-1);
  background: rgba(7,16,30,0.6);
  text-align: center;
  font-size: 11.5px; color: var(--text-3);
  line-height: 1.65;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.foot a { color: var(--brand-blue-2); font-weight: 600; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .age {
  display: inline-flex;
  align-self: center;
  width: auto;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.foot .age::before {
  content: '18';
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(241,90,90,0.40);
  color: #ff9a9a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

/* ============== SIGNAL MODAL ============== */

.modal-bg {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 9, 18, 0.78);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: min(440px, 100%);
  background: linear-gradient(180deg, #122340, #0a1426);
  border: 1px solid var(--brand-blue-bd);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(44,107,255,0.10);
  overflow: hidden;
  position: relative;
}
.modal-head { padding: 18px 20px 14px; border-bottom: 1px solid var(--line-1); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; color: var(--text-0); font-size: 16px; font-weight: 800; }
.modal-head p { margin: 2px 0 0; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }
.modal-close { background: transparent; border: none; color: var(--text-3); cursor: pointer; font-size: 22px; padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text-0); }

.modal-body { padding: 18px 20px 20px; }
.match-hero {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px;
  margin-bottom: 16px;
}
.match-hero .h-side { text-align: center; }
.h-side .h-av { width: 44px; height: 44px; border-radius: 10px; background: var(--bg-3); display: grid; place-items: center; font-family: var(--f-mono); font-weight: 800; font-size: 14px; color: var(--text-0); margin: 0 auto 6px; border: 1px solid var(--line-2); }
.h-side .h-name { font-weight: 700; color: var(--text-0); font-size: 13px; }
.h-side .h-team { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); margin-top: 2px; }
.h-vs { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.15em; }

.signal-state { display: flex; flex-direction: column; gap: 12px; }

.state-card {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 16px;
}
.state-idle { text-align: center; }
.state-idle .lbl { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.state-idle .val { font-size: 17px; color: var(--text-0); font-weight: 700; margin-bottom: 14px; }

.btn-generate {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: none; cursor: pointer;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--brand-gold), #c8902d);
  color: #1a1208; font-family: var(--f-ui); font-size: 14px; font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(245,185,66,0.30), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .12s;
}
.btn-generate:hover { transform: translateY(-1px); }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.loading-dots { display: flex; gap: 4px; align-items: center; }
.loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: dots 1.4s infinite both; }
.loading-dots i:nth-child(2) { animation-delay: .15s; }
.loading-dots i:nth-child(3) { animation-delay: .30s; }
@keyframes dots { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

.steps-progress { display: flex; flex-direction: column; gap: 10px; }
.step-line { display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 12px; color: var(--text-3); transition: color .3s; }
.step-line .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-2); }
.step-line.done { color: var(--text-2); }
.step-line.done .dot { background: var(--brand-blue-2); border-color: var(--brand-blue-2); }
.step-line.active { color: var(--text-0); }
.step-line.active .dot { background: var(--brand-gold); border-color: var(--brand-gold); box-shadow: 0 0 0 4px rgba(245,185,66,0.18); animation: pulseDot 1s infinite; }
@keyframes pulseDot { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

.signal-active { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.signal-cell { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; text-align: center; }
.signal-cell .lbl { font-family: var(--f-mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.signal-cell .val { font-family: var(--f-mono); font-size: 26px; font-weight: 800; color: var(--text-0); letter-spacing: -0.01em; }
.signal-cell .val.gold { color: var(--brand-gold); }
.signal-cell .val.blue { color: var(--brand-blue-2); }
.signal-cell .sub { font-family: var(--f-mono); font-size: 10px; color: var(--text-2); margin-top: 4px; letter-spacing: 0.05em; }

.cd-bar {
  margin-top: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 14px; text-align: center;
}
.cd-bar .lbl { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.cd-bar .val { font-family: var(--f-mono); font-size: 32px; font-weight: 800; color: var(--brand-gold); }
.cd-bar .val.expired { color: var(--loss); }
.cd-track { height: 4px; background: var(--bg-3); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.cd-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-gold), var(--loss)); transition: width 1s linear; }

.cta-stake {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 12px;
  padding: 14px 18px;
  border: 1px solid var(--brand-gold-bd); cursor: pointer;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(245,185,66,0.18), rgba(245,185,66,0.04));
  color: var(--brand-gold); font-family: var(--f-ui); font-size: 13.5px; font-weight: 800;
  letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none;
}
.cta-stake:hover { background: rgba(245,185,66,0.20); }

/* utility chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  font-family: var(--f-mono); font-size: 10px; color: var(--text-2);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.chip.live { background: rgba(241,90,90,0.10); border-color: rgba(241,90,90,0.30); color: #ffb0b0; }
.chip.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #f15a5a; animation: pulse 1.5s infinite; }
.chip.ev  { background: rgba(54,211,153,0.10); border-color: rgba(54,211,153,0.30); color: var(--win); }
.chip.gold { background: var(--brand-gold-bg); border-color: var(--brand-gold-bd); color: var(--brand-gold); }


/* ============== H2H ANALYSIS MODAL ============== */

.modal.modal-wide { width: min(620px, 100%); }

/* Sample size picker (idle phase) */
.sample-pick { margin: 16px 0 14px; }
.sample-pick .lbl { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 8px; text-align: center; }
.sample-row { display: flex; gap: 8px; justify-content: center; }
.sample-btn {
  min-width: 56px; padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line-2);
  font-family: var(--f-mono); font-size: 14px; font-weight: 700;
  color: var(--text-2); cursor: pointer;
  transition: all .15s;
}
.sample-btn:hover { color: var(--text-0); border-color: var(--line-1); }
.sample-btn.on {
  background: var(--brand-gold-bg); border-color: var(--brand-gold-bd); color: var(--brand-gold);
  box-shadow: inset 0 0 0 1px rgba(245,185,66,0.20);
}

/* Sample tag (analysis phase header) */
.sample-tag {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; margin-bottom: 12px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-2); letter-spacing: 0.05em;
}
.sample-edit {
  background: transparent; border: none; cursor: pointer;
  font-family: var(--f-mono); font-size: 11px; color: var(--brand-gold);
  text-decoration: underline; padding: 0;
}
.sample-edit:hover { color: #ffd278; }

/* 2-column rows */
.ana-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.ana-cell {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px;
}
.ana-cell .lbl { font-family: var(--f-mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.10em; text-transform: uppercase; margin-bottom: 8px; }

/* Form chips (W/D/L) */
.form-strip { display: flex; gap: 5px; }
.form-chip {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 800;
  border: 1px solid transparent;
}
.form-chip.f-w { background: rgba(54,211,153,0.16); color: var(--win); border-color: rgba(54,211,153,0.32); }
.form-chip.f-d { background: rgba(255,255,255,0.06); color: var(--text-2); border-color: var(--line-2); }
.form-chip.f-l { background: rgba(241,90,90,0.14); color: #ff8c8c; border-color: rgba(241,90,90,0.28); }

/* H2H bar */
.h2h-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line-2);
}
.h2h-bar .h2h-w { background: var(--win); }
.h2h-bar .h2h-d { background: #4a5b75; }
.h2h-bar .h2h-l { background: var(--loss); }
.h2h-legend {
  display: flex; gap: 14px; margin-top: 8px;
  font-family: var(--f-mono); font-size: 11px; color: var(--text-2);
}
.h2h-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.h2h-legend .dot-w { background: var(--win); }
.h2h-legend .dot-d { background: #4a5b75; }
.h2h-legend .dot-l { background: var(--loss); }

/* ELO row */
.elo-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.elo-side { text-align: center; }
.elo-v { font-family: var(--f-mono); font-size: 18px; font-weight: 800; color: var(--text-0); }
.elo-side .sub { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.05em; }
.mom {
  font-family: var(--f-mono); font-size: 13px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line-2);
}
.mom.up   { color: var(--win);  background: rgba(54,211,153,0.10); border-color: rgba(54,211,153,0.28); }
.mom.down { color: #ff8c8c; background: rgba(241,90,90,0.10); border-color: rgba(241,90,90,0.28); }

/* Stats grid (5 cells) */
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 10px;
}
.stat-cell {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 8px; text-align: center;
}
.stat-cell .lbl { font-family: var(--f-mono); font-size: 9px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; line-height: 1.3; }
.stat-cell .val { font-family: var(--f-mono); font-size: 20px; font-weight: 800; color: var(--text-0); letter-spacing: -0.01em; }
.stat-cell .val.gold { color: var(--brand-gold); }
.stat-cell .val.small-val { font-size: 13px; }
.stat-cell .val small { font-size: 12px; color: var(--text-3); font-weight: 600; margin-left: 1px; }
.streak-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 800;
}
.streak-badge.up   { background: rgba(54,211,153,0.16); color: var(--win); }
.streak-badge.down { background: rgba(241,90,90,0.14); color: #ff8c8c; }
.stat-cell.streak .val small { font-family: var(--f-mono); font-size: 10px; color: var(--text-2); }

/* Picks block */
.picks-block { margin-bottom: 12px; }
.picks-h {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 2px; margin-bottom: 8px;
}
.picks-h span { font-family: var(--f-ui); font-size: 13px; font-weight: 700; color: var(--text-0); }
.picks-h small { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }

.pick-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 12px 14px; margin-bottom: 6px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px;
}
.pick-row.top {
  background: linear-gradient(180deg, rgba(245,185,66,0.10), rgba(245,185,66,0.02));
  border-color: var(--brand-gold-bd);
}
.pick-rank {
  font-family: var(--f-mono); font-size: 12px; font-weight: 800;
  color: var(--text-3); min-width: 24px;
}
.pick-row.top .pick-rank { color: var(--brand-gold); }
.pick-info { min-width: 0; }
.pick-type { font-family: var(--f-ui); font-size: 14px; font-weight: 700; color: var(--text-0); }
.pick-meta { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.04em; }
.pick-meta b { color: var(--text-1); font-weight: 700; }
.pick-edge {
  font-family: var(--f-mono); font-size: 18px; font-weight: 800; color: var(--text-2);
  letter-spacing: -0.01em;
}
.pick-edge.hot { color: var(--brand-gold); }
.pick-edge small { font-size: 11px; margin-left: 1px; }

/* Mobile compaction */
@media (max-width: 640px) {
  .ana-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cell.streak { grid-column: span 2; }
}


/* ============== SIGNAL QUEUE / HISTORY ============== */

/* Segmented control (Fila / Histórico) */
.seg {
  display: inline-flex; gap: 2px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 2px;
}
.seg-b {
  padding: 6px 12px;
  border: none; cursor: pointer; background: transparent;
  font-family: var(--f-mono); font-size: 11px; font-weight: 700;
  color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 6px;
  transition: all .12s;
}
.seg-b:hover { color: var(--text-1); }
.seg-b.on { background: var(--brand-gold-bg); color: var(--brand-gold); box-shadow: inset 0 0 0 1px rgba(245,185,66,0.20); }

/* Signal row (queue + history) */
.sq-row {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-1);
}
.sq-row.sq-row-2 { grid-template-columns: 64px 1fr; }
.sq-row:last-child { border-bottom: none; }

.sq-time {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  font-family: var(--f-mono); font-size: 14px; font-weight: 800; color: var(--text-0); letter-spacing: -0.01em;
}
.sq-time small { font-size: 9px; color: var(--text-3); font-weight: 600; letter-spacing: 0.10em; }

.sq-info { min-width: 0; }
.sq-match {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-0); font-size: 13px; font-weight: 700; margin-bottom: 4px;
}
.sq-pick { font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); }
.sq-pick b { color: var(--brand-gold); font-weight: 700; }

.sq-res {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 800;
  letter-spacing: 0.05em;
}
.sq-res-green { background: rgba(54,211,153,0.14); color: var(--win); border: 1px solid rgba(54,211,153,0.30); }
.sq-res-red   { background: rgba(241,90,90,0.14); color: #ff8c8c; border: 1px solid rgba(241,90,90,0.28); }

.sq-cta {
  padding: 8px 12px;
  background: var(--brand-blue-bg); border: 1px solid var(--brand-blue-bd);
  color: var(--brand-blue-2); font-family: var(--f-mono); font-size: 11px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 8px; text-decoration: none;
  transition: all .12s;
}
.sq-cta:hover {
  background: var(--brand-gold-bg); border-color: var(--brand-gold-bd); color: var(--brand-gold);
}


/* ============== PLAYER MODAL ============== */

/* Make perf rows clickable */
.perf-row-clickable {
  cursor: pointer;
  margin: 0 -14px; padding-left: 14px; padding-right: 14px;
  border-radius: 8px;
  transition: background .12s;
}
.perf-row-clickable:hover {
  background: var(--brand-gold-bg);
}

/* Player hero (idle phase) */
.player-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 14px; margin-bottom: 16px;
  background: linear-gradient(120deg, rgba(245,185,66,0.08), rgba(53,107,201,0.06));
  border: 1px solid var(--line-2); border-radius: 12px;
}
.ph-av {
  width: 64px; height: 64px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-gold), #c8902d);
  color: #1a1208; font-family: var(--f-ui); font-size: 22px; font-weight: 900;
  box-shadow: 0 4px 14px rgba(245,185,66,0.30);
  flex: none;
}
.ph-info { flex: 1; min-width: 0; }
.ph-name { font-family: var(--f-ui); font-size: 18px; font-weight: 800; color: var(--text-0); }
.ph-team { font-family: var(--f-mono); font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.06em; text-transform: uppercase; }
.ph-meta {
  display: flex; gap: 18px; margin-top: 10px;
}
.ph-meta span { display: flex; flex-direction: column; gap: 1px; }
.ph-meta b {
  font-family: var(--f-mono); font-size: 16px; font-weight: 800; color: var(--brand-gold);
  letter-spacing: -0.01em;
}
.ph-meta small { font-family: var(--f-mono); font-size: 9.5px; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }

/* WR bars (home/away) */
.wr-bar {
  height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden;
  margin-bottom: 6px;
}
.wr-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand-blue-2), var(--brand-gold));
  transition: width .4s;
}
.wr-val {
  font-family: var(--f-mono); font-size: 16px; font-weight: 800; color: var(--text-0);
  letter-spacing: -0.01em;
}

/* Recent matches list */
.recent-block { margin-top: 10px; }
.recent-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 280px; overflow-y: auto;
}
.recent-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 14px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px;
}
.recent-info { min-width: 0; }
.recent-opp { font-family: var(--f-ui); font-size: 13px; color: var(--text-1); }
.recent-opp b { color: var(--text-0); font-weight: 700; }
.recent-meta { font-family: var(--f-mono); font-size: 10px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.04em; }
.recent-score {
  display: flex; align-items: baseline; gap: 4px;
  font-family: var(--f-mono); font-size: 16px; font-weight: 800; color: var(--text-0);
}
.recent-score small { color: var(--text-3); font-weight: 600; }
.recent-score .rs-gf { color: var(--brand-gold); }
.recent-score .rs-ga { color: var(--text-2); }

/* Scrollbar polish for recent list */
.recent-list::-webkit-scrollbar { width: 6px; }
.recent-list::-webkit-scrollbar-track { background: transparent; }
.recent-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.recent-list::-webkit-scrollbar-thumb:hover { background: var(--line-1); }


/* Premia Bet banner override (red rewards palette) */
.afh-banner.premia {
  background: linear-gradient(90deg, rgba(232,38,58,0.18), rgba(232,38,58,0.04));
  border-bottom: 1px solid rgba(232,38,58,0.32);
  color: #ffe4e7;
}
.afh-banner.premia strong { color: #ff6678; font-weight: 800; }
.afh-banner.premia .pulse { background: #e8263a; box-shadow: 0 0 0 0 #e8263a; }
.afh-banner.premia a {
  color: #fff;
  background: linear-gradient(180deg, #e8263a, #b81b2c);
  padding: 4px 12px; border-radius: 6px; margin-left: 6px;
  text-decoration: none; font-weight: 800; letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(232,38,58,0.35);
}
.afh-banner.premia a:hover { transform: translateY(-1px); }


/* =============================================================
   RESPONSIVE — mobile-first refactor (UI/UX Pro Max checklist)
   tokens preservados, dados intactos — só layout/touch
   breakpoints: tablet ≤1024, mobile ≤768, small ≤420
   ============================================================= */

/* iOS: input >=16px evita auto-zoom — já é o default em login */
input, select, textarea { font-size: 16px; }

/* Touch target mínimo 44x44 em controles segmentados/cta */
.seg-b, .sample-btn, .sq-cta, .btn-soft, .btn-mini, .modal-close {
  min-height: 38px;
}
.seg-b { padding: 8px 12px; }

/* ============== TABLET (≤1024px) ============== */
@media (max-width: 1024px) {
  .dash-main { padding: 14px 14px 22px; gap: 14px; }
  .house-frame, .house-iframe { min-height: 520px; }
  .tiles { grid-template-columns: repeat(3, 1fr); padding: 10px 12px; }
  .topbar { padding: 12px 14px; }
  .afh-banner { padding: 8px 14px; font-size: 12px; }
  .modal-body { padding: 16px 18px; }
}

/* ============== MOBILE (≤768px) ============== */
@media (max-width: 768px) {
  /* iframe — economiza scroll, vira CTA compacto */
  .house-frame, .house-iframe { min-height: 320px; }

  .dash-main {
    grid-template-columns: 1fr;
    padding: 10px 10px 80px;
    gap: 12px;
  }

  /* Topbar empilha */
  .topbar {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 8px;
  }
  .brand-mark { width: 30px; height: 30px; font-size: 13px; }
  .brand-name { font-size: 13px; }
  .brand-sub  { font-size: 9px; }
  .top-actions { flex-wrap: wrap; gap: 6px; width: 100%; justify-content: flex-end; }
  .btn-soft { padding: 8px 10px; font-size: 11px; }
  .user-chip { padding: 4px 8px; }
  .user-av { width: 26px; height: 26px; font-size: 11px; }
  .user-id { font-size: 11px; }
  .user-bal { font-size: 9px; }

  /* Banner premia — quebra linha ao invés de cortar */
  .afh-banner {
    padding: 8px 12px; font-size: 11px; line-height: 1.45;
    flex-wrap: wrap;
  }
  .afh-banner a { display: inline-block; margin-top: 4px; }

  /* Cards — gap menor, padding interno mais apertado */
  .card-h { padding: 12px 12px 8px; }
  .card-body { padding: 4px 12px 12px; }
  .card-t { font-size: 13px; }
  .card-sub { font-size: 11px; }

  /* Tiles — números grandes mas grid mantém 3col */
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px 12px; }
  .tile  { padding: 8px 6px; }
  .tile-k { font-size: 8px; margin-bottom: 4px; letter-spacing: 0.06em; }
  .tile-v { font-size: 14px; }
  .tile-d { font-size: 9px; }

  /* Match row — empilha info, time vira chip */
  .match-row {
    grid-template-columns: 56px 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  .match-row .match-cta { grid-column: 1 / -1; justify-self: stretch; }
  .match-row .match-cta .btn-mini { width: 100%; min-height: 38px; }
  .match-time { font-size: 13px; }
  .match-players { font-size: 13px; flex-wrap: wrap; }
  .match-meta    { font-size: 10.5px; flex-wrap: wrap; gap: 6px; }

  /* Signal queue / history — touch friendly */
  .sq-row {
    grid-template-columns: 56px 1fr auto;
    padding: 10px 12px;
    gap: 10px;
  }
  .sq-row.sq-row-2 { grid-template-columns: 56px 1fr; }
  .sq-time { font-size: 13px; }
  .sq-match { font-size: 12.5px; flex-wrap: wrap; gap: 6px; }
  .sq-pick  { font-size: 10.5px; }
  .sq-cta   { padding: 8px 10px; font-size: 10.5px; min-height: 38px; }

  /* Performance row */
  .perf-row { grid-template-columns: 28px 1fr 44px; padding: 10px 0; }
  .perf-row-clickable { padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
  .perf-name  { font-size: 13px; }
  .perf-meta  { font-size: 10.5px; }
  .perf-wr    { font-size: 12px; }

  /* Filtro de ligas — quebra linha, botões respiram */
  .seg { flex-wrap: wrap; }
  .seg-b { padding: 9px 10px; font-size: 10.5px; min-height: 40px; }

  /* Paginação histórico */
  .sq-pager .seg-b { flex: 1; min-width: 0; }

  /* Modais — full-screen */
  .modal-bg { padding: 0; align-items: stretch; justify-content: stretch; }
  .modal, .modal.modal-wide {
    width: 100%; max-width: none;
    height: 100dvh; max-height: 100dvh;
    border-radius: 0;
    margin: 0;
    overflow-y: auto;
  }
  .modal-head { padding: 14px 16px 12px; position: sticky; top: 0; background: inherit; z-index: 2; }
  .modal-head h3 { font-size: 15px; }
  .modal-body { padding: 14px 16px 24px; }
  .modal-close { font-size: 26px; padding: 8px; min-width: 40px; min-height: 40px; }

  .ana-row { grid-template-columns: 1fr; gap: 10px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-cell.streak { grid-column: span 2; }

  .sample-btn { min-width: 48px; min-height: 40px; }
  .btn-generate, .btn-primary { min-height: 48px; font-size: 14px; }

  .pick-row { padding: 10px; gap: 8px; }
  .pick-info { min-width: 0; }
  .pick-meta { white-space: normal; word-break: break-word; }

  /* Footer — empilha conteúdo */
  .foot {
    flex-direction: column;
    gap: 8px;
    padding: 14px 12px 24px;
    text-align: center;
  }
}

/* ============== SMALL MOBILE (≤420px) ============== */
@media (max-width: 420px) {
  .dash-main { padding: 8px 8px 60px; }
  .tiles { gap: 4px; padding: 6px 10px; }
  .tile  { padding: 6px 4px; }
  .tile-k { font-size: 7px; }
  .tile-v { font-size: 13px; }
  .brand-name { font-size: 12px; }
  .top-actions { gap: 4px; }
  .btn-soft { font-size: 10px; padding: 6px 8px; }
  .user-chip { gap: 6px; }

  /* Iframe é menor ainda — só mostra o CTA */
  .house-frame, .house-iframe { min-height: 240px; }

  /* Tiles row — em telas muito estreitas vira 2 cols + 1 abaixo */
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile:last-child { grid-column: 1 / -1; }
}

/* ============== Reduced motion (a11y) ============== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .pulse, .loading-dots i { animation: none !important; }
}

/* ============== Safe-area (iOS notch / Android gesture bar) ============== */
@supports (padding: max(0px)) {
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
  .foot   { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .dash-main { padding-bottom: max(80px, env(safe-area-inset-bottom)); }
  .modal-head { padding-top: max(14px, env(safe-area-inset-top)); }
  .modal-body { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}


/* ============== LOGIN — responsive ============== */
@media (max-width: 768px) {
  .login-stage { padding: 16px 12px; min-height: 100dvh; }
  .login-card {
    grid-template-columns: 1fr;     /* empilha left/right */
    border-radius: 14px;
    width: 100%;
  }
  /* form vai pra cima nos mobiles (mais ação primária) */
  .login-side { padding: 24px 20px; }
  .login-side.left {
    border-right: none;
    border-top: 1px solid var(--line-1);
    order: 2;
  }
  .login-side:not(.left) { order: 1; }

  .login-h1 { font-size: 20px; }
  .login-h2 { font-size: 20px; }
  .login-sub { font-size: 13px; max-width: none; margin-bottom: 18px; }
  .login-cap { font-size: 12.5px; margin-bottom: 16px; }

  .steps { gap: 12px; }
  .step  { gap: 12px; }
  .step-num { width: 28px; height: 28px; font-size: 13px; }
  .step-title { font-size: 14px; }
  .step-body  { font-size: 12.5px; }

  .notice { padding: 10px 12px; font-size: 12px; }

  .field-l > label { font-size: 12.5px; }
  .field-l > input { padding: 12px 14px; font-size: 16px; min-height: 48px; } /* 16px evita zoom iOS */
  .checkrow { font-size: 12px; }
  .btn-primary { min-height: 50px; font-size: 14px; }
  .login-foot { font-size: 12.5px; }
  .login-err  { font-size: 11.5px; }
}

@media (max-width: 420px) {
  .login-stage { padding: 10px 8px; }
  .login-side  { padding: 20px 16px; }
  .login-h1, .login-h2 { font-size: 18px; }
  .step-num { width: 26px; height: 26px; font-size: 12px; }
}


/* Topbar sticky com hide-on-scroll-down */
.topbar.topbar-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: transform 0.28s ease, opacity 0.18s ease;
  will-change: transform;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-1);
}
.topbar.topbar-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}


/* tile-v cor pra ROI negativo (estava sem regra) */
.tile-v.red { color: #ff8c8c; }
