:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #1b263b;
  --muted: #5c677d;
  --accent: #0a9396;
  --accent-2: #ee9b00;
  --danger: #b00020;
  --line: #dbe2ef;
  --radius: 12px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  background: transparent;
  position: relative;
}

/* ── Balones decorativos de fondo ────────────────────────────────── */
.bg-balls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-ball {
  position: absolute;
  background-image: url('../img/ball.webp');
  background-size: contain;
  background-repeat: no-repeat;
  display: block;
}

/* Posiciones y tamaños de cada balón */
.bg-ball--1 { width: 320px; height: 320px; top:  -80px; right: -60px;  opacity: 0.18; }
.bg-ball--2 { width: 260px; height: 260px; bottom: -60px; left: -40px; opacity: 0.15; }
.bg-ball--3 { width: 200px; height: 200px; top:  30%;  left:  -50px;   opacity: 0.14; }
.bg-ball--4 { width: 180px; height: 180px; top:  55%;  right: -30px;   opacity: 0.14; }
.bg-ball--5 { width: 150px; height: 150px; top:  15%;  left:  38%;     opacity: 0.10; }
.bg-ball--6 { width: 220px; height: 220px; bottom: 10%; left:  55%;    opacity: 0.12; }
.bg-ball--7 { width: 140px; height: 140px; top:  70%;  left:  25%;     opacity: 0.10; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(95deg, #003049, #005f73);
  color: #fff;
  border-bottom: 4px solid var(--accent-2);
  position: relative;
  z-index: 10;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
  font-weight: 600;
}

main.container {
  padding: 1rem 0 2rem;
  position: relative;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

.card h2, .card h3 {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem;
}

input, select, button {
  width: 100%;
  border: 1px solid #bac8d3;
  border-radius: 8px;
  padding: 0.6rem 0.65rem;
  margin-bottom: 0.65rem;
  font-size: 0.95rem;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 0.4rem;
}

small {
  display: block;
  margin-top: -0.35rem;
  margin-bottom: 0.65rem;
  color: var(--muted);
}

button {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #495057;
}

button.danger {
  background: var(--danger);
}

.actions-inline {
  display: flex;
  gap: 0.5rem;
}

.actions-inline > * {
  width: auto;
}

.alert {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0.7rem 0;
  border: 1px solid;
}

.alert-success {
  background: #e9fbe9;
  border-color: #8ad18a;
}

.alert-error {
  background: #ffeded;
  border-color: #ff9d9d;
}

.kpi {
  font-size: 1.7rem;
  font-weight: 800;
}

.kpi-label {
  color: var(--muted);
}

.user-hero {
  color: #fff;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  min-height: 210px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  box-shadow: inset 0 -100px 120px rgba(0, 0, 0, 0.45);
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #edf2f7;
}

.badge.locked {
  background: #ffe3e3;
}

.group-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.75rem 0 1rem;
}

.group-tab {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid #bac8d3;
  border-radius: 999px;
  padding: 0.45rem 0.55rem;
  font-weight: 700;
  background: #f8fbff;
}

.group-tab.is-active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

@media (max-width: 860px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .group-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  nav a {
    margin-left: 0.6rem;
    font-size: 0.9rem;
  }
}

.auth-page {
  background: transparent;
}

html:has(.auth-page) {
  background: #1e268b;
}

.auth-main {
  padding: 0;
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(420px, 1fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #7aa0e6 0 47%, #3650ea 47% 85%, #78a0e4 85%);
}

/* Balones decorativos — auth visual */
.auth-visual::before,
.auth-visual::after {
  content: '';
  position: absolute;
  background-image: url('../img/ball.webp');
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

.auth-visual::before {
  width: 52%;
  padding-top: 52%;
  top: -14%;
  left: -10%;
  opacity: 0.18;
}

.auth-visual::after {
  width: 62%;
  padding-top: 62%;
  bottom: -18%;
  left: 10%;
  opacity: 0.13;
}

.auth-brand {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 9%;
  text-align: left;
  color: #fff;
}

.auth-brand-logo {
  width: min(300px, 70%);
  display: block;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.35));
}

.auth-brand-tagline {
  margin: 0;
  font-size: clamp(1.25rem, 1vw + 0.95rem, 2rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-form-col {
  background: #232c96;
  padding: 3.5rem clamp(1.25rem, 3vw, 3.5rem);
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(600px, 100%);
  background: #ececec;
  border-radius: 14px;
  border: 1px solid #dae0ef;
  box-shadow: 0 25px 45px rgba(10, 15, 75, 0.32);
  padding: clamp(1.2rem, 1rem + 1.2vw, 2.4rem);
}

.auth-card h2 {
  margin: 0 0 1.35rem;
  text-align: center;
  color: #071d56;
  font-size: clamp(1.6rem, 1.1rem + 0.8vw, 2.25rem);
}

.auth-card-compact {
  width: min(520px, 100%);
}

.auth-subtitle {
  margin: -0.45rem 0 1.2rem;
  text-align: center;
  color: #63718f;
}

.auth-card .form-label {
  margin-bottom: 0.35rem;
  color: #5a6683;
  font-weight: 600;
}

.auth-card .form-control {
  border: 1px solid #c2cbdd;
  border-radius: 9px;
  padding: 0.75rem 0.8rem;
  background: #f5f7fb;
  margin-bottom: 0.9rem;
}

.auth-card .form-control:focus {
  border-color: #6076f4;
  box-shadow: 0 0 0 3px rgba(73, 99, 255, 0.15);
}

.auth-card .btn-primary {
  border-radius: 10px;
  padding: 0.78rem;
  margin-top: 0.35rem;
  background: #232b8f;
  border-color: #232b8f;
  font-weight: 700;
}

.auth-inline-link {
  text-align: right;
  margin: -0.1rem 0 0.45rem;
}

.auth-inline-link a {
  color: #2868e6;
  text-decoration: none;
  font-weight: 600;
}

.auth-register-link {
  margin: 1.2rem 0 0;
  text-align: center;
  color: #63718f;
}

.auth-register-link a {
  color: #2868e6;
  text-decoration: none;
  font-weight: 700;
}

.auth-card .alert {
  margin-top: 0;
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    min-height: 260px;
  }

  .auth-brand {
    bottom: 1.2rem;
  }

  .auth-brand-logo {
    width: min(220px, 60%);
    margin-bottom: 0.5rem;
  }

  .auth-brand-tagline {
    font-size: 1.05rem;
  }

  .auth-form-col {
    padding-top: 1.4rem;
    padding-bottom: 1.8rem;
  }
}

.app-brand-page {
  background: transparent;
  min-height: 100vh;
  position: relative;
}

html:has(.app-brand-page) {
  background: linear-gradient(178deg, #e9efff 0%, #d9e6ff 36%, #ecf3ff 100%);
}

.app-brand-main {
  position: relative;
}

.app-brand-page .card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(121, 140, 224, 0.2);
  box-shadow: 0 18px 35px rgba(30, 40, 118, 0.1);
}

.app-brand-page .btn-primary,
.app-brand-page button,
.app-brand-page .group-tab.is-active {
  background: #232b8f;
  border-color: #232b8f;
}

.app-brand-page .group-tab {
  background: #f2f5ff;
  border-color: #c4cdee;
}

.brand-banner {
  margin-bottom: 1rem;
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  color: #fff;
  background:
    radial-gradient(circle at 0% 0%, rgba(130, 169, 238, 0.42), transparent 32%),
    linear-gradient(120deg, #243092 0%, #3550e8 58%, #2a379f 100%);
  box-shadow: 0 20px 35px rgba(17, 26, 94, 0.28);
}

.brand-banner h1 {
  margin: 0;
  font-size: clamp(1.15rem, 1rem + 0.85vw, 1.85rem);
}

.brand-banner p {
  margin: 0.35rem 0 0;
  color: rgba(240, 244, 255, 0.93);
}

.brand-banner-kicker {
  margin: 0 0 0.3rem;
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d8e6ff;
}

@media (max-width: 860px) {
  .brand-banner {
    padding: 0.95rem;
  }
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.match-group-header h3 {
  margin-bottom: 0.2rem;
}

.section-heading p,
.match-group-header p {
  margin: 0;
  color: var(--muted);
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #edf2ff;
  color: #243092;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-pill.is-status {
  background: #e9eefb;
  color: #4b5878;
}

.match-group-stack,
.result-entry-list,
.result-finalized-list {
  display: grid;
  gap: 1rem;
}

.match-group-block {
  border: 1px solid rgba(121, 140, 224, 0.18);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(243, 247, 255, 0.68);
}

.match-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.admin-match-list {
  display: grid;
  gap: 0.85rem;
}

.admin-match-card,
.result-entry-card,
.result-finalized-card {
  border: 1px solid rgba(121, 140, 224, 0.18);
  border-radius: 12px;
  background: #fff;
  padding: 0.95rem;
  box-shadow: 0 10px 24px rgba(32, 45, 122, 0.08);
}

.admin-match-summary,
.result-entry-head,
.result-finalized-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.admin-match-teams {
  font-size: 1rem;
  font-weight: 800;
  color: #14245e;
  margin-bottom: 0.25rem;
}

.admin-match-teams span {
  color: #64759a;
  font-weight: 700;
}

.admin-match-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: #66738f;
  font-size: 0.9rem;
}

.admin-match-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.admin-match-editor {
  margin-top: 0.85rem;
}

.admin-match-editor label {
  display: block;
  margin-bottom: 0.25rem;
  color: #5b6887;
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-match-actions {
  display: flex;
  align-items: flex-end;
}

.admin-match-actions .btn,
.admin-delete-form .btn {
  margin-bottom: 0;
}

.admin-delete-form {
  margin-top: 0.7rem;
}

.result-entry-card {
  margin-bottom: 0;
}

.result-score {
  font-size: 1.2rem;
  font-weight: 800;
  color: #243092;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .section-heading,
  .match-group-header,
  .admin-match-summary,
  .result-entry-head,
  .result-finalized-card {
    flex-direction: column;
  }

  .admin-match-badges {
    justify-content: flex-start;
  }
}

/* En auth-page los balones globales van detrás del shell */
.auth-page .bg-balls {
  opacity: 0.5;
}

.auth-page .bg-ball--5,
.auth-page .bg-ball--6,
.auth-page .bg-ball--7 {
  display: none;
}
.team-flag {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0.35rem;
  line-height: 1;
}

.team-flag img {
  display: block;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* ── Mascota en el banner ────────────────────────────────────────── */
.brand-banner {
  position: relative;
  overflow: hidden;
}

.mascota-banner {
  position: absolute;
  right: 1.25rem;
  bottom: 0;
  height: 110%;
  max-height: 130px;
  width: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  opacity: 0.92;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

@media (max-width: 600px) {
  .mascota-banner {
    max-height: 90px;
    right: 0.6rem;
  }
}

/* ── Paginador histórico ─────────────────────────────────────────── */
.hist-paginador {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.hist-pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.hist-pag-btn:hover:not(.disabled):not(.active) {
  background: #eef2ff;
  border-color: #8a9de0;
}

.hist-pag-btn.active {
  background: #243092;
  border-color: #243092;
  color: #fff;
  pointer-events: none;
}

.hist-pag-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.hist-pag-dots {
  padding: 0 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 2rem;
}

.hist-pag-info {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── Gráficas de progreso por fase ───────────────────────────────── */
.fase-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1.25rem 1rem;
  margin-top: 0.5rem;
}

.fase-chart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.fase-chart-wrap {
  position: relative;
  width: 110px;
  height: 110px;
}

.fase-chart-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  pointer-events: none;
}

.fase-chart-label {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.fase-chart-sub {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}


/* ══════════════════════════════════════════════════════════════════════
   TEMAS VISUALES
   ══════════════════════════════════════════════════════════════════════ */

/* Tema: Clásico (por defecto, no necesita override) */
.tema-clasico {
  /* Usa las variables :root originales */
}

/* Tema: Oscuro */
.tema-oscuro {
  --bg: #0f172a;
  --panel: #1e293b;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #f59e0b;
  --danger: #ef4444;
  --line: #334155;
}

html:has(.tema-oscuro) {
  background: #0f172a;
}

.tema-oscuro .site-header {
  background: linear-gradient(95deg, #0f172a, #1e293b);
  border-bottom-color: #f59e0b;
}

.tema-oscuro .brand-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.2), transparent 32%),
    linear-gradient(120deg, #1e293b 0%, #334155 58%, #1e293b 100%);
}

.tema-oscuro.app-brand-page .card {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(51, 65, 85, 0.6);
}

.tema-oscuro .group-tab {
  background: #1e293b;
  border-color: #475569;
  color: #e2e8f0;
}

.tema-oscuro .group-tab.is-active {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #0f172a;
}

.tema-oscuro .admin-match-card,
.tema-oscuro .result-entry-card,
.tema-oscuro .result-finalized-card {
  background: #1e293b;
  border-color: #334155;
}

.tema-oscuro .admin-match-teams {
  color: #e2e8f0;
}

.tema-oscuro .match-group-block {
  background: rgba(15, 23, 42, 0.5);
  border-color: #334155;
}

.tema-oscuro .admin-pill {
  background: #334155;
  color: #38bdf8;
}

.tema-oscuro table th,
.tema-oscuro table td {
  border-bottom-color: #334155;
}

.tema-oscuro .badge {
  background: #334155;
  color: #e2e8f0;
}

.tema-oscuro .badge.locked {
  background: #7f1d1d;
  color: #fca5a5;
}

.tema-oscuro input,
.tema-oscuro select {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

.tema-oscuro .user-hero {
  box-shadow: inset 0 -100px 120px rgba(0, 0, 0, 0.7);
}

/* Tema: Esmeralda */
.tema-esmeralda {
  --bg: #ecfdf5;
  --panel: #ffffff;
  --ink: #064e3b;
  --muted: #6b7280;
  --accent: #059669;
  --accent-2: #d97706;
  --danger: #dc2626;
  --line: #d1fae5;
}

html:has(.tema-esmeralda) {
  background: linear-gradient(178deg, #ecfdf5 0%, #d1fae5 36%, #ecfdf5 100%);
}

.tema-esmeralda .site-header {
  background: linear-gradient(95deg, #064e3b, #065f46);
  border-bottom-color: #d97706;
}

.tema-esmeralda .brand-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(5, 150, 105, 0.3), transparent 32%),
    linear-gradient(120deg, #064e3b 0%, #059669 58%, #064e3b 100%);
}

.tema-esmeralda.app-brand-page .card {
  border-color: rgba(5, 150, 105, 0.15);
}

.tema-esmeralda .group-tab {
  background: #f0fdf4;
  border-color: #86efac;
}

.tema-esmeralda .group-tab.is-active {
  background: #059669;
  border-color: #059669;
}

.tema-esmeralda .admin-pill {
  background: #d1fae5;
  color: #064e3b;
}

.tema-esmeralda.app-brand-page .btn-primary,
.tema-esmeralda.app-brand-page button,
.tema-esmeralda.app-brand-page .group-tab.is-active {
  background: #059669;
  border-color: #059669;
}

/* Tema: Atardecer */
.tema-atardecer {
  --bg: #fff7ed;
  --panel: #ffffff;
  --ink: #431407;
  --muted: #78716c;
  --accent: #ea580c;
  --accent-2: #dc2626;
  --danger: #b91c1c;
  --line: #fed7aa;
}

html:has(.tema-atardecer) {
  background: linear-gradient(178deg, #fff7ed 0%, #ffedd5 36%, #fff7ed 100%);
}

.tema-atardecer .site-header {
  background: linear-gradient(95deg, #7c2d12, #9a3412);
  border-bottom-color: #f59e0b;
}

.tema-atardecer .brand-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(234, 88, 12, 0.3), transparent 32%),
    linear-gradient(120deg, #7c2d12 0%, #ea580c 58%, #9a3412 100%);
}

.tema-atardecer.app-brand-page .card {
  border-color: rgba(234, 88, 12, 0.15);
}

.tema-atardecer .group-tab {
  background: #fff7ed;
  border-color: #fdba74;
}

.tema-atardecer .group-tab.is-active {
  background: #ea580c;
  border-color: #ea580c;
}

.tema-atardecer .admin-pill {
  background: #ffedd5;
  color: #7c2d12;
}

.tema-atardecer.app-brand-page .btn-primary,
.tema-atardecer.app-brand-page button,
.tema-atardecer.app-brand-page .group-tab.is-active {
  background: #ea580c;
  border-color: #ea580c;
}

/* Tema: Océano */
.tema-oceano {
  --bg: #ecfeff;
  --panel: #ffffff;
  --ink: #0c4a6e;
  --muted: #64748b;
  --accent: #0891b2;
  --accent-2: #eab308;
  --danger: #dc2626;
  --line: #cffafe;
}

html:has(.tema-oceano) {
  background: linear-gradient(178deg, #ecfeff 0%, #cffafe 36%, #ecfeff 100%);
}

.tema-oceano .site-header {
  background: linear-gradient(95deg, #0c4a6e, #155e75);
  border-bottom-color: #eab308;
}

.tema-oceano .brand-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(8, 145, 178, 0.3), transparent 32%),
    linear-gradient(120deg, #0c4a6e 0%, #0891b2 58%, #155e75 100%);
}

.tema-oceano.app-brand-page .card {
  border-color: rgba(8, 145, 178, 0.15);
}

.tema-oceano .group-tab {
  background: #ecfeff;
  border-color: #67e8f9;
}

.tema-oceano .group-tab.is-active {
  background: #0891b2;
  border-color: #0891b2;
}

.tema-oceano .admin-pill {
  background: #cffafe;
  color: #0c4a6e;
}

.tema-oceano.app-brand-page .btn-primary,
.tema-oceano.app-brand-page button,
.tema-oceano.app-brand-page .group-tab.is-active {
  background: #0891b2;
  border-color: #0891b2;
}

/* Tema: Arena */
.tema-arena {
  --bg: #fafaf9;
  --panel: #ffffff;
  --ink: #292524;
  --muted: #78716c;
  --accent: #a16207;
  --accent-2: #92400e;
  --danger: #b91c1c;
  --line: #e7e5e4;
}

html:has(.tema-arena) {
  background: linear-gradient(178deg, #fafaf9 0%, #f5f5f4 36%, #fafaf9 100%);
}

.tema-arena .site-header {
  background: linear-gradient(95deg, #44403c, #57534e);
  border-bottom-color: #a16207;
}

.tema-arena .brand-banner {
  background:
    radial-gradient(circle at 0% 0%, rgba(161, 98, 7, 0.25), transparent 32%),
    linear-gradient(120deg, #44403c 0%, #78716c 58%, #44403c 100%);
}

.tema-arena.app-brand-page .card {
  border-color: rgba(120, 113, 108, 0.2);
}

.tema-arena .group-tab {
  background: #fafaf9;
  border-color: #d6d3d1;
}

.tema-arena .group-tab.is-active {
  background: #a16207;
  border-color: #a16207;
}

.tema-arena .admin-pill {
  background: #f5f5f4;
  color: #44403c;
}

.tema-arena.app-brand-page .btn-primary,
.tema-arena.app-brand-page button,
.tema-arena.app-brand-page .group-tab.is-active {
  background: #a16207;
  border-color: #a16207;
}

/* ── Selector de tema: card activa ───────────────────────────────── */
.tema-preview-card {
  transition: box-shadow 0.2s, border-color 0.2s;
}

.tema-preview-card.tema-activo {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(10, 147, 150, 0.25), 0 8px 25px rgba(15, 23, 42, 0.08) !important;
}
