:root {
  --bg: #07111f;
  --bg-soft: #0e1b30;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(148, 163, 184, 0.24);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f766e;
  --accent-2: #0284c7;
  --action-link: #93c5fd;
  --badge-unified-bg: rgba(148, 163, 184, 0.22);
  --badge-unified-border: rgba(148, 163, 184, 0.38);
  --warning: #b45309;
  --shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

.alert {
  padding: .95rem 1rem;
  border-radius: 18px;
  margin-bottom: 1rem;
  font-weight: 700;
}
.alert-error {
  background: rgba(220, 38, 38, .08);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, .18);
}
.alert-success {
  background: rgba(22, 163, 74, .08);
  color: #166534;
  border: 1px solid rgba(22, 163, 74, .18);
}
.auth-shell { align-items: start; }
.auth-card { min-height: 100%; }
.auth-form { display: grid; gap: .9rem; }
.auth-form label { display: grid; gap: .38rem; }
.auth-form span { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.auth-form input,
.auth-form select,
.auth-form textarea {
  min-height: 48px; border-radius: 16px; border: 1px solid rgba(148,163,184,.28);
  padding: .8rem 1rem; font: inherit; background: white;
}
.auth-form textarea { min-height: 140px; resize: vertical; }
.auth-form small { display: block; margin-top: .2rem; color: #b91c1c; font-weight: 700; }
.admin-body {
  background: linear-gradient(180deg, #07111f 0%, #0e1b30 100%);
  color: #e2e8f0;
}
/* ── Nuevo shell admin (topbar horizontal) ── */
.sa-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.sa-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .55rem 1.25rem;
  background: rgba(2, 6, 23, .92);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  flex-wrap: wrap;
}
.sa-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: white;
  flex-shrink: 0;
}
.sa-brand-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
}
.sa-brand strong { display:block; font-family:Sora,sans-serif; font-size:.9rem; line-height:1.2; }
.sa-brand span { display:block; color: rgba(226,232,240,.62); font-size:.72rem; }
.sa-nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: center;
}
.sa-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .35rem .8rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(226,232,240,.82);
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.sa-nav a:hover { background: rgba(255,255,255,.10); color: white; }
.sa-nav a.sa-nav-active {
  background: rgba(14,165,233,.18);
  color: #7dd3fc;
  border-color: rgba(14,165,233,.28);
}
.sa-top-actions { display:flex; gap:.5rem; flex-shrink:0; }
.sa-main { flex: 1; padding: 1.2rem 1.4rem 2.5rem; }
.sa-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sa-page-head h1 {
  margin: 0 0 .2rem;
  font-family: Sora, sans-serif;
  font-size: 1.55rem;
  color: white;
}
.sa-page-head p { margin: 0; color: rgba(226,232,240,.68); font-size:.92rem; }

/* Tabla de sistema (fondo oscuro, texto claro) */
.sa-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}
.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  color: rgba(226,232,240,.92);
}
.sa-table thead th {
  padding: .65rem .9rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(148,163,184,.85);
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
}
.sa-table tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); }
.sa-table tbody tr:last-child { border-bottom: none; }
.sa-table tbody tr:hover { background: rgba(255,255,255,.03); }
.sa-table tbody td {
  padding: .6rem .9rem;
  vertical-align: middle;
}
.sa-table .sa-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.sa-badge-green  { background: #6ee7b7; color: #111; border: 1px solid #34d399; }
.sa-badge-red    { background: #fca5a5; color: #111; border: 1px solid #f87171; }
.sa-badge-blue   { background: #7dd3fc; color: #111; border: 1px solid #38bdf8; }
.sa-badge-gray   { background: #cbd5e1; color: #111; border: 1px solid #94a3b8; }
.sa-badge-yellow { background: #fde047; color: #111; border: 1px solid #facc15; }

body:not(.sa-players-plain) .sa-badge-green,
body:not(.sa-players-plain) .sa-badge-red,
body:not(.sa-players-plain) .sa-badge-blue,
body:not(.sa-players-plain) .sa-badge-gray,
body:not(.sa-players-plain) .sa-badge-yellow {
  background: var(--badge-unified-bg);
  color: #e2e8f0;
  border: 1px solid var(--badge-unified-border);
}

/* Tarjetas del panel SA */
.sa-cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.sa-card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.sa-card-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: rgba(148,163,184,.8); margin-bottom: .35rem; }
.sa-card-value { font-family: Sora,sans-serif; font-size: 1.75rem; font-weight: 800; color: white; }
.sa-card-sub { font-size: .78rem; color: rgba(148,163,184,.75); margin-top: .2rem; }

/* Sección dentro del sa-main */
.sa-section { margin-bottom: 1.6rem; }
.sa-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.sa-section-head h2, .sa-section-head h3 {
  margin: 0;
  font-family: Sora,sans-serif;
  font-size: 1rem;
  color: rgba(241,245,249,.92);
}
.sa-section-head p { margin: .15rem 0 0; font-size: .82rem; color: rgba(148,163,184,.85); }

/* Formulario SA (fondo oscuro) */
.sa-form {
  display: grid;
  gap: .85rem;
  max-width: 640px;
}
.sa-form label { display:block; font-size:.82rem; font-weight:700; margin-bottom:.3rem; color: rgba(226,232,240,.85); }
.sa-form input, .sa-form select, .sa-form textarea {
  width: 100%; padding: .6rem .85rem;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: rgba(226,232,240,.95);
  font-family: inherit; font-size: .9rem;
}
.sa-form input:focus, .sa-form select:focus, .sa-form textarea:focus {
  outline: none;
  border-color: rgba(14,165,233,.5);
  background: rgba(14,165,233,.07);
}
.sa-form-row { display:grid; grid-template-columns: 1fr 1fr; gap:.85rem; }
.sa-form-actions { display:flex; gap:.65rem; flex-wrap:wrap; margin-top:.4rem; }

/* Grilla 2-col SA */
.sa-grid-2 { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:1rem; }

@media (max-width: 900px) {
  .sa-topbar { gap:.5rem; }
  .sa-nav { justify-content: flex-start; }
  .sa-cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sa-grid-2 { grid-template-columns: 1fr; }
  .sa-form-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .sa-cards { grid-template-columns: 1fr 1fr; }
  .sa-main { padding: .85rem .85rem 2rem; }
}

/* ── Admin shell (versiones anteriores) ── */
.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.admin-main { padding: 1.2rem 1.2rem 2rem; }
.admin-topbar {
  display:flex; align-items:end; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  padding: 1.25rem 1.35rem;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15,23,42,.96), rgba(15,118,110,.84));
  color:white;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.admin-topbar h1 { margin:.35rem 0 .45rem; font-family:Sora,sans-serif; font-size:2rem; }
.admin-topbar p { margin:0; color: rgba(226,232,240,.84); }
.admin-top-actions { display:flex; gap:.6rem; flex-wrap:wrap; }
.admin-main .card, .admin-main .panel, .admin-main .post-card, .admin-main .team-card, .admin-main .match-card, .admin-main .table-card, .admin-main .stat, .admin-main .list-item, .admin-main .auth-form {
  background: rgba(255,255,255,.95);
  color: var(--text);
}
.admin-main .auth-form input, .admin-main .auth-form select, .admin-main .auth-form textarea { color: var(--text); }
.admin-main .stat, .admin-main .card, .admin-main .panel {
  box-shadow: 0 20px 45px rgba(2,6,23,.12);
}
.admin-main .section {
  margin: 0 0 1rem;
}
.admin-main .section > .card,
.admin-main .section > .panel,
.admin-main .section > .table-card,
.admin-main .section > .post-card,
.admin-main .section > .team-card {
  margin-bottom: 1rem;
}
.admin-main .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}
.admin-main .section-head h2,
.admin-main .section-head h3 {
  margin: 0;
  font-family: Sora, sans-serif;
}
.admin-main .section-head p {
  margin: .15rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.admin-main .section-head .toolbar {
  margin: 0;
}
.admin-main .section-head .badge {
  align-self: flex-start;
}
.admin-main .toolbar {
  margin-bottom: .9rem;
}
.admin-main .toolbar .btn {
  min-height: 40px;
  padding: .58rem .9rem;
}
.admin-main .list-item {
  border-radius: 18px;
}
.admin-main .panel,
.admin-main .card,
.admin-main .table-card,
.admin-main .post-card,
.admin-main .team-card,
.admin-main .match-card,
.admin-main .report-tile {
  border-radius: 24px;
}
.admin-main .auth-form {
  gap: .75rem;
}
.compact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .9rem;
  flex-wrap: wrap;
}
.compact-header h2, .compact-header h3 {
  margin: 0;
  font-family: Sora, sans-serif;
  color: var(--text);
}
.compact-header p {
  margin: .2rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}
.compact-header .badge { align-self: flex-start; }
.role-card-head { margin-bottom: .85rem; }
.reports-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:1rem; }
.report-tile {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(148,163,184,.18);
  box-shadow: var(--shadow);
  color: var(--text);
}
.report-tile strong { display:block; font-family:Sora,sans-serif; font-size:1.55rem; margin-top:.3rem; }
.report-tile span { color: var(--muted); }
.role-summary { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:1rem; }
.role-summary .card { min-height: 100%; }
.toolbar { display:flex; gap:.5rem; flex-wrap:wrap; margin-bottom:1rem; }
.toolbar .btn { background: rgba(255,255,255,.08); color: white; border-color: rgba(255,255,255,.14); }
.toolbar.compact .btn { min-height: 40px; padding: .58rem .9rem; }

/* reglas admin móvil integradas en el bloque global de abajo */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 24%),
    linear-gradient(180deg, #eff6ff 0%, #f8fafc 40%, #ecfeff 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; }
.brand { display: flex; align-items: center; gap: .9rem; color: white; }
.brand-copy { display: grid; gap: .1rem; text-align: left; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: white; /* o transparente, o mantener el degradado si el logo tiene transparencia */
  display: grid; place-items: center;
  font-family: Sora, sans-serif; font-weight: 800;
  color: white; box-shadow: 0 16px 40px rgba(14, 165, 233, 0.28);
}
.brand-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.brand small { display: block; color: rgba(226, 232, 240, 0.72); letter-spacing: .22em; text-transform: uppercase; font-size: .68rem; }
.brand strong { display: block; font-family: Sora, sans-serif; font-size: 1.02rem; }
.brand-copy span {
  display: block;
  color: rgba(226, 232, 240, .72);
  font-size: .68rem;
  line-height: 1.15;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav { display: flex; gap: .6rem; flex-wrap: wrap; }
.nav a, .nav span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: .55rem .95rem; border-radius: 999px;
  color: rgba(241, 245, 249, 0.92); border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}
.nav a:hover { background: rgba(255, 255, 255, 0.12); }

.app-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: .35rem max(.55rem, env(safe-area-inset-right)) calc(.45rem + env(safe-area-inset-bottom)) max(.55rem, env(safe-area-inset-left));
  background: rgba(7, 17, 31, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: 0 -12px 32px rgba(2, 6, 23, .22);
}
.app-bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .35rem;
}
.app-bottom-nav a {
  min-height: 48px;
  padding: .35rem .25rem;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: rgba(241, 245, 249, .86);
  display: grid;
  place-items: center;
  text-align: center;
}
.app-bottom-nav a strong { display:block; font-size:.74rem; line-height:1.05; }
.app-bottom-nav a small {
  display:block;
  font-size:.56rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: rgba(226,232,240,.68);
}
.app-bottom-nav a.active {
  background: linear-gradient(135deg, rgba(14,165,233,.28), rgba(15,118,110,.42));
  border-color: rgba(255,255,255,.18);
  color: #fff;
}
.app-bottom-nav a.active small { color: rgba(255,255,255,.78); }

.public-body .shell { padding-bottom: 4.2rem; }
.admin-body .admin-main { padding-bottom: 4.8rem; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: var(--shadow);
  margin: 1.25rem 0 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: linear-gradient(145deg, rgba(2, 6, 23, .88), rgba(15, 118, 110, .7), rgba(14, 165, 233, .62));
  color: white;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 17, 31, .72), rgba(7, 17, 31, .28));
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.4rem; padding: 2rem; }
.hero-media { min-height: 280px; border-radius: 24px; overflow: hidden; background: rgba(255,255,255,.08); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-kicker { text-transform: uppercase; letter-spacing: .28em; font-size: .72rem; color: rgba(226, 232, 240, 0.82); }
.hero h1 { margin: .65rem 0 .85rem; font-family: Sora, sans-serif; font-size: clamp(2rem, 3vw, 4.1rem); line-height: .98; }
.hero p { margin: 0; max-width: 62ch; color: rgba(241, 245, 249, 0.9); font-size: 1rem; line-height: 1.65; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .72rem 1.1rem; border-radius: 999px;
  font-weight: 800; border: 1px solid transparent;
}
.btn-primary { background: white; color: #0f172a; }
.btn-secondary { background: rgba(255,255,255,.1); color: white; border-color: rgba(255,255,255,.18); }

/* Acciones: estilo enlace en todo el panel administrativo */
body:not(.sa-players-plain) .sa-main .btn.btn-secondary,
body:not(.sa-players-plain) .admin-main .btn.btn-secondary {
  background: transparent !important;
  border: none !important;
  min-height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: var(--action-link) !important;
  text-decoration: underline;
  font-weight: 700;
  box-shadow: none !important;
}
body:not(.sa-players-plain) .sa-main .sa-table td a[style*="text-decoration:underline"],
body:not(.sa-players-plain) .sa-main .sa-table td button[style*="text-decoration:underline"],
body:not(.sa-players-plain) .admin-main .sa-table td a[style*="text-decoration:underline"],
body:not(.sa-players-plain) .admin-main .sa-table td button[style*="text-decoration:underline"] {
  color: var(--action-link) !important;
}
body:not(.sa-players-plain) .sa-main a[style*="text-decoration:underline"],
body:not(.sa-players-plain) .sa-main button[style*="text-decoration:underline"],
body:not(.sa-players-plain) .admin-main a[style*="text-decoration:underline"],
body:not(.sa-players-plain) .admin-main button[style*="text-decoration:underline"] {
  color: var(--action-link) !important;
}
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; align-content: start; }
.stat, .card, .panel, .post-card, .team-card, .match-card, .table-card {
  border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); color: var(--text);
}
.stat { border-radius: 24px; padding: 1rem; }
.stat span { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .18em; }
.stat strong { display: block; margin-top: .35rem; font-family: Sora, sans-serif; font-size: 1.8rem; color: var(--text); }

.section { margin: 1rem 0 1.4rem; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.section-head h2 { margin: 0; font-family: Sora, sans-serif; font-size: 1.45rem; color: var(--text); }
.section-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card, .panel, .post-card, .team-card, .match-card, .table-card { border-radius: 28px; overflow: hidden; }
.card { padding: 1.1rem; }
.panel { padding: 1.2rem; }
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 800;
  background: #6ee7b7; color: #111; border: 1px solid #34d399;
}
.badge.dark { background: #cbd5e1; color: #111; border: 1px solid #94a3b8; }

body:not(.sa-players-plain) .badge {
  background: var(--badge-unified-bg);
  color: var(--text);
  border: 1px solid var(--badge-unified-border);
}
body:not(.sa-players-plain) .badge.dark {
  background: var(--badge-unified-bg);
  color: var(--text);
  border: 1px solid var(--badge-unified-border);
}
.muted { color: var(--muted); }

/* Transiciones de imágenes para dar dinamismo con desvanecimiento */
@keyframes fadeInSoft {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.post-card, .team-card, .match-card { 
  display: block; position: relative; text-decoration: none; color: inherit;
  animation: fadeInSoft 0.8s ease-out forwards;
}
.post-card img, .team-bg, .match-bg { 
  width: 100%; height: 180px; object-fit: cover; 
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.6s ease;
  will-change: transform, filter;
}
.team-cover, .match-cover { position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 1rem; color: white; min-height: 140px; }
.team-bg, .match-bg { position: absolute; top:0; left:0; width:100%; height:100%; z-index: 1; pointer-events: none; }
.team-cover > *, .match-cover > * { position: relative; z-index: 2; margin: 0; }
.post-card:hover img, .team-card:hover .team-bg, .match-card:hover .match-bg { 
  transform: scale(1.1); 
  filter: brightness(1.15) contrast(1.05);
  animation-play-state: paused;
}

/* Animación continua (efecto respiración/zoom lento) para portadas principales */
@keyframes ambient-zoom {
  0% { transform: scale(1); filter: brightness(1); }
  100% { transform: scale(1.06); filter: brightness(1.08); }
}
.hero-media img, .ambient-zoom, .post-card img, .team-bg, .match-bg {
  animation: ambient-zoom 15s ease-in-out infinite alternate;
  will-change: transform;
}

.post-body, .team-body, .match-body { padding: 1rem; }
.post-body h3, .team-body h3, .match-body h3 { margin: 0 0 .45rem; font-family: Sora, sans-serif; }
.post-body p, .team-body p, .match-body p { margin: 0; color: var(--muted); line-height: 1.6; }

.list { display: grid; gap: .75rem; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem; border-radius: 22px; background: rgba(248, 250, 252, 0.88); border: 1px solid rgba(148,163,184,.18); color: var(--text);
}
.list-item .meta { color: var(--muted); font-size: .92rem; }

.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 1.1rem; }
.tabs a {
  display: inline-flex; align-items: center; min-height: 40px; padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .25); background: rgba(255,255,255,.8); color: var(--text); font-weight: 800;
}
.tabs a.active { background: var(--bg); color: white; border-color: transparent; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .8rem .7rem; border-bottom: 1px solid rgba(148,163,184,.18); text-align: left; font-size: .95rem; }
th { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: .72rem; }
.row-highlight { background: rgba(14, 165, 233, 0.06); }
.rank {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border-radius: 999px; background: rgba(15, 118, 110, .12); color: var(--accent); font-weight: 900;
}

.team-squad { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.squad-item { display: flex; align-items: center; gap: .8rem; padding: .9rem; border-radius: 18px; background: #f8fafc; border: 1px solid rgba(148,163,184,.16); }
.shirt { width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center; background: #0f172a; color: white; font-weight: 900; }
.footer {
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  font-size: .94rem;
  text-align: center;
}
.error-box {
  margin: 2rem auto; max-width: 760px; padding: 2rem; border-radius: 28px;
  background: white; border: 1px solid rgba(148,163,184,.22); box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .hero-grid, .grid-2, .grid-3, .grid-4, .team-squad { grid-template-columns: 1fr; }

  /* Topbar compacto */
  .topbar-inner { flex-direction: column; align-items: flex-start; padding: .45rem 0 .35rem; gap: .4rem; }
  .brand { justify-content: flex-start; align-items: center; gap: .65rem; width: 100%; }
  .brand-mark { width: 40px; height: 40px; border-radius: 14px; }
  .brand-copy { gap: 0; }
  .brand strong { font-size: .92rem; }
  .brand-copy span { margin-top: .04rem; font-size: .56rem; letter-spacing: .09em; }
  .brand small { font-size: .6rem; }
  
  /* Botones del nav en horizontal debajo del logo (en lugar de barra inferior) */
  .nav { 
    display: flex; 
    width: 100%; 
    overflow-x: auto; 
    padding-bottom: .2rem; 
    gap: .4rem; 
    margin-top: .2rem; 
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a, .nav span {
    flex: 0 0 auto;
    font-size: .8rem;
    padding: .4rem .75rem;
    min-height: 34px;
    border-radius: 12px;
  }
  
  .app-bottom-nav { display: none; } /* Oculto, ya no se usa */
  .shell { width: min(1180px, calc(100% - 1rem)); }
  .public-body .shell { padding-bottom: 2rem; } /* Vuelto a la normalidad */
  .topbar { box-shadow: 0 6px 18px rgba(2, 6, 23, .28); }

  /* Héroe compacto: imagen arriba, texto debajo */
  .hero { border-radius: 20px; margin: .55rem 0 .8rem; }
  .hero-grid { padding: .75rem; gap: .55rem; }
  .hero-media { order: -1; min-height: 140px; max-height: 175px; border-radius: 16px; overflow: hidden; }
  .hero-media img { object-position: center 35%; }
  .hero-kicker { font-size: .6rem; letter-spacing: .2em; }
  .hero h1 { margin: .3rem 0 .3rem; font-size: 1.45rem; }
  .hero p { font-size: .88rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-actions { margin-top: .55rem; gap: .45rem; }
  .hero-actions .btn { min-height: 36px; padding: .45rem .8rem; font-size: .86rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: .55rem; }

  /* Secciones */
  .section { margin: .65rem 0 .9rem; }
  .card, .panel, .report-tile, .stat { border-radius: 20px; }
  .list-item { border-radius: 16px; }
  .toolbar .btn { flex: 1 1 auto; }
  .footer { margin: .65rem 0 .8rem; }

  /* Panel interno */
  .admin-sidebar { display: none; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-main { padding: .65rem .65rem 2rem; } /* Vuelto a la normalidad */
  .admin-topbar {
    padding: .8rem .9rem;
    border-radius: 20px;
    display: grid;
    gap: .6rem;
    align-items: start;
  }
  .admin-topbar h1 { font-size: 1.35rem; margin: .2rem 0 .25rem; }
  .admin-topbar p { max-width: 38ch; margin: 0; }
  .admin-top-actions { width: 100%; }
  .admin-top-actions .btn { flex: 1 1 0; min-width: 0; min-height: 38px; }
  .admin-bottom-nav { display: none; } /* Oculto, ya no se usa */
  .reports-grid, .role-summary { grid-template-columns: 1fr; }
  .list-item { align-items: start; flex-direction: column; }
  .compact-header { gap: .55rem; }
  .compact-header .badge { margin-top: .1rem; }
  .admin-main .section-head { margin-bottom: .55rem; }
  .admin-main .section-head p { max-width: 38ch; }
  .admin-main .toolbar { gap: .4rem; }
  .admin-main .toolbar .btn { flex: 1 1 0; }
  .admin-main .list-item { padding-top: .75rem; padding-bottom: .75rem; }
}

/* ══════════════════════════════════════════════════════════════
   Sidebar SA – solo superadmin
══════════════════════════════════════════════════════════════ */

/* Botón hamburguesa en el topbar */
.sa-sidebar-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0; padding: 0;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06); color: rgba(226,232,240,.9);
  cursor: pointer; transition: background .15s;
}
.sa-sidebar-toggle:hover { background: rgba(255,255,255,.14); }

/* Overlay semitransparente */
.sa-sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.52); z-index: 95;
  backdrop-filter: blur(3px);
}
.sa-sidebar-overlay.sa-sb-open { display: block; }

/* Panel lateral */
.sa-sidebar {
  position: fixed; top: 0; left: 0;
  width: 268px; height: 100vh;
  background: #060d19;
  border-right: 1px solid rgba(255,255,255,.09);
  z-index: 110;
  transform: translateX(-100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow: hidden;
}
.sa-sidebar.sa-sb-open { transform: translateX(0); }

/* Cabecera del sidebar */
.sa-sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem; min-height: 54px; flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sa-sidebar-head-title {
  font-family: Sora, sans-serif; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: rgba(148,163,184,.7);
}
.sa-sidebar-close {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05);
  color: rgba(226,232,240,.75); cursor: pointer; transition: background .15s;
}
.sa-sidebar-close:hover { background: rgba(255,255,255,.13); color: white; }

/* Área de navegación scrollable */
.sa-sidebar-nav {
  flex: 1; overflow-y: auto; padding: .45rem 0 1.5rem;
}
.sa-sidebar-nav::-webkit-scrollbar { width: 3px; }
.sa-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sa-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(148,163,184,.18); border-radius: 3px; }

/* Enlace directo (sin grupo) */
.sa-sidebar-direct {
  display: flex; align-items: center; gap: .6rem;
  padding: .56rem 1rem; margin: .1rem .5rem;
  border-radius: 9px; font-size: .875rem; font-weight: 600;
  color: rgba(226,232,240,.78); text-decoration: none;
  transition: background .14s, color .14s;
}
.sa-sidebar-direct:hover { background: rgba(255,255,255,.07); color: white; }
.sa-sidebar-direct.sa-sb-active { background: rgba(14,165,233,.16); color: #7dd3fc; }

/* Grupo (acordeón) */
.sa-sidebar-group { margin: .06rem 0; }

.sa-sidebar-group-btn {
  display: flex; align-items: center; gap: .6rem;
  width: 100%; padding: .56rem 1rem;
  border: none; background: none; font-family: inherit;
  font-size: .875rem; font-weight: 600; color: rgba(226,232,240,.72);
  cursor: pointer; text-align: left;
  transition: background .14s, color .14s;
}
.sa-sidebar-group-btn:hover { background: rgba(255,255,255,.05); color: white; }
.sa-sidebar-group.sa-sb-open .sa-sidebar-group-btn { color: #7dd3fc; }

.sa-sb-label { flex: 1; }

.sa-sb-arrow {
  transition: transform .22s ease; opacity: .5; flex-shrink: 0;
}
.sa-sidebar-group.sa-sb-open .sa-sb-arrow { transform: rotate(180deg); }

/* Panel colapsable */
.sa-sidebar-panel { display: none; padding: .12rem 0 .28rem; }
.sa-sidebar-group.sa-sb-open .sa-sidebar-panel { display: block; }

/* Enlace dentro del grupo */
.sa-sidebar-link {
  display: flex; align-items: center; gap: .5rem;
  padding: .46rem 1rem .46rem 2.7rem;
  font-size: .845rem; font-weight: 500;
  color: rgba(148,163,184,.82); text-decoration: none;
  transition: background .13s, color .13s;
}
.sa-sidebar-link:hover { background: rgba(255,255,255,.045); color: rgba(226,232,240,.95); }
.sa-sidebar-link.sa-sb-active {
  background: rgba(14,165,233,.11); color: #7dd3fc; font-weight: 600;
}

/* Variante exportar (secundaria) */
.sa-sidebar-link.sa-sb-export {
  padding-top: .36rem; padding-bottom: .36rem;
  font-size: .79rem; color: rgba(148,163,184,.58);
}
.sa-sidebar-link.sa-sb-export:hover { color: rgba(226,232,240,.8); }

/* Separador */
.sa-sidebar-sep {
  margin: .5rem .75rem; border: none;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Icono en botón */
.sa-sb-icon { flex-shrink: 0; opacity: .65; }
