/* =========================================================
   ASSETS/CSS/ESTILOS.CSS  (REFINADO Y CORREGIDO)
   ADN Visual • Campeonato ABJ
   Paleta: Rojo Victoria + Dorado Prestigio
   Incluye: Login Split + Dashboard + Listas + Modal Wizard
   ========================================================= */

/* Tipografía (drop-in). Recomendado: cargar con <link> en el <head> */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800;900&display=swap");

/* =========================================================
   1) TOKENS / VARIABLES (ÚNICO :root)
   ========================================================= */
   
:root {
  /* Brand */
  --abj-red: #d81e1e;
  --abj-red-dark: #a50e0e;

  --abj-gold: #c7a03c;
  --abj-gold-bright: #e5c36a;

  /* Neutros */
  --abj-white: #ffffff;
  --abj-bg: #f4f7f9;
  --abj-text: #1a1a2e;
  --abj-muted: #6c757d;

  /* Superficie “institucional” (dark) */
  --abj-black: #070a0f;
  --abj-black-2: #0b1220;
  --abj-surface: rgba(255, 255, 255, 0.06);
  --abj-surface-2: rgba(255, 255, 255, 0.08);
  --abj-border: rgba(255, 255, 255, 0.12);
  --abj-text-dark: #f8fafc;
  --abj-muted-dark: #a7b0c0;

  /* Tipografía y radios */
  --abj-font: "Poppins", sans-serif;
  --abj-radius-sm: 8px;
  --abj-radius: 12px;
  --abj-radius-lg: 16px;

  /* Sombras */
  --abj-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --abj-shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.12);
  --abj-shadow-red: 0 4px 15px rgba(216, 30, 30, 0.3);

  /* Gradientes */
  --abj-grad-red: linear-gradient(135deg, var(--abj-red), var(--abj-red-dark));
  --abj-grad-gold: linear-gradient(135deg, var(--abj-gold), var(--abj-gold-bright));

  /* Z-index scale */
  --abj-z-sidebar: 1000;
  --abj-z-overlay: 9998;
  --abj-z-modal: 9999;

  /* Login image (puedes reemplazarla por una local) */
  --abj-auth-bg: url("https://images.unsplash.com/photo-1579952363873-27f3bade9f55?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80");

  /* Sidebar Variables (Consolidadas) */
  --sidebar-width: 260px;
  --sidebar-bg: #1e1e2d;         /* Color oscuro moderno */
  --sidebar-hover: #2b2b40;
  --sidebar-active: #3699ff;     /* Azul brillante para activo */
  --text-main: #a2a3b7;
  --text-light: #ffffff;
}

/* =========================================================
   2) BASE / RESET SUAVE (sin romper layouts)
   ========================================================= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--abj-font);
  background: var(--abj-bg);
  color: var(--abj-text);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5rem 0;
  font-weight: 800;
  color: var(--abj-text);
}

p { margin: 0 0 1rem 0; }

img { max-width: 100%; display: block; }

a { color: inherit; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   3) UTILIDADES (helpers)
   ========================================================= */
.text-rojo { color: var(--abj-red) !important; }
.text-dorado { color: var(--abj-gold) !important; }
.text-center { text-align: center !important; }
.text-gold { color: #f59e0b; } /* Helper extra para dorado */

.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.w-100 { width: 100% !important; }

.desktop-only { display: block; }
@media (max-width: 768px) { .desktop-only { display: none !important; } }

/* =========================================================
   4) COMPONENTES “COMERCIALES” (Global)
   - Mantiene tus clases: .card, .btn-primary, .form-control, etc.
   ========================================================= */

/* Cards */
.card {
  background: var(--abj-white);
  border: none;
  border-radius: var(--abj-radius-lg);
  box-shadow: var(--abj-shadow);
  padding: 30px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--abj-shadow-strong);
}

/* Botón principal */
.btn-primary {
  background: var(--abj-grad-red);
  border: none;
  color: var(--abj-white);
  font-weight: 800;
  padding: 12px 24px;
  border-radius: var(--abj-radius);
  box-shadow: var(--abj-shadow-red);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  filter: brightness(.97);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(216, 30, 30, 0.35);
}

/* Botón secundario */
.btn-secondary {
  background: var(--abj-white);
  border: 2px solid var(--abj-gold);
  color: var(--abj-gold);
  font-weight: 800;
  padding: 10px 22px;
  border-radius: var(--abj-radius);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.btn-secondary:hover {
  background: var(--abj-gold);
  color: var(--abj-white);
  transform: translateY(-1px);
}

/* Focus accesible (teclado) */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.link-auth:focus-visible {
  outline: 3px solid rgba(199, 160, 60, .55);
  outline-offset: 2px;
}

/* Inputs */
.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--abj-text);
}

.form-control {
  width: 100%;
  padding: 12px 12px;
  border: 2px solid #e1e5eb;
  border-radius: var(--abj-radius);
  font-family: var(--abj-font);
  transition: border-color .15s ease, box-shadow .15s ease;
  background: var(--abj-white);
  color: var(--abj-text);
}

.form-control:focus {
  outline: none;
  border-color: var(--abj-red);
  box-shadow: 0 0 0 3px rgba(216, 30, 30, 0.10);
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: var(--abj-radius);
  margin-bottom: 20px;
  font-weight: 700;
}

.alert-danger {
  background: #f8d7da;
  color: #842029;
  border-left: 5px solid var(--abj-red);
}

.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border-left: 5px solid var(--abj-gold);
}

/* =========================================================
   5) GRID SIMPLE (tu versión)
   OJO: si usas Bootstrap, esto pisa su grid.
   ========================================================= */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.col-6 { width: calc(50% - 10px); }
.col-12 { width: 100%; }

/* Responsive general */
@media (max-width: 768px) {
  .col-6 { width: 100%; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 15px;
    display: block;
    margin-bottom: 10px;
    text-align: center;
  }

  .card { padding: 20px; }
}

/* =========================================================
   6) LOGIN COMERCIAL (Split Layout)
   ========================================================= */
.auth-container {
  display: flex;
  min-height: 100vh;
  background: #fff;
  overflow: hidden;
}

.auth-brand {
  flex: 1;
  background: var(--abj-auth-bg) no-repeat center center;
  background-size: cover;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(216, 30, 30, 0.85), rgba(26, 26, 46, 0.9));
}

.auth-brand-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.auth-form-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--abj-white);
  max-width: 600px;
}

.auth-box { width: 100%; max-width: 420px; }

.link-auth {
  color: var(--abj-red);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}

.link-auth:hover {
  text-decoration: underline;
  color: var(--abj-gold);
}

@media (max-width: 768px) {
  .auth-container { flex-direction: column; }
  .auth-brand { flex: 0 0 170px; }
  .auth-form-wrapper { max-width: 100%; padding: 20px; }
}

/* Animaciones “propias” (no colisionan con animate.css real) */
@keyframes abjFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes abjFadeLeft {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes abjFadeRight {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.abjFadeInUp { animation: abjFadeUp .45s ease-out both; }
.abjFadeInLeft { animation: abjFadeLeft .45s ease-out both; }
.abjFadeInRight { animation: abjFadeRight .45s ease-out both; }

/* =========================================================
   7) DASHBOARD ADMIN - ESTRUCTURA GENERAL
   ========================================================= */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background: #f4f6f9;
}

/* --- SIDEBAR REFINADO (Unificado) --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg); /* Uso de la variable correcta */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand h3 {
    color: var(--text-light);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-suffix {
    font-weight: 300; 
    font-size: 0.8em; 
    opacity: 0.7;
}

/* Info Usuario en Sidebar */
.sidebar-user {
    padding: 0 20px 20px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 10px;
}
.user-avatar i {
    font-size: 36px;
    color: var(--text-main);
    margin-right: 15px;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name { color: var(--text-light); font-weight: 600; font-size: 0.95rem; }
.user-role { color: var(--text-main); font-size: 0.75rem; }

/* Menú Sidebar */
.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-header {
    padding: 15px 25px 5px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #5d5d7a;
    font-weight: 700;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.2s;
    border-left: 3px solid transparent;
    margin-bottom: 2px;
}

.sidebar-menu li a:hover {
    background: var(--sidebar-hover);
    color: var(--text-light);
    transform: translateX(3px);
}

.sidebar-menu li a.active {
    background: rgba(54, 153, 255, 0.1);
    color: var(--sidebar-active);
    border-left-color: var(--sidebar-active);
    box-shadow: 0 4px 6px -1px rgba(54, 153, 255, 0.1);
    font-weight: 600;
}

.sidebar-menu li a i {
    width: 25px;
    text-align: center;
    font-size: 1.1rem;
    margin-right: 10px;
}

/* Submenús */
.submenu-toggle {
    justify-content: space-between;
    cursor: pointer;
}
.submenu-toggle .arrow {
    font-size: 0.8rem;
    width: auto;
    transition: transform 0.3s;
}
.submenu-toggle.open .arrow {
    transform: rotate(90deg);
}
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0,0,0,0.15);
    transition: max-height 0.3s ease-out;
}
.submenu.show {
    max-height: 500px; 
}
.submenu li a {
    padding-left: 55px;
    font-size: 0.9rem;
}

/* Logout Link */
.logout-link {
    color: #ef4444 !important; /* Rojo */
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin: 20px 20px 40px 20px;
    border-radius: 8px;
    justify-content: center;
}
.logout-link:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #ff5b5b !important;
    border-color: #ef4444;
}

/* Divider */
.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.05);
    margin: 15px 20px;
}

/* Main Content Wrapper */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
  background: #fff;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.user-info-top { display: flex; align-items: center; gap: 10px; }
.user-avatar-top {
  width: 40px; height: 40px;
  background: var(--abj-red);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: #fff;
  padding: 25px;
  border-radius: var(--abj-radius-lg);
  box-shadow: var(--abj-shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid transparent;
}

.kpi-card.rojo { border-left-color: var(--abj-red); }
.kpi-card.dorado { border-left-color: var(--abj-gold); }
.kpi-card.verde { border-left-color: #28a745; }
.kpi-card.azul { border-left-color: #17a2b8; }

.kpi-info h4 { font-size: 2rem; margin: 0; color: #333; font-weight: 900; }
.kpi-info p { margin: 0; color: #888; font-size: 0.9rem; font-weight: 700; }
.kpi-icon { font-size: 2.5rem; opacity: 0.18; }

/* Responsive Sidebar & Main */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--sidebar-active);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.close-sidebar {
    display: none;
    cursor: pointer;
    color: var(--text-main);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    
    .main-content { margin-left: 0; }
    
    .mobile-toggle { display: block; }
    .close-sidebar { display: block; }
    
    .sidebar-overlay.active { display: block; }
    
    /* Overlay antiguo (por si acaso se usa en otro lado) */
    .overlay {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: calc(var(--abj-z-sidebar) - 1);
        display: none;
    }
    .overlay.active { display: block; }
}

/* =========================================================
   8) ABJ PAGE (DARK INSTITUCIONAL)
   ========================================================= */
.abj-page {
  color: var(--abj-text-dark);
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(199,160,60,.18), transparent 60%),
    radial-gradient(900px 450px at 90% 0%, rgba(216,30,30,.12), transparent 55%),
    linear-gradient(180deg, var(--abj-black) 0%, var(--abj-black-2) 100%);
  border-radius: var(--abj-radius-lg);
  padding: 18px;
}

.abj-header {
  padding: 18px;
  border: 1px solid var(--abj-border);
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--abj-radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.abj-title { font-weight: 900; letter-spacing: .3px; margin: 0; }
.abj-subtitle { margin: 6px 0 0 0; color: var(--abj-muted-dark); font-size: 13px; }

/* Botones ABJ */
.btn-abj {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--abj-radius);
  font-weight: 900;
  letter-spacing: .4px;
  padding: 10px 14px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.btn-abj-primary {
  background: linear-gradient(135deg, var(--abj-gold) 0%, #b88a1f 100%);
  color: #10131a !important;
  border: none;
  box-shadow: 0 10px 25px rgba(199,160,60,.18);
}
.btn-abj-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(199,160,60,.24); }

.btn-abj-dark {
  background: rgba(255,255,255,.06);
  color: var(--abj-text-dark) !important;
}
.btn-abj-dark:hover { transform: translateY(-1px); }

.btn-abj-red {
  background: linear-gradient(135deg, rgba(216,30,30,.95), rgba(216,30,30,.72));
  color: var(--abj-white) !important;
  border: none;
  box-shadow: 0 10px 25px rgba(216,30,30,.18);
}

/* Card ABJ dark */
.abj-card {
  border: 1px solid var(--abj-border);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius: var(--abj-radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.abj-card .card-body { padding: 16px; }

/* Inputs ABJ dark (solo dentro de .abj-page para evitar choques) */
.abj-page .abj-input,
.abj-page .abj-select,
.abj-page .abj-textarea {
  background: rgba(0,0,0,.22) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: var(--abj-text-dark) !important;
  border-radius: var(--abj-radius) !important;
  box-shadow: none !important;
}
.abj-page .abj-input::placeholder { color: rgba(167,176,192,.7) !important; }
.abj-page .abj-input:focus,
.abj-page .abj-select:focus,
.abj-page .abj-textarea:focus {
  border-color: rgba(199,160,60,.55) !important;
  box-shadow: 0 0 0 .2rem rgba(199,160,60,.18) !important;
}

/* Badge ABJ dark (scoped) */
.abj-page .abj-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .35px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.abj-page .abj-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--abj-muted-dark);
  box-shadow: 0 0 0 4px rgba(255,255,255,.06);
}
.abj-page .badge-borrador .abj-dot { background: #94a3b8; }
.abj-page .badge-inscripciones .abj-dot { background: #fbbf24; }
.abj-page .badge-enjuego .abj-dot { background: #22c55e; }
.abj-page .badge-finalizado .abj-dot { background: #e11d48; }

/* =========================================================
   9) TORNEOS • LIGHT LIST (BLANCO)
   - Todo queda bajo .abj-torneos-light (sin colisionar)
   ========================================================= */
.abj-torneos-light {
  --gold: var(--abj-gold);
  --red: #e11d48;
  --black: #0f172a;
}

.abj-light-header {
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--abj-radius);
  padding: 16px 18px;
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
}

.abj-light-card {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: var(--abj-radius);
  box-shadow: 0 10px 22px rgba(15,23,42,.06);
  background: #fff;
}

.abj-btn-gold {
  background: var(--gold);
  color: #111;
  font-weight: 900;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}
.abj-btn-gold:hover { filter: brightness(.97); }

.abj-btn-outline-dark {
  border: 1px solid rgba(15,23,42,.18);
  background: #fff;
  color: var(--black);
  font-weight: 900;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.abj-btn-outline-dark:hover { background: #f8fafc; }

.abj-input-addon {
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  color: #64748b;
}

/* Input LIGHT solo dentro de .abj-torneos-light */
.abj-torneos-light .abj-input {
  border: 1px solid rgba(15,23,42,.12) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  background: #fff !important;
  color: #0f172a !important;
}
.abj-torneos-light .abj-input:focus {
  border-color: rgba(199,160,60,.55) !important;
  box-shadow: 0 0 0 .2rem rgba(199,160,60,.18) !important;
}

/* Cabecera “columnas” */
.abj-list-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
.abj-list-head .col1 { flex: 1.6; }
.abj-list-head .col2 { flex: 1.2; }
.abj-list-head .col3 { flex: .9; }
.abj-list-head .col4 { flex: .8; }

/* Items */
.abj-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15,23,42,.07);
  position: relative;
}
.abj-list-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent, var(--gold));
}
.abj-list-item:hover { background: #fafafa; }

.abj-list-item .col1 { flex: 1.6; min-width: 280px; }
.abj-list-item .col2 { flex: 1.2; min-width: 220px; }
.abj-list-item .col3 { flex: .9; min-width: 180px; }
.abj-list-item .col4 { flex: .8; min-width: 180px; }

.abj-avatar {
  width: 46px; height: 46px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
}
.abj-avatar img { width: 100%; height: 100%; object-fit: cover; }
.abj-avatar-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #64748b;
  background: #f8fafc;
}

.abj-name { font-weight: 900; color: #0f172a; line-height: 1.2; }
.abj-liga { font-weight: 800; color: #64748b; margin-left: 6px; font-size: 12px; }

.abj-meta {
  margin-top: 4px;
  font-size: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.abj-pill {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(199,160,60,.14);
  color: #8a6a12;
  font-weight: 900;
  font-size: 11px;
}
.abj-link {
  color: #0f172a;
  font-weight: 900;
  text-decoration: none;
}
.abj-link:hover { text-decoration: underline; }

/* Badge LIGHT (scoped) */
.abj-torneos-light .abj-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  color: #0f172a;
}
.abj-torneos-light .b-borrador { border-color: rgba(100,116,139,.35); color: #334155; }
.abj-torneos-light .b-inscripciones { border-color: rgba(245,158,11,.35); color: #92400e; }
.abj-torneos-light .b-enjuego { border-color: rgba(34,197,94,.35); color: #166534; }
.abj-torneos-light .b-finalizado { border-color: rgba(225,29,72,.35); color: #9f1239; }

@media (max-width: 992px) {
  .abj-list-item { flex-direction: column; align-items: flex-start; }
  .abj-list-item .col1,
  .abj-list-item .col2,
  .abj-list-item .col3,
  .abj-list-item .col4 {
    flex: none;
    min-width: auto;
    width: 100%;
    margin-bottom: 8px;
  }
  .abj-list-item .col4 { text-align: left !important; }
}

/* =========================================================
   10) TORNEOS • LISTA PRO (BLANCO INSTITUCIONAL)  .abjT
   ========================================================= */
.abjT {
  --gold: #c7a03c;
  --gold2: #e5c36a;
  --red: #e11d48;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15,23,42,.10);
  --bg: #f5f7fb;
  --card: #ffffff;

  padding: 18px;
  background: transparent;
  color: var(--text);
}

.abjT-header {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 20px rgba(15,23,42,.05);
}

.abjT-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: .2px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.abjT-title i { color: var(--gold); }
.abjT-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }

.abjT-actionsTop { display: flex; gap: 10px; align-items: center; }

.abjT-toolbar {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1.2fr 220px 1fr;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 20px rgba(15,23,42,.05);
}

.abjT-search {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
}
.abjT-search i { color: var(--muted); }
.abjT-search input {
  border: 0;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
  color: var(--text);
}

.abjT-count { color: var(--muted); font-size: 13px; text-align: right; }

.abjT-select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  outline: none;
  font-weight: 800;
  color: var(--text);
}
.abjT-selectSm { margin-top: 8px; padding: 8px 10px; font-size: 12px; }

.abjT-list {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15,23,42,.05);
}

.abjT-listHead {
  display: grid;
  grid-template-columns: 1.55fr 1fr 240px 260px;
  gap: 12px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  background: linear-gradient(180deg, #fff, #fbfcff);
  border-bottom: 1px solid rgba(15,23,42,.08);
}

.abjT-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr 240px 260px;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(15,23,42,.07);
  position: relative;
  background: #fff;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.abjT-row:last-child { border-bottom: 0; }

.abjT-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent, var(--gold));
}

.abjT-row:hover {
  background: #fafafa;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15,23,42,.06);
}

.abjT-col { display: flex; align-items: flex-start; gap: 12px; }
.abjT-colA { align-items: center; }
.abjT-colC { flex-direction: column; }
.abjT-colD { justify-content: flex-end; gap: 10px; align-items: center; }

.abjT-avatar {
  width: 46px; height: 46px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  flex: 0 0 auto;
}
.abjT-avatar img { width: 100%; height: 100%; object-fit: cover; }
.abjT-avatarPh {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9;
  color: var(--muted);
}

.abjT-name { font-weight: 900; line-height: 1.1; }
.abjT-liga { color: var(--muted); font-weight: 900; font-size: 12px; margin-left: 6px; }

.abjT-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.abjT-pill {
  background: rgba(199,160,60,.14);
  color: #7a5a10;
  font-weight: 900;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
}

.abjT-link {
  color: var(--text);
  font-weight: 900;
  text-decoration: none;
}
.abjT-link:hover { text-decoration: underline; }

.abjT-infoLine { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 12px; }
.abjT-infoLine i { color: var(--muted); }
.abjT-dim { color: var(--muted); }

/* Badge PRO */
.abjT-badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
}
.abjT-b-borrador { color: #334155; border-color: rgba(100,116,139,.35); }
.abjT-b-inscripciones { color: #92400e; border-color: rgba(245,158,11,.35); }
.abjT-b-en_juego { color: #166534; border-color: rgba(34,197,94,.35); }
.abjT-b-finalizado { color: #9f1239; border-color: rgba(225,29,72,.35); }

.abjT-btn {
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.abjT-btn:hover { transform: translateY(-1px); background: #f8fafc; }
.abjT-btn i { margin-right: 8px; }

.abjT-btnGold {
  border: 0;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  color: #111;
}
.abjT-btnGold i { margin-right: 8px; }

.abjT-btnOutline { padding: 10px 12px; }

.abjT-btnIcon {
  width: 42px; height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.abjT-btnIcon i { margin: 0; }

.abjT-btnDanger {
  border-color: rgba(225,29,72,.25);
  color: #9f1239;
}
.abjT-btnDanger:hover {
  background: rgba(225,29,72,.06);
  border-color: rgba(225,29,72,.35);
}

.abjT-right { text-align: right; }

.abjT-empty { padding: 38px 18px; text-align: center; }
.abjT-emptyIcon { font-size: 40px; color: var(--gold); }
.abjT-emptyTitle { font-weight: 900; margin-top: 10px; }
.abjT-emptySub { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }

@keyframes abjUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.abjT-anim { animation: abjUp .28s ease both; }

@media (max-width: 1100px) {
  .abjT-toolbar { grid-template-columns: 1fr 1fr; }
  .abjT-count { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 900px) {
  .abjT-listHead { display: none; }
  .abjT-row { grid-template-columns: 1fr; }
  .abjT-colD { justify-content: flex-start; }
}

/* =========================================================
   11) MODAL + WIZARD (TRIBUNAL)
   ========================================================= */
.abjModal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  z-index: var(--abj-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* blur solo si existe */
@supports (backdrop-filter: blur(4px)) {
  .abjModal { backdrop-filter: blur(4px); }
}

.abjModal-dialog {
  width: 100%;
  max-width: 800px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255,255,255,0.1);
  animation: abjUp .25s ease both;
}

.abjModal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.abjModal-title {
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  gap: 12px;
  align-items: center;
  color: #0f172a;
  margin: 0;
}

.title-icon {
  width: 32px;
  height: 32px;
  background: #fefce8;
  color: #ca8a04;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.abjModal-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.abjModal-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #ef4444;
  transform: translateY(-1px);
}

/* Wizard */
.abjWizard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
  gap: 10px;
}

.abjStep {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #94a3b8;
  cursor: pointer;
  transition: .2s;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid #e2e8f0;
}
.abjStep.active {
  color: #b45309;
  background: #fffbeb;
}
.abjStep.active .step-num {
  background: #b45309;
  color: #fff;
  border-color: #b45309;
}
.step-line {
  flex: 1;
  height: 2px;
  background: #f1f5f9;
  margin: 0 10px;
  min-width: 20px;
}

/* Form */
.abjForm { padding: 24px; min-height: 300px; }
.abjGrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 15px; }

.abjIn {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  background: #fff;
  color: #0f172a;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-size: 0.95rem;
}
.abjIn:focus {
  border-color: var(--abj-gold);
  box-shadow: 0 0 0 3px rgba(199, 160, 60, 0.15);
}

/* Footer */
.abjModal-foot {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f8fafc;
}

.abjBtn {
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease;
}
.abjBtn:hover { transform: translateY(-1px); }

.abjBtn-gold { background: var(--abj-gold); color: #fff; }
.abjBtn-gold:hover { filter: brightness(.97); }

.abjBtn-sec { background: #fff; border-color: #cbd5e1; color: #64748b; }
.abjBtn-sec:hover { background: #f1f5f9; }

.is-invalid {
  border-color: rgba(225, 29, 72, .65) !important;
  box-shadow: 0 0 0 .2rem rgba(225, 29, 72, .14) !important;
}

@media (max-width: 768px) {
  .abjGrid2 { grid-template-columns: 1fr; }
  .abjWizard { padding: 10px; overflow-x: auto; }
}

/* =========================================================
   12) FIX DROPDOWN HOVER (PUENTE INVISIBLE) & BUTTONS
   ========================================================= */
.dropdown-content::before {
  content: "";
  position: absolute;
  top: -15px;       /* Sube para tocar el botón de arriba */
  left: 0;
  width: 100%;
  height: 20px;     /* Altura suficiente para rellenar el hueco */
  background: transparent; /* Es invisible, pero el mouse lo detecta */
  display: block;
}

/* Ejemplo de estilo para el botón activo */
button.active {
    background-color: #2563eb; /* Azul fuerte */
    color: white;
    border-color: #2563eb;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.5);
}

/* --- ESTILOS PARA LA BARRA DE ACCIONES (Estilo Jugadores) --- */

/* Grupo de botones unidos (Plantilla | Importar) */
.abj-btn-group { 
    display: flex; 
    align-items: center; 
    background: #fff; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    overflow: hidden; 
    height: 40px; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-group-item { 
    border: none; 
    background: transparent; 
    padding: 0 15px; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #475569; 
    cursor: pointer; 
    text-decoration: none; 
    transition: background 0.2s; 
}
.btn-group-item:hover { 
    background: #f8fafc; 
    color: #0f172a; 
}
.separator { 
    width: 1px; 
    height: 60%; 
    background: #e2e8f0; 
}

/* Botón Suave (Exportar) */
.btn-soft-action { 
    height: 40px; 
    padding: 0 15px; 
    border: 1px solid #e2e8f0; 
    background: #fff; 
    border-radius: 8px; 
    color: #475569; 
    font-weight: 600; 
    font-size: 0.85rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    cursor: pointer; 
    transition: all 0.2s; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-soft-action:hover { 
    border-color: #cbd5e1; 
    color: #0f172a; 
    background: #f8fafc; 
}

/* Ajuste para el Dropdown con el nuevo botón */
.dropdown-export .dropdown-content {
    top: 45px; /* Ajuste por la altura del botón */
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 5px;
    min-width: 160px;
    position: absolute;
    right: 0;
    display: none; /* Se maneja con JS o Hover */
    z-index: 10;
}

.dropdown-export:hover .dropdown-content {
    display: block;
}