/* ====================== DESIGN SYSTEM ====================== */
:root {
  --bg: #0a0e17;
  --bg-2: #0e1320;
  --surface: #141a28;
  --surface-2: #1a2233;
  --surface-3: #212b40;
  --border: #26314a;
  --border-soft: #1d2638;
  --text: #e8edf6;
  --text-2: #97a3bd;
  --text-3: #5e6a85;

  --brand: #f5a524;
  --brand-2: #ffce6b;
  --accent: #2dd4a7;
  --accent-dim: rgba(45, 212, 167, .12);
  --blue: #4d8bff;
  --purple: #9d7bff;
  --red: #ff5d6c;
  --amber: #ffb340;
  --green: #2dd4a7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Sora', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 80% -10%, #16203a 0%, transparent 55%),
              radial-gradient(900px 500px at -10% 110%, #1a1430 0%, transparent 50%),
              var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; }
input { font-family: inherit; }

/* ====================== LOGIN ====================== */
.login-screen {
  min-height: 100vh; display: grid; place-items: center; position: relative; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(245,165,36,.10), transparent 60%),
    conic-gradient(from 180deg at 50% 50%, rgba(77,139,255,.05), rgba(157,123,255,.05), rgba(45,212,167,.05), rgba(245,165,36,.05), rgba(77,139,255,.05));
  filter: blur(40px); opacity: .8;
}
.login-card {
  position: relative; z-index: 1; width: min(400px, 92vw);
  background: linear-gradient(180deg, rgba(26,34,51,.9), rgba(20,26,40,.95));
  border: 1px solid var(--border); border-radius: 24px; padding: 40px 34px;
  box-shadow: var(--shadow); backdrop-filter: blur(20px);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.logo-mark {
  width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center;
  font-size: 34px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #d98316);
  box-shadow: 0 8px 24px rgba(245,165,36,.35);
}
.logo-mark.sm { width: 38px; height: 38px; font-size: 20px; border-radius: 11px; margin: 0; }
.login-brand h1 { font-family: var(--font-head); font-size: 22px; letter-spacing: -.02em; }
.login-brand p { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; flex-direction: column; gap: 7px; text-transform: uppercase; letter-spacing: .04em; }
.login-form input {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; color: var(--text); font-size: 14px; transition: .15s;
}
.login-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245,165,36,.15); }
.login-error { color: var(--red); font-size: 13px; text-align: center; min-height: 18px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #e08b13); color: #1a1206;
  font-weight: 700; padding: 13px; border-radius: var(--radius-sm); font-size: 15px;
  transition: .15s; box-shadow: 0 6px 18px rgba(245,165,36,.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(245,165,36,.4); }
.btn-primary:active { transform: translateY(0); }

/* ====================== APP LAYOUT ====================== */
.app { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand-text { font-family: var(--font-head); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.brand-text strong { color: var(--brand); }
.sport-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
.sport-nav::-webkit-scrollbar { width: 6px; }
.sport-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.nav-group-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3); padding: 14px 10px 6px; display: flex; align-items: center; gap: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; background: none; width: 100%; text-align: left;
  transition: .12s;
}
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: linear-gradient(135deg, rgba(245,165,36,.16), rgba(245,165,36,.06)); color: var(--brand-2); font-weight: 600; }
.nav-item .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.sidebar-foot { border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 8px; }
.user-chip { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--purple), var(--blue)); color: #fff; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--text-3); text-transform: capitalize; }
.btn-ghost { width: 100%; background: var(--surface); color: var(--text-2); padding: 9px; border-radius: 9px; font-size: 13px; font-weight: 600; transition: .12s; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* Content */
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 28px; border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 20;
  background: rgba(10,14,23,.82); backdrop-filter: blur(14px);
}
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title h2 { font-family: var(--font-head); font-size: 20px; letter-spacing: -.02em; }
.cat-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-picker { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.date-nav { background: none; color: var(--text-2); width: 30px; height: 30px; border-radius: 7px; font-size: 18px; transition: .12s; }
.date-nav:hover { background: var(--surface-2); color: var(--text); }
.date-picker input { background: none; border: none; color: var(--text); font-size: 13px; padding: 6px; color-scheme: dark; }
.date-picker input:focus { outline: none; }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 9px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; transition: .12s; }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--brand); }

/* ====================== SUMMARY BAR ====================== */
.summary-bar { display: flex; gap: 12px; padding: 18px 28px 0; flex-wrap: wrap; }
.stat-pill { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 16px; min-width: 130px; }
.stat-pill .k { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat-pill .v { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin-top: 2px; }
.stat-pill .v.accent { color: var(--accent); }
.stat-pill .v.brand { color: var(--brand); }

/* ====================== GAMES ====================== */
.games-area { padding: 22px 28px 60px; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 18px; }

.placeholder { text-align: center; padding: 90px 20px; color: var(--text-3); }
.placeholder-icon { font-size: 48px; margin-bottom: 14px; opacity: .6; }
.placeholder h3 { font-family: var(--font-head); color: var(--text-2); font-size: 18px; margin-bottom: 6px; }
.placeholder p { max-width: 380px; margin: 0 auto; font-size: 14px; }

/* Card */
.game-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: .18s; position: relative;
}
.game-card:hover { border-color: var(--border); transform: translateY(-2px); box-shadow: var(--shadow); }
.game-card.value-high { border-left: 3px solid var(--accent); }

.gc-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); gap: 10px; }
.gc-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gc-sport { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.gc-est-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(139,124,246,.15); color: #b5a8ff; white-space: nowrap;
}
.gc-status { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.gc-status.live { background: rgba(255,93,108,.15); color: var(--red); }
.gc-status.final { background: rgba(45,212,167,.12); color: var(--accent); }

/* Teams */
.gc-teams { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.team-row { display: flex; align-items: center; gap: 12px; }
.team-row .code { width: 44px; font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--text-2); }
.team-row .name { flex: 1; font-weight: 600; font-size: 14.5px; }
.team-row .name.pick { color: var(--brand-2); }
.team-row .winexp { font-size: 12px; color: var(--text-2); font-weight: 600; min-width: 46px; text-align: right; }
.team-row .score { font-family: var(--font-head); font-size: 20px; font-weight: 700; min-width: 30px; text-align: right; }
.pick-tag { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 5px; background: rgba(245,165,36,.18); color: var(--brand); letter-spacing: .04em; }

/* Prob bar */
.prob-bar { height: 16px; border-radius: 8px; background: var(--surface-3); overflow: hidden; display: flex; margin: 2px 0 4px; }
.prob-bar .away { background: linear-gradient(90deg, var(--blue), #6ea0ff); }
.prob-bar > div { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.prob-bar > div span { font-size: 10px; font-weight: 700; color: #0b1220; padding: 0 7px; white-space: nowrap; }
.prob-bar .home { justify-content: flex-end; }
.prob-bar .home { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

/* Pick + confidence */
.gc-pick { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--bg-2); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.conf-badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.conf-alta { background: rgba(45,212,167,.16); color: var(--green); }
.conf-média, .conf-media { background: rgba(255,179,64,.16); color: var(--amber); }
.conf-baixa { background: var(--surface-3); color: var(--text-2); }
.gc-pick .label { font-size: 12.5px; color: var(--text-2); }
.gc-pick .label b { color: var(--text); }

/* Odds row */
.gc-odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border-soft); }
.odd-cell { background: var(--surface); padding: 10px 8px; text-align: center; }
.odd-cell .k { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.odd-cell .v { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin-top: 3px; }
.odd-cell .sub { font-size: 10px; color: var(--text-3); }

/* Recommendations */
.gc-recs { padding: 12px 16px; display: flex; flex-direction: column; gap: 7px; }
.rec-chip { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-soft); }
.rec-chip.ml { border-color: rgba(45,212,167,.3); background: linear-gradient(135deg, rgba(45,212,167,.08), transparent); }
.rec-type { font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.rec-type.moneyline { background: rgba(45,212,167,.18); color: var(--green); }
.rec-type.spread { background: rgba(77,139,255,.18); color: var(--blue); }
.rec-type.total { background: rgba(157,123,255,.18); color: var(--purple); }
.rec-main { flex: 1; min-width: 0; }
.rec-main .l { font-size: 13px; font-weight: 700; }
.rec-main .d { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.rec-edge { font-family: var(--font-head); font-size: 14px; font-weight: 800; color: var(--accent); }

.no-recs { padding: 11px 16px; font-size: 12px; color: var(--text-3); text-align: center; }

/* Expanders */
.gc-foot { border-top: 1px solid var(--border-soft); }
.expander > summary { list-style: none; cursor: pointer; padding: 11px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; transition: .12s; }
.expander > summary::-webkit-details-marker { display: none; }
.expander > summary:hover { color: var(--text); background: var(--surface); }
.expander > summary .chev { transition: .2s; color: var(--text-3); }
.expander[open] > summary .chev { transform: rotate(90deg); }
.expander-body { padding: 4px 16px 16px; }

/* Factor breakdown */
.factor-team { margin-bottom: 14px; }
.factor-team h5 { font-size: 12px; font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; }
.factor-team h5 .tot { color: var(--brand); font-family: var(--font-head); }
.factor { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.factor:last-child { border: none; }
.factor .fl { flex: 1; }
.factor .fl b { font-size: 12px; }
.factor .fl span { display: block; font-size: 11px; color: var(--text-3); }
.factor .fp { font-family: var(--font-head); font-weight: 700; font-size: 13px; }
.factor .fp.pos { color: var(--accent); }
.factor .fp.neg { color: var(--red); }
.kind-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }

/* AI preview */
.ai-text { font-size: 13px; color: var(--text-2); line-height: 1.7; white-space: pre-wrap; max-height: 320px; overflow-y: auto; padding-right: 6px; }
.ai-text::-webkit-scrollbar { width: 6px; } .ai-text::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.pitchers { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pitcher-chip { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 9px; padding: 7px 11px; font-size: 12px; }
.pitcher-chip b { display: block; } .pitcher-chip span { color: var(--text-3); font-size: 11px; }

/* Projected boxscore */
.box-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 14px; }
.box-table caption { text-align: left; font-weight: 700; font-size: 12px; padding: 6px 0; color: var(--text-2); }
.box-table th { text-align: right; color: var(--text-3); font-weight: 600; font-size: 10px; text-transform: uppercase; padding: 4px 6px; border-bottom: 1px solid var(--border-soft); }
.box-table th:first-child { text-align: left; }
.box-table td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--border-soft); }
.box-table td:first-child { text-align: left; font-weight: 600; }
.box-note { font-size: 11px; color: var(--text-3); }

/* Loading */
.loading { display: grid; place-items: center; padding: 80px; }
.spinner { width: 38px; height: 38px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { color: var(--text-3); font-size: 13px; margin-top: 14px; }

/* ====================== MODAL ====================== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(5,8,14,.7); backdrop-filter: blur(6px); padding: 20px; }
.modal-card { width: min(680px, 96vw); max-height: 86vh; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-head h3 { font-family: var(--font-head); font-size: 17px; }
.modal-close { background: var(--surface-2); color: var(--text-2); width: 32px; height: 32px; border-radius: 9px; font-size: 22px; line-height: 1; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { overflow-y: auto; padding: 16px 22px 22px; }
.bb-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); }
.bb-rank { font-family: var(--font-head); font-size: 16px; font-weight: 800; color: var(--text-3); width: 26px; }
.bb-info { flex: 1; min-width: 0; }
.bb-info .m { font-size: 14px; font-weight: 700; }
.bb-info .d { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.bb-info .s { font-size: 11px; color: var(--text-2); margin-top: 3px; }
.bb-edge { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--accent); text-align: right; }
.bb-edge small { display: block; font-size: 10px; color: var(--text-3); font-weight: 600; }

/* ====================== TOAST ====================== */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--border); color: var(--text); padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); z-index: 60; }
.toast.err { border-color: var(--red); color: var(--red); }

/* ====================== RESPONSIVO ====================== */
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; z-index: 40; width: 256px; transition: .25s; }
  .sidebar.open { left: 0; }
  .games-grid { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
}

/* ====================== ADMINISTRAÇÃO ====================== */
.admin-form { border-bottom: 1px solid var(--border-soft); padding-bottom: 18px; margin-bottom: 18px; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 14px; }
.admin-form-grid label {
  font-size: 12px; font-weight: 600; color: var(--text-2); display: flex; flex-direction: column;
  gap: 7px; text-transform: uppercase; letter-spacing: .04em;
}
.admin-form-grid .hint { text-transform: none; font-weight: 500; color: var(--text-3); letter-spacing: 0; font-size: 11px; }
.admin-form-grid input, .admin-form-grid select {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; color: var(--text); font-size: 14px; transition: .15s;
}
.admin-form-grid input:focus, .admin-form-grid select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(245,165,36,.15);
}
.admin-form-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.admin-form-actions .btn-ghost { width: auto; padding: 9px 16px; }
.admin-form-actions .btn-primary { padding: 11px 20px; }

.admin-table th:last-child, .admin-table td:last-child { text-align: right; }
.au-name { font-weight: 700; font-size: 13px; }
.au-email { color: var(--text-3); font-size: 11px; margin-top: 2px; }
.au-actions { display: flex; gap: 6px; justify-content: flex-end; }

.role-badge, .status-badge {
  font-size: 10px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.role-admin { background: rgba(245,165,36,.16); color: var(--brand); }
.role-viewer { background: var(--surface-3); color: var(--text-2); }
.status-active { background: rgba(45,212,167,.16); color: var(--green); }
.status-inactive { background: rgba(255,93,108,.16); color: var(--red); }

.icon-btn {
  background: var(--surface-2); color: var(--text-2); width: 30px; height: 30px;
  border-radius: 8px; font-size: 13px; transition: .12s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: rgba(255,93,108,.16); color: var(--red); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:disabled:hover { background: var(--surface-2); color: var(--text-2); }

@media (max-width: 640px) {
  .admin-form-grid { grid-template-columns: 1fr; }
}

.elo-chip { display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 600; color: var(--text-3, #7a869f); letter-spacing: .2px; white-space: nowrap; }
.elo-chip .up { color: #2dd4a7; font-style: normal; }
.elo-chip .down { color: #ff5d6c; font-style: normal; }
.agree-chip { margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 10px; white-space: nowrap; cursor: help; }
.agree-chip.all { background: rgba(45,212,167,.15); color: #2dd4a7; }
.agree-chip.mid { background: rgba(255,179,64,.15); color: #ffb340; }
.agree-chip.low { background: rgba(255,93,108,.15); color: #ff5d6c; }

.bb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; background: var(--surface, var(--bg-2)); z-index: 1; }
.bb-chip { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border-soft); border-radius: 14px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; }
.bb-chip b { color: var(--text-3); margin-left: 3px; }
.bb-chip.on { background: rgba(245,165,36,.15); color: #f5a524; border-color: #f5a524; }
.bb-item { cursor: pointer; }
.bb-agree { font-size: 10px; color: var(--text-3); font-weight: 700; margin-left: 4px; }
.bb-suspect { font-size: 9px; color: #ff5d6c; font-weight: 700; margin-left: 4px; }
.bb-note { font-size: 11.5px; color: var(--text-2); background: rgba(255,179,64,.08); border: 1px solid rgba(255,179,64,.25); border-radius: 8px; padding: 8px 10px; margin: 10px 0 2px; }
.bb-note a { color: #ffb340; }

/* ====================== BACKTEST ====================== */
.bt-card { width: min(980px, 96vw); }
.bt-grid { grid-template-columns: repeat(3, 1fr); }
.bt-label { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.bt-datasets { margin-bottom: 16px; }
.bt-datasets code, .bb-note code { background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }
.bt-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0; }
.bt-kpi { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 11px 12px; }
.bt-kpi span { display: block; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.bt-kpi b { display: block; font-family: var(--font-head); font-size: 20px; margin-top: 3px; }
.bt-kpi small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 3px; line-height: 1.35; }
.bt-block { margin-top: 18px; }
.bt-block h4 { font-size: 13px; margin: 0 0 8px; color: var(--text-2); }
.bt-block h5 { font-size: 12px; margin: 0 0 4px; color: var(--text-3); }
.bt-block .hint { font-size: 11.5px; color: var(--text-3); }
.bt-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bt-split .bt-kpis { grid-template-columns: repeat(2, 1fr); margin: 6px 0; }
.bt-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bt-table th { text-align: right; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--border); font-weight: 600; }
.bt-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--border-soft); }
.bt-table th:first-child, .bt-table td:first-child { text-align: left; }
.bt-table tr.small td { opacity: .55; }
.bt-table .pos, .bt-kpi .pos { color: #2dd4a7; }
.bt-table .neg, .bt-kpi .neg { color: #ff5d6c; }
.bt-eq { width: 100%; height: 150px; color: var(--text-2); background: var(--bg-2); border-radius: 10px; }
.bt-eq-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); margin-top: 4px; }
details.bt-block summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 600; }
@media (max-width: 760px) { .bt-grid { grid-template-columns: 1fr 1fr; } .bt-kpis { grid-template-columns: repeat(2, 1fr); } .bt-split { grid-template-columns: 1fr; } }

.bt-credits { font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.bt-link { background: none; border: 0; color: var(--brand-2, #ffb340); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0 0 0 6px; }

.bt-check { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); margin: 0 0 12px; cursor: pointer; }
.bt-check input { width: auto; }

/* ===== Backtest: abas, criador de filtros, regras salvas, sinais ===== */
.bt-tabs { display: flex; gap: 6px; padding: 0 22px; border-bottom: 1px solid var(--border-soft); overflow-x: auto; }
.bt-tabs button { background: none; border: 0; color: var(--text-3); font: inherit; font-size: 13px; font-weight: 600; padding: 11px 12px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.bt-tabs button.on { color: var(--text); border-bottom-color: var(--brand-2, #ffb340); }
.bt-badge:not(:empty) { background: var(--bg-2); border-radius: 9px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.bt-source { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 12px; }
.bt-source select { margin-top: 4px; }
.bt-chips { position: static !important; border: 0 !important; padding: 0 0 10px !important; background: none !important; flex-wrap: wrap; }
.bt-summary { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; color: var(--text-2); margin: 4px 0 12px; line-height: 1.5; }
.bt-save { display: flex; gap: 8px; margin-bottom: 12px; }
.bt-save input { flex: 1; min-width: 0; }
.bt-intro { margin: 0 0 12px; }
.bt-rule { display: flex; gap: 12px; justify-content: space-between; align-items: center; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.bt-rule-main { min-width: 0; flex: 1; }
.bt-rule-pick { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.bt-rule-pick input { width: auto; }
.bt-rule-desc { font-size: 12px; color: var(--text-2); margin: 4px 0 2px 24px; line-height: 1.45; }
.bt-rule-last { font-size: 12px; margin-left: 24px; color: var(--text-2); }
.bt-rule-last .pos, .bt-sig-table .pos, .bt-compare-out .pos { color: #2dd4a7; }
.bt-rule-last .neg, .bt-sig-table .neg { color: #ff5d6c; }
.bt-rule-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.bt-rule-actions .btn-ghost { padding: 6px 10px; font-size: 12px; }
.bt-switch { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.bt-switch input { width: auto; }
.bt-compare-bar { display: flex; gap: 12px; align-items: flex-end; margin: 14px 0; flex-wrap: wrap; }
.bt-compare-bar label { font-size: 12px; color: var(--text-2); display: block; }
.bt-tested { margin-top: 14px; }
.bt-sig-table td, .bt-sig-table th { white-space: nowrap; }
.bt-sig-table td:nth-child(3), .bt-sig-table td:nth-child(8) { white-space: normal; }
#bt-sig-out, #bt-compare-out { overflow-x: auto; }
@media (max-width: 760px) { .bt-rule { flex-direction: column; align-items: stretch; } .bt-tabs { padding: 0 12px; } }

/* barra de ações fixa no rodapé do criador (nome + salvar + rodar sempre visíveis) */
.bt-actionbar { position: sticky; bottom: -22px; margin: 6px -22px -22px; padding: 12px 22px 14px; background: var(--surface); border-top: 1px solid var(--border-soft); z-index: 3; }
.bt-actionbar .bt-save { margin-bottom: 8px; }
.bt-actionbar .login-error { margin: 6px 0 0; min-height: 0; }
.bt-run-row { display: flex; gap: 8px; justify-content: flex-end; }
.mf-title { font-size: 14px; margin: 18px 0 10px; }
.mf-reason { color: var(--text-3); }
.mf-ok { color: #2dd4a7; font-weight: 600; }

/* previsão própria (modelo experimental) */
.gc-model { padding: 10px 16px 12px; border-bottom: 1px solid var(--border-soft); background: var(--bg-2); }
.gm-head { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.gm-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--border); color: var(--text-3, var(--text-2)); }
.gm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gm-cell .k { font-size: 10.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: .03em; }
.gm-cell .v { font-size: 13px; font-weight: 600; color: var(--text); }
.gm-cell .sub { font-size: 11px; color: var(--text-2); }
.gm-vs { margin-top: 8px; font-size: 12.5px; color: var(--text); }
.gm-z { color: var(--text-2); }
.gm-note { margin-top: 6px; font-size: 11px; color: var(--text-2); }
@media (max-width: 520px) { .gm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ao vivo */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 6px; vertical-align: middle; animation: livepulse 1.4s ease-in-out infinite; }
@keyframes livepulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.game-card.is-live { border-color: rgba(255,93,108,.45); }
.gc-live-note { padding: 8px 16px; font-size: 12px; color: var(--text-2); background: rgba(255,93,108,.07); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.live-filter { margin-left: auto; align-self: center; font: inherit; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,93,108,.5); background: transparent; color: var(--text); cursor: pointer; }
.live-filter b { color: var(--red); margin-left: 4px; }
.live-filter.on { background: rgba(255,93,108,.15); }
.live-filter:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* análises IA */
.an-card { width: min(1100px, 96vw); }
.an-bar { flex-wrap: wrap; gap: 12px; align-items: end; }
.an-bar select, .an-bar input { min-width: 150px; }
.an-games-head { display: flex; gap: 14px; align-items: center; padding: 10px 0; }
.an-game { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; flex-wrap: wrap; }
.an-actions { display: flex; gap: 12px; align-items: center; padding: 12px 0; flex-wrap: wrap; }
.an-view-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; flex-wrap: wrap; }
#an-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 12px; background: #0e0e1a; }
.an-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.an-item .hint { margin-left: 6px; }

.an-fresh { font-size: 12.5px; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }

/* ---- Notícias do jogo ---- */
.news-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer; text-align: left; }
.news-btn:hover { background: var(--surface-3); }
.news-card { width: min(980px, 96vw); }
.news-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.news-col h4, .news-game h4 { font-family: var(--font-head); font-size: 14px; margin-bottom: 8px; color: var(--text-2); }
.news-game { margin-bottom: 16px; }
.news-item { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-2); }
.news-item.alert { border-left: 3px solid #e8a33d; }
.news-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.news-flag { color: #e8a33d; font-weight: 600; }
.news-h { font-size: 14px; line-height: 1.4; }
.news-h a { color: var(--text); text-decoration: none; } .news-h a:hover { text-decoration: underline; }
.news-s { font-size: 12.5px; color: var(--text-2); margin-top: 4px; line-height: 1.45; }
.news-foot { margin-top: 12px; }
@media (max-width: 760px) { .news-cols { grid-template-columns: 1fr; } }

/* ---- Busca por time ---- */
.team-search { display: flex; align-items: center; gap: 10px; align-self: center; }
.team-search.push { margin-left: auto; }
.team-search input { font: inherit; font-size: 13px; width: 200px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.team-search input:focus { outline: 2px solid var(--brand, #4da3ff); outline-offset: 1px; }
.team-count { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.live-filter + .team-search { margin-left: 0; }
@media (max-width: 760px) { .team-search { width: 100%; } .team-search input { flex: 1; width: auto; } }

/* ---- Compartilhar ---- */
.share-card { width: min(640px, 96vw); }
.share-bar { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.share-chk { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.share-preview { display: grid; place-items: center; background: #0a0a14; border-radius: 12px; padding: 10px; }
.share-preview canvas { max-width: 100%; max-height: 60vh; width: auto; height: auto; border-radius: 8px; }
.share-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.day-share { align-self: center; }

/* ---- Props de jogadores ---- */
.props-card { width: min(1180px, 97vw); }
.props-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.props-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.props-seg button { background: var(--surface-2); color: var(--text-2); padding: 8px 14px; font-size: 13px; border: 0; cursor: pointer; }
.props-seg button.on { background: var(--brand, #4da3ff); color: #06101c; font-weight: 700; }
.props-wrap { overflow-x: auto; }
.props-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.props-table th { text-align: left; font-size: 11px; color: var(--text-2); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.props-table td { padding: 7px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; white-space: nowrap; }
.props-table .pn b { display: block; font-weight: 600; } .props-table .pn span { font-size: 11px; color: var(--text-2); }
.props-table .sub { display: block; font-size: 10.5px; color: var(--text-2); }
.props-table input { width: 64px; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.lastv { max-width: 330px; overflow: hidden; }
.lastv i { display: inline-block; font-style: normal; min-width: 20px; text-align: center; padding: 1px 4px; margin-right: 3px; border-radius: 5px; font-size: 11.5px; background: var(--surface-2); }
.lastv i.o { background: rgba(46,204,113,.22); color: #6fe0a0; } .lastv i.u { background: rgba(231,76,60,.18); color: #f1948a; }
.props-table td.hi { color: #4dd07a; font-weight: 700; } .props-table td.lo { color: #f1948a; font-weight: 700; }
.props-foot { margin-top: 12px; line-height: 1.5; }

.props-warn { color: #e8a33d; margin: 4px 0 10px; line-height: 1.5; }

/* ====================== MOBILE (gaveta, topbar, modais, toques) ====================== */
.menu-btn, .sidebar-close, .sidebar-backdrop { display: none; }
.lbl-short { display: none; }

@media (max-width: 920px) {
  body { overflow-x: clip; }
  .menu-btn {
    display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 22px; line-height: 1;
  }
  .sidebar-close { display: grid; place-items: center; margin-left: auto; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 24px; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(5,8,14,.65); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
  .sidebar {
    left: -300px; width: min(290px, 84vw); height: 100vh; height: 100dvh; z-index: 45;
    padding: calc(16px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
    box-shadow: 8px 0 30px rgba(0,0,0,.45);
  }
  .sidebar.open { left: 0; }
  .nav-item { padding: 12px 12px; font-size: 15px; min-height: 44px; }
  .btn-ghost { padding: 12px; font-size: 14px; min-height: 44px; }
  .sidebar-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .sidebar-foot .user-chip { grid-column: 1 / -1; margin-bottom: 2px; }

  .topbar {
    display: grid; grid-template-columns: 1fr; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  }
  .topbar-title { gap: 10px; min-width: 0; }
  .topbar-title h2 { font-size: 18px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cat-badge { font-size: 10px; padding: 3px 8px; white-space: nowrap; }
  .topbar-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
  .date-picker { min-width: 0; justify-content: space-between; }
  .date-picker input { flex: 1; min-width: 0; font-size: 16px; text-align: center; }
  .date-nav { width: 40px; height: 40px; font-size: 22px; }
  .topbar-actions .btn-secondary { min-height: 46px; padding: 0 12px; }
  .lbl-full { display: none; } .lbl-short { display: inline; }

  .summary-bar { padding: 12px 14px 0; gap: 8px; display: grid; grid-template-columns: 1fr 1fr; }
  .stat-pill { min-width: 0; padding: 10px 12px; }
  .stat-pill .v { font-size: 19px; }
  .summary-bar .live-filter, .summary-bar .day-share, .summary-bar .team-search { grid-column: 1 / -1; margin-left: 0; width: 100%; }
  .summary-bar .live-filter, .summary-bar .day-share { min-height: 44px; justify-content: center; }
  .team-search { width: 100%; }
  .team-search input { flex: 1; width: auto; min-height: 44px; font-size: 16px; }

  .games-area { padding: 12px 12px calc(60px + env(safe-area-inset-bottom)); }
  .games-grid { gap: 12px; }
  .game-card:hover { transform: none; }
  .gc-head { padding: 11px 12px; flex-wrap: wrap; }
  .gc-teams { padding: 12px; }
  .team-row { gap: 8px; }
  .team-row .code { width: 38px; }
  .team-row .name { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
  .gc-pick, .gc-recs, .gc-model, .gc-live-note, .no-recs { padding-left: 12px; padding-right: 12px; }
  .expander > summary { padding: 14px 12px; font-size: 13.5px; min-height: 44px; }
  .expander-body { padding: 4px 12px 14px; }
  .gc-foot { display: flex; flex-wrap: wrap; }
  .gc-foot .news-btn, .news-btn { min-height: 44px; font-size: 13px; }
  .odd-cell { padding: 10px 4px; }
  .odd-cell .v { font-size: 13px; }

  .toast { width: calc(100vw - 28px); max-width: 480px; bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; }
  .login-form input, .admin-form-grid input, .admin-form-grid select, .an-bar select, .an-bar input,
  .modal input, .modal select, .modal textarea { font-size: 16px; }
}

@media (max-width: 640px) {
  /* modais viram tela cheia (folha) */
  .modal { padding: 0; place-items: stretch; }
  .modal-card, .an-card, .bt-card, .news-card, .props-card, .share-card, .team-card {
    width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: none;
  }
  .modal-head { padding: calc(12px + env(safe-area-inset-top)) 14px 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; gap: 10px; }
  .modal-head h3 { font-size: 15px; line-height: 1.25; min-width: 0; }
  .modal-close { width: 44px; height: 44px; flex: none; font-size: 26px; }
  .modal-body { padding: 12px 14px calc(24px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
  .admin-table, .props-wrap, .bt-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .share-bar, .an-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .an-bar select, .an-bar input { min-width: 0; width: 100%; min-height: 44px; }
  .news-item { padding: 10px; }
  .props-wrap { margin: 0 -14px; padding: 0 14px; }
  .login-card { width: calc(100vw - 28px); padding: 24px 18px; }
}
@media (max-width: 640px) {
  .modal-body table, .expander-body table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .modal-body table caption { white-space: normal; }
  .props-bar, .props-seg { flex-wrap: wrap; }
}
@media (max-width: 920px) {
  .gc-foot { gap: 8px; padding: 10px 12px 0; }
  .gc-foot > .expander { flex: 0 0 100%; margin: 0 -12px; }
  .gc-foot > .news-btn { flex: 1 1 auto; text-align: center; justify-content: center; }
  .date-picker input::-webkit-calendar-picker-indicator { display: none; }
  .date-picker input { font-size: 15px; padding: 6px 0; }
  .date-nav { width: 36px; }
}
@media (max-width: 640px) {
  /* Props: cada jogador vira um cartão (sem rolagem lateral, campos sempre visíveis) */
  .modal-body .props-table, .modal-body .props-table tbody { display: block; white-space: normal; overflow: visible; }
  .props-table thead { display: none; }
  .props-wrap { margin: 0; padding: 0; }
  .props-table tr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 8px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface-2); }
  .props-table td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; }
  .props-table td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin-bottom: 3px; }
  .props-table td.pn { grid-column: 1 / 3; order: 1; font-size: 15px; }
  .props-table td[data-label="Jogos"] { order: 2; }
  .props-table td[data-label="Média"] { order: 3; }
  .props-table td.lastv { grid-column: 1 / -1; order: 4; max-width: none; overflow: visible; }
  .lastv i { margin-bottom: 4px; }
  .props-table td[data-label="Linha"] { order: 5; } .props-table td[data-label="Over"] { order: 6; }
  .props-table td[data-label="Under"] { order: 7; } .props-table td[data-label="EV over"] { order: 8; }
  .props-table td[data-label^="Odd"] { grid-column: 1 / -1; order: 9; }
  .props-table input { width: 100%; min-height: 42px; font-size: 16px; }
  .props-foot { font-size: 12px; }
  .props-bar label { display: flex; align-items: center; gap: 8px; }
  .props-bar select { min-height: 40px; }
}
@media (max-width: 920px) {
  .modal select, .props-bar select, .an-bar select { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
}

/* ====================== FILTROS (confiança / edge) ====================== */
.filter-bar { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 2px; }
.fgroup { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-right: 2px; }
.fchip { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; transition: .12s; white-space: nowrap; }
.fchip:hover { color: var(--text); border-color: var(--text-3); }
.fchip.on { background: rgba(245,165,36,.16); border-color: var(--brand); color: var(--brand-2); }
.fchip.c-alta.on { background: rgba(45,212,167,.15); border-color: var(--accent); color: var(--accent); }
.fchip.c-media.on { background: rgba(255,179,64,.15); border-color: #ffb340; color: #ffb340; }
.fchip.c-baixa.on { background: rgba(255,93,108,.13); border-color: var(--red); color: var(--red); }
.fchip.clear { border-style: dashed; color: var(--red); }
.fchip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.gm-early { background: rgba(255,179,64,.14); color: #ffb340; border-color: rgba(255,179,64,.4); margin-left: 6px; }
@media (max-width: 920px) {
  .filter-bar { grid-column: 1 / -1; flex-wrap: nowrap; overflow-x: auto; gap: 14px; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .filter-bar::-webkit-scrollbar { display: none; }
  .fgroup { flex-wrap: nowrap; flex: none; }
  .fchip { min-height: 40px; padding: 0 14px; }
}

/* ====================== TESTE GRÁTIS · PLANOS · ACESSO ====================== */
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.login-tabs button { padding: 10px 8px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); background: none; }
.login-tabs button.on { background: var(--surface-2); color: var(--brand-2); }
.signup-intro { font-size: 13px; color: var(--text-2); line-height: 1.5; margin-bottom: -2px; }
.signup-intro b { color: var(--accent); }
.tg-step { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.tg-step-icon { font-size: 40px; }
.tg-step h3 { font-family: var(--font-head); font-size: 18px; }
.tg-step p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.tg-btn { display: block; text-decoration: none; text-align: center; padding: 14px; }
.tg-wait { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--text-3) !important; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }

.access-chip { font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; line-height: 1.35; }
.access-chip b { color: var(--accent); }
.access-chip span { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.access-chip.warn { border-color: rgba(255,179,64,.5); background: rgba(255,179,64,.08); }
.access-chip.warn b { color: #ffb340; }
.access-chip.ok b { color: var(--brand-2); }

.paywall-card { width: min(760px, 96vw); }
.paywall-card.modal-card { max-height: 92vh; }
.pw-sub { color: var(--text-2); font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
.pw-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 12px; }
.pw-plan { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px 16px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; transition: .12s; }
.pw-plan:hover:not(:disabled) { border-color: var(--brand); transform: translateY(-1px); }
.pw-plan.hot { border-color: var(--brand); background: linear-gradient(135deg, rgba(245,165,36,.12), rgba(245,165,36,.03)); }
.pw-plan:disabled { opacity: .55; cursor: not-allowed; }
.pw-plan.busy { opacity: .7; }
.pw-name { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.pw-price { font-family: var(--font-head); font-weight: 800; font-size: 26px; color: var(--brand-2); }
.pw-days { font-size: 12px; color: var(--text-3); }
.pw-go { margin-top: 8px; align-self: flex-start; font-size: 13px; font-weight: 700; padding: 8px 18px; border-radius: 9px; background: var(--brand); color: #1a1205; }
.pw-save { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(45,212,167,.16); color: var(--accent); }
.pw-help { margin: 8px 0 14px; }
.pw-help a { color: var(--brand-2); }
.paywall-card .btn-ghost { width: auto; padding: 10px 18px; }
@media (max-width: 560px) { .pw-plans { grid-template-columns: 1fr; } .pw-plan { padding: 14px; } }

.acc-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.acc-badge.life { background: rgba(157,123,255,.16); color: var(--purple); }
.acc-badge.ok { background: rgba(45,212,167,.14); color: var(--accent); }
.acc-badge.trial { background: rgba(245,165,36,.16); color: var(--brand-2); }
.acc-badge.exp { background: rgba(255,93,108,.14); color: var(--red); }
.status-badge.status-pending { background: rgba(255,179,64,.15); color: #ffb340; }
.admin-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 14px; }
.admin-life { justify-content: flex-end; }
.admin-billing { margin-top: 26px; border-top: 1px solid var(--border-soft); padding-top: 18px; }
.admin-billing h4 { font-family: var(--font-head); font-size: 15px; margin-bottom: 12px; }
.bill-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.bill-st { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.bill-st.ok { color: var(--accent); } .bill-st.off { color: var(--red); }
.bill-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.bill-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--border-soft); border-radius: 10px; background: var(--surface-2); }
.bill-row label { font-size: 11px; color: var(--text-3); display: flex; flex-direction: column; gap: 3px; text-transform: uppercase; letter-spacing: .04em; }
.bill-row input { width: 92px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; }
@media (max-width: 640px) {
  .bill-row { grid-template-columns: 1fr 1fr; } .bill-row b { grid-column: 1 / -1; } .bill-row input { width: 100%; font-size: 16px; }
  .paywall-card .modal-body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .modal-card.paywall-card, .modal-card.team-card { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: none; }
}
@media (max-width: 920px) { .sidebar-foot .access-chip, .sidebar-foot #plans-btn { grid-column: 1 / -1; } }

/* ====================== DESEMPENHO DAS EQUIPES ====================== */
.team-card { width: min(860px, 96vw); }
.ts-head, .ts-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) 1fr 1fr; gap: 10px; align-items: center; }
.ts-head { position: sticky; top: -16px; z-index: 2; background: var(--surface); padding: 8px 0 10px; border-bottom: 1px solid var(--border); font-size: 12px; }
.ts-head b { font-family: var(--font-head); font-size: 17px; display: block; color: var(--brand-2); }
.ts-head .sub { font-size: 11px; color: var(--text-3); }
.ts-sec { margin: 16px 0 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.ts-row { padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.ts-l { color: var(--text-2); font-size: 12.5px; }
.ts-v { font-weight: 600; line-height: 1.35; }
.ts-v .sub { display: block; font-weight: 400; font-size: 11px; color: var(--text-3); }
.ts-v.win { color: var(--accent); }
.ts-streak { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface-2); }
.ts-streak.W { background: rgba(45,212,167,.15); color: var(--accent); } .ts-streak.L { background: rgba(255,93,108,.14); color: var(--red); }
.ts-chips { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.ts-chips i { font-style: normal; font-size: 11px; font-weight: 800; width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 5px; background: var(--surface-2); }
.ts-chips i.W { background: rgba(45,212,167,.2); color: var(--accent); } .ts-chips i.L { background: rgba(255,93,108,.18); color: var(--red); }
.ts-h2h > div { padding: 7px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; }
@media (max-width: 640px) {
  .ts-head, .ts-row { grid-template-columns: 1fr 1fr; gap: 4px 10px; }
  .ts-head > div:first-child { display: none; }
  .ts-l { grid-column: 1 / -1; font-size: 11.5px; }
  .ts-head { top: -12px; }
}
