:root{
  --bg:#D2D9DC;   /* fondo general */
  --dark:#0f172a;
  --dark2:#111827;
  --line:#e5e7eb;
  --muted:#6b7280;
  --blue:#2563eb;
  --blue2:#1d4ed8;
  --radius:20px;

  /* sombras (para que se noten bien) */
  --shadow-1: 0 10px 24px rgba(0,0,0,.08);
  --shadow-2: 0 14px 32px rgba(0,0,0,.10);
}

/* Base */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  font-family: "Roboto Slab", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  margin: 0;
}
input, textarea, select, button{ font-family: inherit; }

/* Layout (sidebar + main) */
.lpi-layout{
  display:flex;
  min-height:100vh;
}
.lpi-sidebar{
  width: 280px;
  background: var(--dark);
  color:#e5e7eb;
  border-right: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top:0;
  height:100vh;
  overflow:auto;
}
.lpi-main{
  flex:1;
  min-width:0;
}

/* Modo público: sin sidebar */
body.lpi-public .lpi-sidebar{ display:none; }
body.lpi-public .lpi-layout{ display:block; }

/* Colapsar sidebar */
body.sidebar-collapsed .lpi-sidebar{ width: 74px; }
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-group-title,
body.sidebar-collapsed .sidebar-brand-text{ display:none; }
body.sidebar-collapsed .nav-sub{ display:none !important; }

/* Topbar */
.topbar {
  background: var(--dark);
  color: #e5e7eb;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.topbar-title {
  font-size: 13px;
  font-weight: 500;
  display:flex;
  align-items:center;
  gap:10px;
}
.topbar span {
  font-size: 11px;
  opacity: 0.9;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: var(--dark2);
  color: #e5e7eb;
  font-size: 11px;
  text-decoration: none;
}
.btn-back:hover { background: #020617; }

.btn-menu{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #1f2937;
  background: rgba(255,255,255,.06);
  color:#e5e7eb;
  font-size: 11px;
  cursor:pointer;
}
.btn-menu:hover{ background: rgba(255,255,255,.10); }

/* Wrapper */
.wrapper {
  max-width: 1100px;
  margin: 26px auto 32px;
  padding: 0 12px;
}
@media (max-width: 640px){
  .wrapper { padding: 0 8px; }
}

/* Header card */
.page-header {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.page-header-main {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-logo { height: 70px; width: auto; }
.header-title { font-size: 20px; font-weight: 650; color: #111827; }
.header-subtitle { font-size: 12px; color: var(--muted); }

/* Cards / forms (SOLO ESTILO, NO COLUMNAS/GRIDS) */
.card {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
  margin-bottom: 26px;
}
.card h2 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.card-sub { font-size: 11px; color: var(--muted); margin-bottom: 14px; }

form { font-size: 12px; }
label { display: block; margin-bottom: 6px; }
label span { display: block; margin-bottom: 3px; color: #4b5563; font-weight: 500; }

input[type="text"], input[type="number"], textarea, select{
  width: 100%;
  padding: 7px 9px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background:#fff;
}
textarea { resize: vertical; min-height: 40px; }
input[type="file"] { font-size: 11px; }

/* Botones */
.btn {
  margin-top: 14px;
  padding: 7px 20px;
  border-radius: 999px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--blue2); }

/* Footer */
.footer {
  margin-top: 30px;
  padding: 32px 10px 36px;
  background: #f3f4f6;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}
.footer-logos img {
  max-height: 80px;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
.footer-text { font-size: 13px; color: #374151; }
.footer-text-patro { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: pre-line; }

/* Sidebar (menú árbol) */
.sidebar-brand{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display:flex;
  gap:12px;
  align-items:center;
}
.sidebar-brand .logo{
  width:44px; height:44px;
  border-radius: 14px;
  background:#fff;
  display:grid; place-items:center;
  overflow:hidden;
}
.sidebar-brand .logo img{ width:100%; height:100%; object-fit:contain; padding:4px; }
.sidebar-brand-text .t1{ font-weight:800; font-size:13px; }
.sidebar-brand-text .t2{ font-weight:600; font-size:12px; opacity:.85; }

.sidebar-nav{ padding: 10px; }
.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  color:#e5e7eb;
  text-decoration:none;
  border:1px solid transparent;
}
.nav-item:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.10);
}
.nav-item.is-active{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
}
.nav-ico{ width:22px; text-align:center; opacity:.95; }
.nav-label{ font-weight:700; font-size:13px; }

.nav-group{ margin-top: 6px; }
.nav-group-btn{ background:transparent; border:0; cursor:pointer; text-align:left; }
.nav-group-title{ font-weight:800; font-size:12px; opacity:.92; }
.nav-sub{ display:none; padding-left: 10px; margin-top: 6px; }
.nav-group.is-open .nav-sub{ display:block; }

.nav-sep{ height:1px; background: rgba(255,255,255,.10); margin: 10px 12px; }


/* =========================
   ESTADOS (select de partidos)
   - NO cambia values, solo pinta colores
   - Incluye alias antiguos (enjuego/final)
   ========================= */
.col-estado { text-align: center; }

select.estado-select{
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  line-height: 1;
}

/* Pendiente */
select.estado-select.estado-pendiente{
  background: #f3f4f6;
  color: #111827;
}

/* En juego (nuevo y antiguo) */
select.estado-select.estado-en_juego,
select.estado-select.estado-enjuego{
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
}

/* Finalizado (nuevo y antiguo) */
select.estado-select.estado-finalizado,
select.estado-select.estado-final{
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}

/* Aplazado */
select.estado-select.estado-aplazado{
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}


/* =========================
   OVERLAY GLOBAL LPI (fade)
   - oculto por defecto
   - visible con .is-open
   ========================= */
.lpi-overlay{
  position: fixed;
  inset: 0;
  z-index: 99999;
  padding: 18px;

  display:flex;
  align-items:center;
  justify-content:center;

  background: rgba(15,23,42,.55);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity .15s ease, visibility 0s linear .15s;
}

.lpi-overlay.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .15s ease;
}

.lpi-overlay__box{
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 18px;
  padding: 18px 18px;
  text-align: center;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}

.lpi-overlay__logo{
  width: 84px;
  height: 84px;
  object-fit: contain;
  display: block;
  margin: 0 auto 10px;
}

.lpi-overlay__title{
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
}

.lpi-overlay__sub{
  margin-top: 6px;
  color: #6b7280;
  font-size: 12px;
}
