:root {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --sidebar-width: 260px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  display: flex;
  min-height: 100vh;
}

/* Layout Principal */
#sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
}

/* Container da Logo na Sidebar */
#sidebar .logo {
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 0.5rem;
}

/* Trava de Dimensão da Imagem */
.logo-img {
  width: 100%;
  max-width: 180px;      /* Largura máxima na barra lateral */
  height: auto;          /* Mantém a proporção da imagem */
  max-height: 60px;      /* Limita a altura para não achatar */
  object-fit: contain;   /* Garante enquadramento sem distorcer */
  display: block;
}

#sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--bg-hover);
  color: var(--text-main);
}

.nav-item.active {
  border-left: 4px solid var(--accent);
}

#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Header de Modalidades */
header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modality-selector {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.btn-modality {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-modality:hover, .btn-modality.active {
  background-color: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Conteúdo Analítico */
.content-area {
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Cards e Componentes de Dezenas */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dezenas-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.bola {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bola.trevo { background-color: #10b981; }
.bola.mes { background-color: #f59e0b; }

/* Tabelas Personalizadas */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  text-align: left;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  background-color: rgba(255,255,255,0.02);
  color: var(--text-muted);
  font-weight: 600;
}

/* Fase 1 — identidade visual, publicidade e responsividade */
#sidebar .logo {
  min-height: 76px;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
}

.logo-img {
  display: block;
  width: min(100%, 245px);
  height: auto;
  max-height: 112px;
  object-fit: contain;
}

.marketing-banner { display: block; width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--bg-card); }
.marketing-banner img { display: block; width: 100%; height: auto; object-fit: cover; }
.mkt-container { max-width: 100%; }
.site-footer { text-align: center; padding: 30px 20px; margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); }
.site-footer p { margin: 0.35rem 0; }
.footer-links, .footer-social { display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; font-size: 14px; }
.site-footer a { color: var(--text-main); text-decoration: underline; }
.site-footer .mkt-container { width: min(90%, 553px) !important; max-width: 553px !important; margin: 20px auto; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.site-footer .mkt-container-wide { width: min(90%, 688px) !important; max-width: 688px !important; }
.site-footer .mkt-container img { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; max-height: 300px; object-fit: contain; transition: transform 0.3s ease; }
.site-footer .mkt-container img:hover { transform: scale(1.02); }
.footer-copy { opacity: 0.6; font-size: 12px; margin-top: 15px !important; }
.manus-footer-promo { width: min(100%, 760px); margin: 1.6rem auto 1.25rem; padding: 1.25rem 1.4rem 1.35rem; border: 1px solid rgba(96,165,250,.38); border-radius: 14px; background: linear-gradient(135deg, rgba(37,99,235,.17), rgba(15,23,42,.72)); box-shadow: 0 10px 28px rgba(0,0,0,.18); text-align: center; }
.manus-footer-kicker { margin: 0 0 .45rem !important; color: #93c5fd; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.manus-footer-title { margin: 0 0 .45rem !important; color: #f8fafc; font-size: 1.28rem; }
.manus-footer-title strong { color: #60a5fa; }
.manus-footer-text { max-width: 650px; margin: 0 auto .95rem !important; color: #cbd5e1; font-size: .92rem; line-height: 1.55; }
.manus-footer-cta { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 42px; padding: .65rem 1rem; border: 1px solid rgba(147,197,253,.55); border-radius: 999px; background: rgba(30,64,175,.45); color: #eff6ff !important; font-weight: 700; text-decoration: none !important; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.manus-footer-cta:hover { background: rgba(37,99,235,.72); border-color: #93c5fd; transform: translateY(-1px); }
@media (max-width: 520px) { .manus-footer-promo { padding: 1.1rem .85rem 1.15rem; } .manus-footer-kicker { font-size: .68rem; } .manus-footer-title { font-size: 1.12rem; } .manus-footer-text { font-size: .86rem; } .manus-footer-cta { width: 100%; border-radius: 10px; } }

/* Fase 2.1 — Dashboard Geral conectado à API */
.dashboard-state { text-align: center; padding: 2rem !important; }
.dashboard-state p { margin-top: 0.7rem; color: var(--text-muted); }
.dashboard-error { border-left: 4px solid #ef4444; }
.btn-retry { margin-top: 1rem; padding: 0.65rem 1rem; border: 0; border-radius: 0.45rem; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }
.btn-retry:hover { background: var(--accent-hover); }
.dashboard-card, .dashboard-metric { text-align: center; }
.dashboard-card h2, .dashboard-card h3, .dashboard-card h4 { text-align: center; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.dashboard-grid > .card { margin-bottom: 0; }
.dashboard-meta { color: var(--text-muted); font-size: 0.8rem; text-align: center; margin: 0.6rem 0 1rem; }
.dashboard-numbers { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.dashboard-number { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; font-size: 1.05rem; }
.calendar-module { padding: 1.15rem; }
.calendar-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.calendar-heading h1 { margin: 0 0 0.35rem; }
.calendar-heading p, .calendar-note { color: var(--text-muted); margin: 0; }
.calendar-status { color: var(--text-muted); margin: 0.8rem 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0.9rem; }
.calendar-card { padding: 1rem; border: 1px solid var(--border); border-radius: 0.75rem; background: linear-gradient(145deg, rgba(30,41,59,0.9), rgba(15,23,42,0.92)); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }
.calendar-card.calendar-today { border-color: #f59e0b; background: linear-gradient(145deg, rgba(120,53,15,0.42), rgba(30,41,59,0.96)); box-shadow: 0 0 0 2px rgba(245,158,11,0.22), 0 10px 28px rgba(245,158,11,0.16); }
.calendar-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.calendar-modality { color: #7dd3fc; font-size: 1.05rem; font-weight: 800; }
.calendar-today .calendar-modality { color: #fcd34d; }
.calendar-badges { display: flex; justify-content: flex-end; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.calendar-today-badge { display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 999px; padding: 0.24rem 0.52rem; color: #451a03; background: #fbbf24; font-size: 0.68rem; font-weight: 900; white-space: nowrap; animation: calendarTodayPulse 1.8s ease-in-out infinite; }
@keyframes calendarTodayPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0.35); } 50% { box-shadow: 0 0 0 5px rgba(251,191,36,0.08); } }
.calendar-acum { border-radius: 999px; padding: 0.22rem 0.5rem; font-size: 0.68rem; font-weight: 800; white-space: nowrap; }
.calendar-acum.is-yes { color: #fde68a; background: rgba(245,158,11,0.16); border: 1px solid rgba(245,158,11,0.45); }
.calendar-acum.is-no { color: #bbf7d0; background: rgba(34,197,94,0.14); border: 1px solid rgba(34,197,94,0.35); }
.calendar-date { margin: 1rem 0 0.85rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.calendar-date span, .calendar-details span { display: block; color: var(--text-muted); font-size: 0.72rem; text-transform: uppercase; font-weight: 700; }
.calendar-date strong { display: block; margin-top: 0.2rem; color: #f8fafc; font-size: 1.45rem; }
.calendar-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
.calendar-details strong { display: block; margin-top: 0.18rem; color: #e2e8f0; overflow-wrap: anywhere; }
.calendar-extra { margin-top: 0.8rem; color: var(--text-muted); font-size: 0.8rem; }
.calendar-note { margin-top: 1rem; font-size: 0.8rem; }
@media (max-width: 700px) { .calendar-module { padding: 0.85rem; } .calendar-heading { flex-direction: column; } .calendar-heading .btn-retry { width: 100%; } .calendar-grid { grid-template-columns: 1fr; } .calendar-card-top { flex-direction: column; } .calendar-badges { justify-content: flex-start; } }

/* Fase 2.2 — Histórico paginado */
.history-module { padding: 1.25rem; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.history-heading h2 { margin: 0; }
.history-size-label { color: var(--text-muted); font-size: 0.9rem; white-space: nowrap; }
.history-size { margin-left: 0.35rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 0.4rem; background: var(--bg-card); color: var(--text-main); }
.history-table-wrap { margin-top: 0.5rem; }
.history-table { text-align: center; }
.history-table th, .history-table td { text-align: center; vertical-align: middle; }
.history-result { min-width: 220px; white-space: normal; }
.history-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.history-count { color: var(--text-muted); font-size: 0.85rem; }
.history-actions .btn-retry { margin-top: 0; }

@media (max-width: 620px) {
  .history-module { padding: 0.85rem; }
  .history-table thead { display: none; }
  .history-table, .history-table tbody, .history-table tr, .history-table td { display: block; width: 100%; box-sizing: border-box; }
  .history-table tr { margin-bottom: 0.75rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: 0.55rem; background: rgba(255,255,255,0.02); }
  .history-table td { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.35rem 0.15rem; border: 0; text-align: right; }
  .history-table td::before { content: attr(data-label); color: var(--text-muted); font-weight: 600; text-align: left; }
  .history-table td.history-result { display: block; text-align: center; }
  .history-table td.history-result::before { display: block; margin-bottom: 0.25rem; text-align: center; }
  .history-actions { align-items: stretch; flex-direction: column; }
  .history-actions .btn-retry { width: 100%; }
}

@media (min-width: 701px) {
  #sidebar { transition: width 0.2s ease, transform 0.2s ease; overflow-x: hidden; }
  #sidebar.is-collapsed { width: 0; padding-left: 0; padding-right: 0; border-right: 0; }
  #sidebar.is-collapsed > * { visibility: hidden; }
  .btn-icon { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; border: 1px solid var(--border); border-radius: 0.45rem; background: transparent; color: var(--text-main); cursor: pointer; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 230px; }
  header { padding: 0.8rem 1rem; }
  .content-area { padding: 1.25rem; }
  .logo-img { width: min(100%, 215px); max-height: 98px; }
}

@media (max-width: 700px) {
  body { display: block; }
  #sidebar { position: fixed; z-index: 20; top: 0; left: 0; width: min(84vw, 300px); height: 100vh; transform: translateX(-105%); transition: transform 0.2s ease; overflow-y: auto; }
  #sidebar.is-open { transform: translateX(0); }
  #main-content { min-width: 0; }
  header { position: sticky; top: 0; z-index: 10; display: block; padding: 0.65rem 0.75rem; }
  .header-left { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
  .modality-selector { min-width: 0; padding-bottom: 0; }
  .btn-modality { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .header-right { margin-top: 0.65rem; }
  .content-area { padding: 0.85rem; }
  .card { padding: 1rem; }
  th, td { padding: 0.55rem 0.65rem; white-space: nowrap; }
  .table-responsive { margin-right: -0.25rem; }
}

@media (max-width: 420px) {
  .logo-img { width: min(100%, 185px); max-height: 84px; }
  .bola { width: 34px; height: 34px; font-size: 0.85rem; }
  .site-footer { padding: 24px 10px; overflow: hidden; }
  .site-footer .mkt-container,
  .site-footer .mkt-container-wide { width: 100% !important; max-width: 100% !important; margin: 14px auto; }
  .site-footer .mkt-container img { max-height: 210px; }
}

/* Fase 2.3 — Hot/Cold materializado */
.hotcold-module { padding: 1.25rem; }
.hotcold-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hotcold-heading h2 { margin: 0; }
.hotcold-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.hotcold-panel { padding: 1rem; border-radius: 0.65rem; border: 1px solid var(--border); }
.hotcold-panel h3 { margin: 0 0 0.8rem; text-align: center; }
.hot-panel { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.55); }
.hot-panel h3 { color: #f87171; }
.cold-panel { background: rgba(59,130,246,0.10); border-color: rgba(59,130,246,0.55); }
.cold-panel h3 { color: #60a5fa; }
.hotcold-chips { display: flex; justify-content: center; gap: 0.55rem; flex-wrap: wrap; }
.hotcold-chip { min-width: 52px; padding: 0.45rem 0.55rem; border-radius: 0.45rem; text-align: center; color: #fff; }
.hotcold-chip strong, .hotcold-chip small { display: block; }
.hotcold-chip small { margin-top: 0.15rem; font-size: 0.68rem; opacity: 0.85; }
.hotcold-chip.hot { background: #b91c1c; }
.hotcold-chip.cold { background: #1d4ed8; }
.hotcold-table-wrap { margin-top: 1rem; }
.hotcold-table th, .hotcold-table td { text-align: center; vertical-align: middle; }
.hotcold-table td:nth-child(9) { white-space: nowrap; }

/* Fase 2.4 — Matrizes matemáticas e fechamentos */
.scope-selector { display: flex; flex-direction: column; gap: 0.2rem; min-width: 220px; }
.scope-selector label { color: var(--text-muted); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.scope-selector select { padding: 0.5rem 0.65rem; border: 1px solid var(--border); border-radius: 0.45rem; background: var(--bg-card); color: var(--text-main); font-weight: 600; }
.custom-scope-fields { display: grid; grid-template-columns: auto minmax(76px, 1fr) auto minmax(76px, 1fr) auto; align-items: end; gap: 0.35rem; margin-top: 0.45rem; }
.custom-scope-fields[hidden] { display: none !important; }
.custom-scope-fields label { color: var(--text-muted); font-size: 0.72rem; font-weight: 700; }
.custom-scope-fields input { width: 100%; min-width: 0; padding: 0.42rem 0.48rem; border: 1px solid var(--border); border-radius: 0.4rem; background: var(--bg-main); color: var(--text-main); }
.btn-scope-apply { padding: 0.43rem 0.65rem; border: 1px solid var(--accent); border-radius: 0.4rem; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.btn-scope-apply:hover { background: var(--accent-hover); }
.matrices-module { padding: 1.25rem; }
.matrices-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.matrices-heading h2 { margin: 0; }
.scope-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.7rem; border-radius: 999px; background: rgba(16,185,129,0.14); border: 1px solid rgba(52,211,153,0.5); color: #6ee7b7; font-size: 0.8rem; font-weight: 800; }
.matrices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.matrix-card { padding: 1rem; border: 1px solid var(--border); border-radius: 0.7rem; background: rgba(255,255,255,0.03); }
.matrix-card h3 { min-height: 2.6em; margin: 0.8rem 0 0.6rem; }
.matrix-card p { min-height: 2.5em; color: var(--text-muted); font-size: 0.86rem; }
.matrix-unavailable { opacity: 0.75; }
.matrix-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; margin: 0.8rem 0; }
.matrix-specs div { padding: 0.45rem; border-radius: 0.4rem; background: rgba(0,0,0,0.18); text-align: center; }
.matrix-specs dt { color: var(--text-muted); font-size: 0.68rem; }
.matrix-specs dd { margin: 0.2rem 0 0; font-weight: 800; }
.btn-matrix-preview { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid rgba(56,189,248,0.55); border-radius: 0.45rem; background: rgba(14,165,233,0.12); color: #7dd3fc; cursor: pointer; font-weight: 700; }
.btn-matrix-preview:disabled { cursor: not-allowed; opacity: 0.55; }
.matrix-preview { margin-top: 1.25rem; padding: 1rem; border: 1px solid rgba(52,211,153,0.5); border-radius: 0.7rem; background: rgba(16,185,129,0.06); }
.matrix-preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.matrix-preview-heading h3 { margin: 0; }
.btn-close-preview { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1.5rem; }
.matrix-games { max-height: 360px; overflow: auto; margin: 0; padding: 0.9rem; border-radius: 0.45rem; background: #020617; color: #a7f3d0; font: 0.85rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
@media (max-width: 900px) { .scope-selector { min-width: 185px; } }
@media (max-width: 700px) { .scope-selector { width: 100%; min-width: 0; } .scope-selector select { width: 100%; } .matrices-module { padding: 0.85rem; } .matrix-specs { font-size: 0.85rem; } }

/* Fase 2.5 — Simulador de fechamentos e conferência */
.simulator-module, .checker-module { padding: 1.25rem; }
.simulator-heading { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.simulator-form, .checker-form { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 0.85rem; margin: 1rem 0; }
.simulator-form label, .checker-form label { display: flex; flex-direction: column; gap: 0.35rem; color: var(--text-muted); font-size: 0.82rem; font-weight: 700; }
.simulator-form input, .simulator-form select, .checker-form input, .checker-form textarea { width: 100%; padding: 0.65rem 0.7rem; border: 1px solid var(--border); border-radius: 0.45rem; background: var(--bg-card); color: var(--text-main); font: inherit; box-sizing: border-box; }
.simulator-wide, .checker-form label:nth-child(2), .checker-form button { grid-column: 1 / -1; }
.simulator-form button { align-self: end; }
.checker-form textarea { min-height: 130px; resize: vertical; }
.checker-results { margin-top: 1rem; }
.checker-results p { color: var(--text-muted); overflow-wrap: anywhere; }
@media (max-width: 700px) { .simulator-form, .checker-form { grid-template-columns: 1fr; } .simulator-wide, .checker-form label:nth-child(2), .checker-form button { grid-column: auto; } .simulator-module, .checker-module { padding: 0.85rem; } }

/* Fase 3 — HeatMap, Tendências e Comparativo */
.phase3-module { padding: 1.25rem; }
.phase3-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.phase3-heading label { display: flex; flex-direction: column; gap: 0.3rem; color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.phase3-heading select { padding: 0.55rem; border: 1px solid var(--border); border-radius: 0.4rem; background: var(--bg-card); color: var(--text-main); }
.heatmap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 0.45rem; margin-top: 1.2rem; }
.heat-cell { min-height: 62px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.25rem; border: 1px solid rgba(56,189,248,calc(var(--heat-alpha) * .65)); border-radius: 0.45rem; background: rgba(14,165,233,var(--heat-alpha)); color: #e0f2fe; }
.heat-cell span { font-size: 0.85rem; font-weight: 800; }
.heat-cell strong { font-size: 0.72rem; opacity: 0.9; }
.trend-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; margin-top: 1.2rem; }
.trend-columns h3 { margin-top: 0; font-size: 1rem; }
.trend-row { display: grid; grid-template-columns: 42px minmax(0,1fr) 72px; align-items: center; gap: 0.5rem; margin: 0.55rem 0; font-size: 0.82rem; }
.trend-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-track { height: 0.62rem; overflow: hidden; border-radius: 999px; background: rgba(148,163,184,0.18); }
.trend-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#06b6d4,#22c55e); }
.trend-row strong { text-align: right; font-size: 0.75rem; }
@media (max-width: 700px) { .phase3-module { padding: 0.85rem; } .trend-columns { grid-template-columns: 1fr; gap: 1rem; } .heatmap-grid { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); } }

/* Fase 4 — IA explicável e recomendações preditivas */
.ia-module { padding: 1.25rem; }
.ia-disclaimer { display: flex; gap: 0.55rem; align-items: flex-start; margin: 1rem 0; padding: 0.8rem 0.9rem; border: 1px solid rgba(251,191,36,0.45); border-radius: 0.55rem; background: rgba(251,191,36,0.09); color: #fde68a; font-size: 0.86rem; }
.ia-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.ia-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.85rem; border: 1px solid var(--border); border-radius: 0.55rem; background: rgba(56,189,248,0.07); }
.ia-card span { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; }
.ia-card strong { overflow-wrap: anywhere; color: #7dd3fc; }
.ia-method { margin-top: 1rem; color: var(--text-muted); font-size: 0.86rem; }
.ia-method summary { cursor: pointer; color: #a7f3d0; font-weight: 700; }
.ia-method p { line-height: 1.55; }
@media (max-width: 700px) { .ia-module { padding: 0.85rem; } .ia-summary { grid-template-columns: 1fr; } .ia-disclaimer { font-size: 0.8rem; } }

/* Ajustes 2026-09-14 — escopo, premiação e recursos do Dashboard */
.header-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; flex: 1; }
.dashboard-result-line { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 180px; padding: 0.65rem 0.85rem; border-radius: 0.55rem; background: rgba(37,99,235,0.14); border: 1px solid rgba(96,165,250,0.45); }
.dashboard-result-line strong { color: #7dd3fc; }
.official-prizes { margin-top: 1rem; }
.official-prizes h2, .predictive-card h2, .suggestions-card h2 { margin-bottom: 0.7rem; }
.scope-resource-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.scope-resource-heading label { display: flex; flex-direction: column; gap: 0.3rem; color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.scope-resource-heading select { padding: 0.55rem; border: 1px solid var(--border); border-radius: 0.4rem; background: var(--bg-card); color: var(--text-main); }
.fixed-suggestion-size { display: flex; flex-direction: column; gap: 0.3rem; justify-content: end; color: var(--text-muted); font-size: 0.8rem; font-weight: 700; }
.fixed-suggestion-size strong { color: #7dd3fc; font-size: 0.95rem; }
.dashboard-scope-resources .history-table th, .dashboard-scope-resources .history-table td, .official-prizes .history-table th, .official-prizes .history-table td { text-align: center; vertical-align: middle; }
.suggestions-card .btn-retry { margin-top: 0.8rem; }
.suggestion-actions { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0.65rem; align-items: stretch; width: 100%; }
.suggestion-actions .btn-retry { text-decoration: none; text-align: center; }
.suggestion-actions .btn-rules { background: rgba(16,185,129,0.14); border-color: rgba(52,211,153,0.55); color: #6ee7b7; }
.suggestion-actions .btn-whatsapp { background: rgba(34,197,94,0.16); border-color: rgba(74,222,128,0.65); color: #86efac; }
.suggestion-actions .btn-retry { display: block; width: 100%; max-width: 100%; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
.suggestions-table-wrap { overflow-x: auto; max-width: 100%; }
.suggestions-table-wrap .history-table { min-width: 1250px; }
.rjs-layer-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; margin: 0.9rem 0 1rem; }
.rjs-layer-summary > div { padding: 0.65rem 0.5rem; border: 1px solid var(--border); border-radius: 0.5rem; background: rgba(56,189,248,0.06); text-align: center; }
.rjs-layer-summary span, .rjs-layer-summary strong { display: block; }
.rjs-layer-summary span { color: var(--text-muted); font-size: 0.68rem; text-transform: uppercase; }
.rjs-layer-summary strong { margin-top: 0.25rem; color: #7dd3fc; font-size: 0.86rem; }
.advanced-summary-card { margin-bottom: 1rem; }
.advanced-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.9rem; }
.advanced-summary-grid > div { padding: 0.7rem 0.55rem; border: 1px solid var(--border); border-radius: 0.5rem; background: rgba(16,185,129,0.07); text-align: center; }
.advanced-summary-grid span, .advanced-summary-grid strong { display: block; }
.advanced-summary-grid span { color: var(--text-muted); font-size: 0.68rem; text-transform: uppercase; }
.advanced-summary-grid strong { margin-top: 0.28rem; color: #a7f3d0; font-size: 0.9rem; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .header-left { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.55rem; }
  .header-left .scope-selector { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .header-left .modality-selector { grid-column: 1 / -1; grid-row: 3; width: 100%; }
  .header-left .btn-icon { grid-column: 1; grid-row: 1; width: 40px; }
  .custom-scope-fields { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); }
  .custom-scope-fields .btn-scope-apply { grid-column: 1 / -1; width: 100%; }
  .dashboard-result-line { min-width: 100%; justify-content: space-between; }
  .scope-resource-heading { align-items: stretch; }
  .scope-resource-heading label, .scope-resource-heading select { width: 100%; }
  .rjs-layer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .advanced-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .suggestion-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .suggestion-actions .btn-retry { width: 100%; min-height: 44px; box-sizing: border-box; }
  /* Jogos sugeridos: no celular exibir somente sequência e jogo. O CSV mantém todas as colunas. */
  .suggestions-table-wrap { overflow-x: visible; }
  .suggestions-table-wrap .history-table { min-width: 0; table-layout: fixed; }
  .suggestions-table-wrap .history-table th,
  .suggestions-table-wrap .history-table td { display: none; }
  .suggestions-table-wrap .history-table th:nth-child(1),
  .suggestions-table-wrap .history-table td:nth-child(1),
  .suggestions-table-wrap .history-table th:nth-child(3),
  .suggestions-table-wrap .history-table td:nth-child(3) { display: table-cell; width: 50%; }
  .suggestions-table-wrap .history-table th:nth-child(1)::after { content: "SEQUÊNCIA"; font-size: 0.78rem; }
  .suggestions-table-wrap .history-table th:nth-child(3)::after { content: "JOGO"; font-size: 0.78rem; }
  .suggestions-table-wrap .history-table th:nth-child(1),
  .suggestions-table-wrap .history-table th:nth-child(3) { font-size: 0; }
  .suggestions-table-wrap .history-table th,
  .suggestions-table-wrap .history-table td { white-space: normal; overflow-wrap: anywhere; }
}

/* Tabelas analíticas no celular: cartões centralizados, sem alinhamento à direita. */
@media (max-width: 700px) {
  .official-prizes h2,
  .predictive-card h2 {
    text-align: center;
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .official-prizes .table-responsive,
  .predictive-card .table-responsive {
    overflow: visible;
  }

  .official-prizes .history-table,
  .official-prizes .history-table tbody,
  .predictive-card .history-table,
  .predictive-card .history-table tbody {
    display: block;
    width: 100%;
  }

  .official-prizes .history-table thead,
  .predictive-card .history-table thead {
    display: none;
  }

  .official-prizes .history-table tr,
  .predictive-card .history-table tr {
    display: grid;
    width: 100%;
    margin: 0 0 0.8rem;
    padding: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: rgba(255,255,255,0.025);
  }

  .official-prizes .history-table td,
  .predictive-card .history-table td {
    display: flex;
    width: auto;
    min-width: 0;
    min-height: 3.1rem;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.18rem;
    padding: 0.45rem 0.25rem;
    border: 0;
    text-align: center !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .official-prizes .history-table td::before,
  .predictive-card .history-table td::before {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .official-prizes .history-table td:nth-child(1)::before { content: "Faixa"; }
  .official-prizes .history-table td:nth-child(2)::before { content: "Descrição"; }
  .official-prizes .history-table td:nth-child(3)::before { content: "Ganhadores"; }
  .official-prizes .history-table td:nth-child(4)::before { content: "Prêmio"; }

  .predictive-card .history-table td:nth-child(1)::before { content: "Posição"; }
  .predictive-card .history-table td:nth-child(2)::before { content: "Dezena / item"; }
  .predictive-card .history-table td:nth-child(3)::before { content: "Frequência"; }
  .predictive-card .history-table td:nth-child(4)::before { content: "Atraso atual"; }
  .predictive-card .history-table td:nth-child(5)::before { content: "Índice preditivo"; }
  .predictive-card .history-table td:nth-child(6)::before { content: "Status"; }

  .official-prizes .history-table td:nth-child(4),
  .predictive-card .history-table td:nth-child(5) {
    color: #7dd3fc;
    font-weight: 700;
  }

  .official-prizes .premiacao-dupla td:nth-child(1)::before { content: "Sorteio"; }
  .official-prizes .premiacao-dupla td:nth-child(2)::before { content: "Faixa"; }
  .official-prizes .premiacao-dupla td:nth-child(3)::before { content: "Descrição"; }
  .official-prizes .premiacao-dupla td:nth-child(4)::before { content: "Ganhadores"; }
  .official-prizes .premiacao-dupla td:nth-child(5)::before { content: "Prêmio"; }
  .official-prizes .premiacao-dupla td:nth-child(5) {
    color: #7dd3fc;
    font-weight: 700;
  }
}

/* Padronização global: cabeçalhos e dados centralizados */
.history-table th,
.history-table td,
.hotcold-table th,
.hotcold-table td,
.phase3-module table th,
.phase3-module table td,
.predictive-card table th,
.predictive-card table td,
.suggestions-card table th,
.suggestions-card table td {
  text-align: center;
  vertical-align: middle;
}

/* Super Sete — estatísticas por linha e ciclos */
.supersete-wide-table { overflow-x: auto; max-width: 100%; }
.supersete-wide-table .history-table { min-width: 1500px; }
.supersete-matrix-table { overflow-x: auto; max-width: 100%; }
.supersete-matrix-table .history-table { min-width: 620px; }
.supersete-matrix-table th, .supersete-matrix-table td { text-align: center !important; vertical-align: middle; }
.ss-transition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 0.8rem; }
.ss-transition-panel { min-width: 0; padding: 0.65rem; border: 1px solid var(--border); border-radius: 0.55rem; background: rgba(15,23,42,0.35); }
.ss-transition-panel h4 { margin: 0 0 0.5rem; text-align: center; color: var(--accent); }
.supersete-transition-table { overflow-x: auto; }
.supersete-transition-table .history-table { min-width: 620px; }
.supersete-transition-table th, .supersete-transition-table td { text-align: center !important; padding: 0.3rem; }
.ss-section-title { margin: 1.5rem 0 .75rem; color: var(--text-main); }
@media (max-width: 700px) {
  .supersete-wide-table .history-table { min-width: 1350px; }
  .ss-section-title { font-size: 1.05rem; }
}

/* Resumo avançado: separa claramente rótulo, dois-pontos e valor. */
.advanced-summary-grid > div,
.rjs-layer-summary > div {
  min-width: 0;
  line-height: 1.35;
}
.advanced-summary-grid span,
.rjs-layer-summary span {
  margin-bottom: 0.28rem;
  white-space: normal;
}
.advanced-summary-grid strong,
.rjs-layer-summary strong {
  padding-top: 0.08rem;
  line-height: 1.35;
}
@media (max-width: 700px) {
  .advanced-summary-grid { gap: 0.8rem; }
  .advanced-summary-grid > div,
  .rjs-layer-summary > div { padding: 0.8rem 0.65rem; }
  .advanced-summary-grid span,
  .rjs-layer-summary span { font-size: 0.72rem; }
  .advanced-summary-grid strong,
  .rjs-layer-summary strong { font-size: 0.92rem; }
}
/* Conferência de Jogos: controles organizados para computador, tablet e celular. */
.checker-custom-contest,.checker-actions{display:flex;align-items:end;gap:.65rem;flex-wrap:wrap}
.checker-custom-contest label{display:flex;flex-direction:column;gap:.3rem}
.checker-custom-contest input{min-width:150px}
.checker-actions{align-items:center;margin-top:.75rem}
.checker-upload,.checker-actions button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;cursor:pointer}
.checker-upload{padding:.65rem .9rem;border:1px solid #b7c7dc;border-radius:8px;background:#f5f8fc;color:#17335f}
.checker-format-hint{margin:.45rem 0 0;color:var(--text-muted);font-size:.82rem;line-height:1.45}
.logo-home-link{display:block;color:inherit;text-decoration:none;cursor:pointer}
.logo-home-link:focus-visible{outline:3px solid #f2b84b;outline-offset:4px}
@media(max-width:700px){.checker-custom-contest,.checker-actions{align-items:stretch;flex-direction:column}.checker-custom-contest input,.checker-custom-contest button,.checker-actions button,.checker-upload{width:100%;min-width:0}.checker-module textarea{min-height:160px}}

/* UX 2026-09-26 — Cabeçalho responsivo: escopo, ações e modalidades */
@media (min-width: 901px) and (max-width: 1600px) {
  header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.8rem 1.15rem;
  }
  .header-left { display: contents; }
  .header-left .btn-icon { grid-column: 1; grid-row: 1; width: 42px; flex: 0 0 auto; }
  .header-left .scope-selector { grid-column: 1; grid-row: 1; margin-left: 3.15rem; min-width: 0; }
  .header-left .modality-selector { grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; padding: 0.1rem 0 0.2rem; scrollbar-width: thin; }
  .portal-account-area { grid-column: 2; grid-row: 1; max-width: 100%; gap: 0.35rem; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 0.1rem; }
  .portal-account-area > button, .portal-account-area > a, .portal-account-area .btn-login, .portal-account-area .auth-user-name { font-size: 0.78rem; padding: 0.5rem 0.62rem; }
  .portal-account-area .account-control { gap: 0.3rem; }
  .portal-account-area .auth-user-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; }
}

@media (min-width: 701px) and (max-width: 900px) {
  header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem; padding: 0.7rem 0.85rem; }
  .header-left { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem; width: 100%; }
  .header-left .btn-icon { grid-column: 1; grid-row: 1; width: 42px; }
  .header-left .scope-selector { grid-column: 2; grid-row: 1; min-width: 0; }
  .header-left .modality-selector { grid-column: 1 / -1; grid-row: 2; width: 100%; padding: 0.1rem 0 0.2rem; scrollbar-width: thin; }
  .portal-account-area { grid-column: 1; width: 100%; justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.15rem; scrollbar-width: thin; }
}

@media (max-width: 700px) {
  header { padding: 0.65rem 0.7rem; gap: 0.55rem; }
  .header-left .scope-selector { min-width: 0; }
  .header-left .scope-selector select { min-width: 0; width: 100%; }
  .header-left .modality-selector { padding-bottom: 0.35rem; scrollbar-width: thin; }
}

@media (prefers-reduced-motion: reduce) {
  .header-downloads-button, .header-plans-button, .header-admin-button, .btn-login { transition: none !important; }
}

/* UX 2026-09-26 — Menu sanduíche de modalidades em telas menores */
.modality-menu { min-width: 0; }
.modality-menu-toggle { display: none; }

@media (max-width: 900px) {
  .modality-menu { position: relative; min-width: 0; width: 100%; }
  .modality-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 42px;
    padding: 0.58rem 0.75rem;
    border: 1px solid rgba(96,165,250,0.55);
    border-radius: 0.55rem;
    background: rgba(37,99,235,0.16);
    color: var(--text-main);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
  }
  .modality-menu-toggle:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }
  .modality-menu-toggle > span { color: var(--text-muted); font-size: 0.78rem; }
  .modality-menu-toggle > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7dd3fc; }
  .modality-menu-chevron { margin-left: auto; color: var(--text-muted); transition: transform 0.2s ease; }
  .modality-menu.is-open .modality-menu-chevron { transform: rotate(180deg); }
  .modality-menu .modality-selector {
    display: none;
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(62vh, 360px);
    overflow-y: auto;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: #172338;
    box-shadow: 0 14px 30px rgba(0,0,0,0.36);
  }
  .modality-menu.is-open .modality-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .modality-menu .btn-modality { width: 100%; min-height: 42px; padding: 0.55rem 0.65rem; border-radius: 0.45rem; text-align: center; }
}

@media (max-width: 430px) {
  .modality-menu.is-open .modality-selector { grid-template-columns: 1fr; }
  .modality-menu .btn-modality { min-height: 44px; }
}

/* UX 2026-09-26 — Fechamento intuitivo do Sidebar no celular */
.sidebar-backdrop { display: none; }
@media (max-width: 700px) {
  .sidebar-backdrop {
    position: fixed;
    z-index: 19;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.58);
    cursor: pointer;
  }
  body:has(#sidebar.is-open) .sidebar-backdrop { display: block; }
}

/* O contêiner substitui o seletor direto na grade do header. */
@media (min-width: 901px) and (max-width: 1600px) {
  .header-left .modality-menu { grid-column: 1 / -1; grid-row: 2; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .header-left .modality-menu { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 700px) {
  .header-left .modality-menu { grid-column: 1 / -1; grid-row: 3; }
}

/* Aviso de privacidade — apenas cookies essenciais atualmente utilizados */
.cookie-banner-container[hidden] { display: none !important; }
.cookie-banner-container { position: fixed; z-index: 9999; left: 0; right: 0; bottom: 0; padding: 0.85rem 1rem; background: #111827; color: #f8fafc; border-top: 1px solid #475569; box-shadow: 0 -8px 24px rgba(0,0,0,.28); }
.cookie-banner-content { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cookie-banner-content p { margin: 0; font-size: .88rem; line-height: 1.45; }
.cookie-banner-content a { color: #93c5fd; text-decoration: underline; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .5rem; flex: 0 0 auto; }
.cookie-banner-actions button { min-height: 40px; padding: .55rem .8rem; border: 1px solid #64748b; border-radius: .4rem; background: #334155; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cookie-banner-actions button:last-child { background: #2563eb; border-color: #60a5fa; }
.cookie-banner-actions button:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }
@media (max-width: 700px) { .cookie-banner-content { align-items: stretch; flex-direction: column; } .cookie-banner-actions { display: grid; grid-template-columns: 1fr 1fr; } .cookie-banner-actions button { width: 100%; } }
@media (max-width: 390px) { .cookie-banner-actions { grid-template-columns: 1fr; } }

/* Tendências — exportação e contexto do universo */
.trend-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; flex-wrap: wrap; }
.trend-actions .btn { min-height: 40px; white-space: nowrap; }
.trend-note { margin-top: .45rem; }
@media (max-width: 700px) {
  .trend-actions { width: 100%; justify-content: stretch; }
  .trend-actions .btn { width: 100%; }
  .trend-actions #trend-export-status { width: 100%; text-align: center; }
}

/* Tendências — exportação CSV abaixo da visualização */
.trend-actions-bottom { justify-content: flex-start; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Exportação em lote — Admin/VIP: os 1000 jogos não são renderizados na tabela */
.bulk-suggestion-export { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: stretch; gap: .55rem; }
.bulk-suggestion-export .dashboard-meta { margin: 0; }
.bulk-suggestion-export .btn-retry { margin-top: 0; width: 100%; }
@media (min-width: 701px) {
  .bulk-suggestion-export .btn-retry { max-width: 22rem; }
}

/* Centralização do botão de exportação em lote */
.bulk-suggestion-export { align-items: center; text-align: center; }
.bulk-suggestion-export .btn-retry { align-self: center; }

/* Conferência de jogos — destaque de premiação */
.checker-premiado-row { background: rgba(16, 185, 129, 0.14); }
.checker-premiado-row td { font-weight: 600; }
.checker-status { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.checker-status-premiado { color: #064e3b; background: #6ee7b7; }
.checker-status-nao-premiado { color: #cbd5e1; background: rgba(100, 116, 139, .32); }

/* Conferência por escopo — tabela de distribuição e alinhamento central */
.checker-range-fields{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:.75rem;grid-column:1/-1}
.checker-range-fields label{display:flex;flex-direction:column;gap:.35rem;color:var(--text-muted);font-size:.82rem;font-weight:700}
.checker-summary-table th,.checker-summary-table td,.checker-detail-table th,.checker-detail-table td{text-align:center;vertical-align:middle}
.checker-summary-table{min-width:900px}
.checker-detail-table{min-width:860px}
.checker-total-row{background:rgba(59,130,246,.12)}
.checker-total-row th{font-weight:800}
.checker-summary-table tbody tr:hover,.checker-detail-table tbody tr:hover{background:rgba(148,163,184,.08)}
@media(max-width:700px){.checker-range-fields{grid-template-columns:1fr}.checker-summary-table,.checker-detail-table{font-size:.75rem}.checker-summary-table th,.checker-summary-table td,.checker-detail-table th,.checker-detail-table td{padding:.45rem .35rem}}

/* Conferência — seletor de escopo e exportações opcionais */
.checker-form{display:grid;grid-template-columns:minmax(240px,1fr);gap:1rem;margin-top:1rem;padding:1rem;border:1px solid var(--border);border-radius:.8rem;background:linear-gradient(135deg,rgba(30,64,175,.12),rgba(15,23,42,.22));box-shadow:0 8px 22px rgba(15,23,42,.12)}
.checker-form>label{display:flex;flex-direction:column;gap:.4rem;color:var(--text-muted);font-size:.82rem;font-weight:700}
.checker-form select,.checker-form input,.checker-form textarea{width:100%;border:1px solid var(--border);border-radius:.55rem;background:var(--surface-2,#f8fafc);color:var(--text-main,#0f172a);font:inherit;padding:.68rem .78rem}
.checker-form select:focus,.checker-form input:focus,.checker-form textarea:focus{outline:3px solid rgba(96,165,250,.35);border-color:#60a5fa}
.checker-form>label:first-child{max-width:32rem}
.checker-range-fields{padding:.8rem;border:1px solid rgba(96,165,250,.4);border-radius:.65rem;background:rgba(37,99,235,.08)}
.checker-actions{display:flex;align-items:stretch;justify-content:flex-start;gap:.65rem;flex-wrap:wrap;margin-top:.2rem}
.checker-actions .checker-upload,.checker-actions button{min-height:44px}
.checker-detail-export{border-color:#7c3aed!important;color:#5b21b6!important;background:rgba(124,58,237,.08)!important}
.checker-detail-note{margin:1rem 0 0;padding:.8rem 1rem;border-left:4px solid #60a5fa;border-radius:.45rem;background:rgba(59,130,246,.08);color:var(--text-muted);line-height:1.5}
@media(max-width:700px){.checker-form{padding:.8rem}.checker-form>label:first-child{max-width:none}.checker-actions{flex-direction:column}.checker-actions .checker-upload,.checker-actions button{width:100%}}

/* Conferência — controles com o mesmo padrão cromático do seletor de Escopo */
.checker-form select,
.checker-form select option,
.checker-form input,
.checker-form textarea {
  background-color: var(--bg-card);
  color: var(--text-main);
  color-scheme: dark;
}
.checker-form select option:checked,
.checker-form select option:hover {
  background-color: var(--accent);
  color: #fff;
}
.checker-form select::placeholder,
.checker-form input::placeholder,
.checker-form textarea::placeholder { color: var(--text-muted); }

/* Correção definitiva: o atributo hidden deve prevalecer sobre o display do grid */
.checker-range-fields[hidden] {
  display: none !important;
}
