/* ==========================================================================
   Portal do Cliente — tokens
   Paleta: azul-petróleo profundo (confiança/financeiro) + âmbar para
   pendências + vermelho terracota para atraso. Fundo neutro levemente
   frio, cards brancos com sombra suave e bordas discretas.
   Tipografia: pilha de sistema (sem depender de internet, já que isso
   roda 100% local).
   ========================================================================== */
:root {
  --bg: #F6F5FC;
  --surface: #ffffff;
  --surface-muted: #F3F1FA;
  --ink: #1A1330;
  --ink-muted: #665F80;
  --border: #E7E4F5;

  --brand: #7C3AED;
  --brand-strong: #5B21B6;
  --brand-tint: #F1EBFE;
  --accent-cyan: #22D3EE;
  --accent-pink: #F472B6;
  --space-1: #0F0A2E;
  --space-2: #1E0F4A;

  --ok: #1f7a4d;
  --ok-tint: #e5f4ec;
  --pending: #b6791c;
  --pending-tint: #fbf0dd;
  --late: #b23b2e;
  --late-tint: #fbe8e5;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(30, 15, 74, 0.06), 0 4px 14px rgba(30, 15, 74, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tap-min: 44px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  overflow-x: hidden;
  height: 100%;
}

body.scroll-locked { overflow: hidden; }

.app { min-height: 100vh; min-height: 100dvh; }

button, a, input, textarea, select { touch-action: manipulation; }

h1, h2, h3 { margin: 0 0 4px; line-height: 1.2; }
p { margin: 0 0 16px; }
.muted { color: var(--ink-muted); font-size: 14px; }

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* --- Fundo espacial (Galaxy TV) reutilizado no splash e telas de auth --- */
.boot-splash, .auth-screen {
  background:
    radial-gradient(1.8px 1.8px at 10% 20%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 85% 15%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 30% 75%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(2px 2px at 68% 55%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 92% 80%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.7px 1.7px at 48% 12%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 15% 92%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(55% 60% at 85% 8%, var(--accent-pink) 0%, transparent 55%),
    radial-gradient(60% 65% at 8% 92%, var(--accent-cyan) 0%, transparent 50%),
    linear-gradient(160deg, var(--space-2) 0%, var(--space-1) 55%, #08051a 100%);
  background-blend-mode: normal, normal, normal, normal, normal, normal, normal, soft-light, soft-light, normal;
}

/* --- Splash inicial (antes do JS assumir) --- */
.boot-splash {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
}
.boot-mark {
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,0.12); padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
}
.boot-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25); border-top-color: var(--accent-cyan);
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* --- Auth screens --- */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(8, 5, 26, 0.45);
  padding: 32px 28px;
  position: relative;
  z-index: 1;
}
.brand-mark {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.auth-card h1 { font-size: 22px; }

form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
label { font-size: 13px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 6px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="email"], textarea, select {
  font-size: 16px; /* 16px+ evita zoom automatico ao focar no iOS */
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  min-height: var(--tap-min);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: var(--surface);
}

.btn {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  min-height: var(--tap-min);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.08s ease, opacity 0.08s ease;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--border); }
.btn-secondary:hover { background: var(--brand-tint); }
.btn-ghost { background: var(--surface-muted); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: none; color: var(--brand); font-size: 14px;
  padding: 10px 0; text-align: left; min-height: var(--tap-min); display: inline-flex; align-items: center;
}
.btn-link:active { opacity: 0.6; }

.form-error {
  color: var(--late);
  font-size: 13px;
  min-height: 16px;
}

.pwd-wrap { position: relative; display: flex; }
.pwd-wrap input { flex: 1; padding-right: 44px; }
.pwd-toggle {
  position: absolute; right: 2px; top: 2px; bottom: 2px;
  width: 40px;
  background: none; border: none;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  border-radius: var(--radius);
}
.pwd-toggle:active { background: var(--surface-muted); }

.auth-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; }

/* --- Shell / navegação --- */
.shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) 14px calc(16px + var(--safe-left));
  background: linear-gradient(120deg, var(--space-2), var(--brand-strong) 60%, var(--brand));
  color: #fff;
}
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-title .wave { margin-left: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar .btn-link { color: #fff; min-height: var(--tap-min); padding: 0 8px; }
.icon-btn {
  position: relative;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: var(--tap-min); height: var(--tap-min);
  border-radius: 999px;
  font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.08s ease;
}
.icon-btn:active { transform: scale(0.92); }
.badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--late); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px;
  border-radius: 999px; padding: 0 3px;
}

/* Barra de navegação fixa embaixo — mais fácil de alcançar com o polegar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px calc(4px + var(--safe-left)) calc(6px + var(--safe-bottom)) calc(4px + var(--safe-right));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none;
  padding: 6px 4px;
  color: var(--ink-muted);
  border-radius: var(--radius);
  min-height: var(--tap-min);
}
.tab:active { background: var(--surface-muted); }
.tab-icon { font-size: 20px; line-height: 1; }
.tab-label { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--brand); }

.content {
  flex: 1;
  padding: 20px calc(20px + var(--safe-right)) calc(20px + var(--tabbar-h) + var(--safe-bottom)) calc(20px + var(--safe-left));
  max-width: 640px; width: 100%; margin: 0 auto;
}

/* --- Card de boas-vindas (topo da aba Perfil) --- */
.welcome-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  color: #fff;
  background:
    radial-gradient(1.6px 1.6px at 10% 25%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.3px 1.3px at 30% 70%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 55% 35%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.6px 1.6px at 78% 60%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.3px 1.3px at 90% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(60% 140% at 95% -20%, var(--accent-cyan) 0%, transparent 55%),
    radial-gradient(70% 140% at 0% 120%, var(--accent-pink) 0%, transparent 55%),
    linear-gradient(115deg, var(--space-2) 0%, var(--brand-strong) 55%, var(--brand) 100%);
  background-blend-mode: normal, normal, normal, normal, normal, soft-light, soft-light, normal;
  box-shadow: var(--shadow);
}
.welcome-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.welcome-card-sub { font-size: 13px; color: rgba(255,255,255,0.85); position: relative; z-index: 1; }

/* --- Cards genéricos --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.card-row + .card-row { border-top: 1px solid var(--border); }
.field-label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.02em; }
.field-value { font-size: 15px; font-weight: 600; }

/* --- Status pills --- */
.pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-pending { background: var(--pending-tint); color: var(--pending); }
.pill-late { background: var(--late-tint); color: var(--late); }

/* --- Faturas --- */
.invoice-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.invoice-item + .invoice-item { border-top: 1px solid var(--border); }
.invoice-meta { display: flex; flex-direction: column; gap: 2px; }
.invoice-value { font-weight: 700; }

.pix-box {
  margin-top: 12px; padding: 14px;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 12px;
}
.pix-code { word-break: break-all; font-family: monospace; background: var(--surface); padding: 8px; border-radius: 6px; margin: 8px 0; display: block; }

/* --- Tickets --- */
.ticket-item { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; min-height: var(--tap-min); transition: background 0.08s ease; }
.ticket-item:hover { border-color: var(--brand); }
.ticket-item:active { background: var(--surface-muted); }
.ticket-item .field-label { margin-bottom: 4px; }

.msg-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.msg { max-width: 80%; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }
.msg-cliente { align-self: flex-end; background: var(--brand-tint); color: var(--brand-strong); }
.msg-revendedor { align-self: flex-start; background: var(--surface-muted); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-muted); }

/* --- Drawer de notificações --- */
.drawer { position: fixed; inset: 0; background: rgba(20,38,43,0.35); display: flex; justify-content: flex-end; z-index: 50; animation: drawer-fade 0.15s ease; }
.drawer-card {
  width: 100%; max-width: 360px; background: var(--surface); height: 100%;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); padding-right: var(--safe-right);
  animation: drawer-slide-in 0.2s ease;
}
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-header .icon-btn { background: var(--surface-muted); color: var(--ink); }
.drawer-body { padding: 12px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.notif-item { padding: 12px 4px; border-bottom: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.notif-item:active { background: var(--surface-muted); }
.notif-item.unread .field-value { color: var(--brand); }

form.inline { flex-direction: row; gap: 8px; margin-top: 10px; }
form.inline input { flex: 1; }

/* --- Perfil elaborado (espelha a ficha do cliente no dashboard) --- */
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--brand));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.profile-name { font-size: 19px; margin: 0; }
.profile-header-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }

.section-title { font-size: 13px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px; }

.rating-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--surface-muted);
}
.rating-card.rating-success { background: var(--ok-tint); }
.rating-card.rating-warning { background: var(--pending-tint); }
.rating-card.rating-danger { background: var(--late-tint); }
.rating-stars { font-size: 18px; letter-spacing: 1px; }
.rating-card.rating-success .rating-stars { color: var(--ok); }
.rating-card.rating-warning .rating-stars { color: var(--pending); }
.rating-card.rating-danger .rating-stars { color: var(--late); }
.rating-card.rating-neutral .rating-stars { color: var(--ink-muted); }
.rating-label { font-weight: 700; font-size: 14px; }
.rating-detail { font-size: 12px; color: var(--ink-muted); }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.profile-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-item.full { grid-column: 1 / -1; }
.profile-label { font-size: 11px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.profile-value { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.profile-value-strong { font-size: 17px; font-weight: 700; }
.profile-value.mono { font-family: monospace; font-size: 12.5px; }

.discount-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--ok-tint); color: var(--ok);
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 12px;
}

.profile-item.inline {
   flex-direction: row; 
   align-items: baseline; 
   gap: 6px; 
   flex-wrap: wrap; 
  }

.indicacao-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13.5px; }
.indicacao-row + .indicacao-row { border-top: 1px solid var(--border); }

.history-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13.5px; }
.history-row + .history-row { border-top: 1px solid var(--border); }
.history-meta { display: flex; flex-direction: column; gap: 2px; }

@media (max-width: 480px) {
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .content { padding: 14px calc(14px + var(--safe-right)) calc(14px + var(--tabbar-h) + var(--safe-bottom)) calc(14px + var(--safe-left)); }
  .auth-card { padding: 26px 20px; }
}

/* ===================================================================
   ABA NOVIDADES — canais do dia + carrosséis de filmes/séries
   (estilo "Netflix": fileiras horizontais de cartões com capa)
=================================================================== */
.novidades-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.novidades-updated {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --- Canais de hoje (jogos com número do canal) --- */
.novidades-jogos-card { padding: 14px 16px; margin-bottom: 22px; }
.novidades-jogos-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.novidades-jogo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
}
.novidades-jogo-row + .novidades-jogo-row { border-top: 1px solid var(--border); }
.novidades-jogo-horario {
  font-weight: 700;
  color: var(--brand-strong);
  flex-shrink: 0;
  width: 42px;
  font-variant-numeric: tabular-nums;
}
.novidades-jogo-confronto { flex: 1; min-width: 0; font-weight: 500; }
.novidades-jogo-canais { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.canal-chip {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-tint);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Fileiras de conteúdo (carrossel horizontal) --- */
.novidades-row { margin-bottom: 24px; }
.novidades-row-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 10px 2px;
}
.novidades-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.novidades-carousel::-webkit-scrollbar { display: none; }

.poster-card {
  flex: 0 0 auto;
  width: 118px;
  scroll-snap-align: start;
}
.poster-card-img {
  position: relative;
  width: 118px;
  height: 174px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--space-2), var(--brand-strong) 55%, var(--brand));
  box-shadow: 0 4px 14px rgba(30, 15, 74, 0.18);
  margin-bottom: 6px;
}
.poster-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback-emoji {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.poster-card-placeholder { display: block; }
.poster-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card-meta {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 380px) {
  .poster-card, .poster-card-img { width: 102px; }
  .poster-card-img { height: 150px; }
}

/* ===================================================================
   ABA JOGOS — "Agenda de Jogos" estilo bilhete/ticket
=================================================================== */
.agenda-header {
  position: relative;
  text-align: center;
  padding: 16px 24px;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1.4px 1.4px at 10% 25%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 85% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 50% 75%, rgba(255,255,255,0.5), transparent 60%),
    linear-gradient(160deg, var(--space-2) 0%, var(--space-1) 100%);
}
.agenda-header::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 9px;
  opacity: 0.55;
  pointer-events: none;
}
.agenda-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: 5px;
}
.agenda-titulo { font-size: 18px; font-weight: 800; margin-bottom: 3px; }
.agenda-data { font-size: 13.5px; color: rgba(255,255,255,0.82); text-transform: capitalize; }

.agenda-jogo {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.agenda-jogo::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-cyan) 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0.10;
  pointer-events: none;
}
.agenda-jogo-top {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.agenda-liga-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; color: var(--brand-strong);
  background: var(--brand-tint); padding: 3px 9px; border-radius: 999px;
  max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agenda-liga-badge img { width: 13px; height: 13px; object-fit: contain; flex-shrink: 0; }
.agenda-horario-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--space-2), var(--brand-strong));
  color: #fff; font-weight: 800; font-size: 12.5px;
  padding: 5px 11px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30,15,74,0.25);
  white-space: nowrap;
}
.agenda-confronto {
  position: relative;
  display: flex; align-items: flex-start; justify-content: center; gap: 12px;
  margin: 4px 0 12px;
}
.agenda-time { flex: 1; max-width: 40%; text-align: center; min-width: 0; }
.agenda-escudo { width: 42px; height: 42px; object-fit: contain; margin: 0 auto 6px; display: block; }
.agenda-escudo-fallback {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 6px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--brand));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: -0.02em;
}
.agenda-time-nome {
  font-size: 11.5px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.agenda-vs {
  flex-shrink: 0;
  font-size: 12.5px; font-weight: 800; color: var(--ink-muted);
  margin-top: 12px;
  white-space: nowrap;
}
.agenda-jogo-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12px; font-weight: 600; color: var(--ink);
  text-align: center;
}
.agenda-canal-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }

/* ===================================================================
   LAYOUT DESKTOP
   Acima de 900px de largura o app deixa de imitar um celular: a barra
   de baixo vira uma barra lateral fixa e o conteúdo ganha mais respiro.
   Isso é decidido pelo tamanho da JANELA (media query), não pelo tipo
   de aparelho — é o jeito certo de fazer essa troca, porque um celular
   e um PC com a janela pequena devem se comportar igual, e um PC com a
   janela maximizada é o que dispara o layout novo. Detectar "é celular
   ou é PC" por outro meio (ex.: user-agent) é menos confiável, porque
   tablet, notebook conversível e janela redimensionada fogem da regra.
   Nenhum JS precisou mudar: os mesmos botões e telas só são
   reorganizados na tela grande via CSS Grid.
=================================================================== */
@media (min-width: 900px) {
  .shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-areas: "nav topbar" "nav content";
    min-height: 100vh;
  }

  /* Barra lateral fixa (era a barra de baixo no celular) */
  .tabbar {
    grid-area: nav;
    position: sticky;
    top: 0;
    left: auto; right: auto; bottom: auto;
    height: 100vh;
    width: 248px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 20px 12px;
    border-top: none;
    border-right: 1px solid var(--border);
  }
  .tabbar::before {
    content: '🛰️ Galaxy TV';
    display: block;
    font-weight: 800;
    font-size: 14px;
    color: var(--brand-strong);
    padding: 8px 10px 18px;
  }
  .tab {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
    min-height: 0;
    font-size: 13.5px;
    border-radius: 8px;
    color: var(--ink-muted);
  }
  .tab:hover { background: var(--surface-muted); }
  .tab-icon { font-size: 16px; }
  .tab-label { font-size: 13.5px; }
  .tab.active { background: var(--brand-tint); font-weight: 700; }

  .topbar {
    grid-area: topbar;
    padding: 18px 32px;
  }

  .content {
    grid-area: content;
    max-width: 880px;
    padding: 28px 32px 40px;
    margin: 0;
  }

  .auth-screen { padding: 24px; }
}

/* Reforço: garante o tamanho compacto do menu lateral no PC mesmo que
   alguma regra antiga tenha sobrado em outro lugar do arquivo. */
@media (min-width: 900px) {
  .tabbar .tab {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 9px 12px !important;
  }
}
