/* =============================================
   ARENA GAMING - COLORES CORPORATIVOS CLARO
   🖤 #0E0F0E  |  ⚪ #B4B8BF  |  🔴 #D33E2C
   APLICACIÓN GLOBAL PARA AMBOS MODOS
   ============================================= */

/* ---------- MODO CLARO ---------- */
:root,
body {
    --bg: #f8f9fa;
    --card: #ffffff;
    --card-glass: rgba(255, 255, 255, 0.85);
    --text: #0E0F0E;
    --text-light: #5a5c5f;
    --text-muted: #8e9093;
    --sidebar-bg: #0E0F0E;
    --sidebar-text: #B4B8BF;
    --sidebar-hover: #1a1b1a;
    --border: #d1d5db;
    --border-light: rgba(0, 0, 0, 0.08);
    --primary: #D33E2C;
    --primary-dark: #b53020;
    --primary-glow: rgba(211, 62, 44, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
    --notification-bg: #ffffff;
    --notification-hover: #f1f5f9;
    --notification-unread: #fef2f2;
    --success: #22c55e;
    --success-dark: #16a34a;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --error: #ef4444;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- MODO OSCURO ---------- */
body.dark,
body.dark .torneo-detalle-gamer,
body.dark .ver-torneo-cliente,
body.dark .profile-pro-container,
body.dark .reserva-container {
    --bg: #0E0F0E;
    --card: #161716;
    --card-glass: rgba(22, 23, 22, 0.9);
    --text: #f1f5f9;
    --text-light: #B4B8BF;
    --text-muted: #9a9da0;
    --sidebar-bg: #0a0b0a;
    --sidebar-text: #B4B8BF;
    --sidebar-hover: #1a1b1a;
    --border: #2a2b2a;
    --border-light: rgba(255, 255, 255, 0.06);
    --primary: #D33E2C;
    --primary-dark: #e04b39;
    --primary-glow: rgba(211, 62, 44, 0.5);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);
    --notification-bg: #1a1b1a;
    --notification-hover: #242524;
    --notification-unread: #2a1a18;
}

/* ---------- RESET Y BASE ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    transition: background 0.3s, color 0.2s;
    overflow-x: hidden;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    position: fixed; top: 0; left: 0;
    width: 260px; height: 100vh;
    background: var(--sidebar-bg);
    padding: 1.5rem 1rem;
    overflow-y: auto;
    z-index: 1000;
    transition: width 0.3s ease, transform 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3);
}
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-track { background: var(--sidebar-bg); }
.sidebar::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
.sidebar.collapsed { width: 85px; }
.sidebar.collapsed span { display: none; }
.sidebar .logo {
    display: flex; align-items: center; gap: 12px;
    font-size: 1.3rem; font-weight: 800;
    margin-bottom: 2rem; padding: 0 0.75rem;
    color: white; letter-spacing: -0.5px;
}
.sidebar .logo i {
    font-size: 2rem; color: var(--primary);
    filter: drop-shadow(0 0 6px var(--primary-glow));
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { filter: drop-shadow(0 0 2px var(--primary-glow)); }
    50% { filter: drop-shadow(0 0 10px var(--primary-glow)); }
    100% { filter: drop-shadow(0 0 2px var(--primary-glow)); }
}
.sidebar a {
    display: flex; align-items: center; gap: 14px;
    color: var(--sidebar-text);
    padding: 0.65rem 0.8rem; margin: 0.15rem 0;
    text-decoration: none; border-radius: 8px;
    transition: var(--transition); font-weight: 500;
    position: relative; overflow: hidden;
}
.sidebar a::before {
    content: ''; position: absolute; left: 0; top: 0;
    width: 0; height: 100%;
    background: linear-gradient(90deg, var(--primary), transparent);
    transition: width 0.3s; z-index: -1;
}
.sidebar a:hover::before { width: 100%; }
.sidebar a i { width: 1.6rem; font-size: 1.2rem; text-align: center; transition: transform 0.2s; }
.sidebar a:hover { color: white; transform: translateX(4px); }
.sidebar a:hover i { transform: scale(1.1); }

/* ---------- MAIN ---------- */
.main {
    margin-left: 260px; padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}
.main.collapsed { margin-left: 85px; }

/* ---------- HEADER ---------- */
.header {
    background: var(--card-glass); backdrop-filter: blur(12px);
    border-radius: 8px; padding: 0.8rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    flex-wrap: wrap; gap: 1rem;
}
.header:hover { box-shadow: var(--shadow-md); }

/* ---------- NOTIFICACIONES ---------- */
.notifications-container { position: relative; }
.notif-btn {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.4rem 0.8rem;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    transition: all 0.2s; color: var(--text); font-size: 0.85rem;
}
.notif-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.notif-badge { background: var(--primary); color: white; border-radius: 4px; padding: 0.1rem 0.4rem; font-size: 0.7rem; font-weight: bold; }
.notif-dropdown {
    position: absolute; top: 100%; right: 0;
    width: 320px; max-height: 400px; overflow-y: auto;
    background: var(--card); border-radius: 6px;
    box-shadow: var(--shadow-lg); border: 1px solid var(--border);
    z-index: 1000; display: none; margin-top: 0.5rem;
}
.notif-dropdown.show { display: block; }
.notif-item {
    padding: 0.7rem; border-bottom: 1px solid var(--border);
    transition: background 0.2s; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
}
.notif-item:hover { background: var(--notification-hover); }
.notif-item.unread { background: var(--notification-unread); }
.notif-icon {
    width: 32px; height: 32px; border-radius: 6px;
    background: var(--primary);
    display: flex; align-items: center; justify-content: center; color: white;
}
.notif-content { flex: 1; }
.notif-title { font-weight: 600; font-size: 0.85rem; }
.notif-message { font-size: 0.7rem; color: var(--text-light); }
.notif-time { font-size: 0.6rem; color: var(--text-light); margin-top: 0.2rem; }
.notif-empty { text-align: center; padding: 1rem; color: var(--text-light); }

/* ---------- BOTONES (bordes más rectos) ---------- */
.icon-btn,
.btn-action-gamer,
.btn-gamer-primary,
.btn-crear-torneo,
.btn-guardar-gamer,
form button[type="submit"] {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border: none;
    padding: 0.5rem 1.2rem; border-radius: 6px;
    font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: var(--transition);
    box-shadow: 0 1px 4px var(--primary-glow);
    font-size: 0.9rem;
}
.icon-btn:hover,
.btn-action-gamer:hover,
.btn-gamer-primary:hover,
.btn-crear-torneo:hover {
    box-shadow: 0 2px 8px var(--primary-glow);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* ---------- USER INFO ---------- */
.user-info {
    display: flex; align-items: center; gap: 12px;
    font-weight: 600;
    background: var(--bg); padding: 0.4rem 1rem;
    border-radius: 6px; transition: var(--transition);
}
.user-info i { font-size: 1.3rem; color: var(--primary); }
.user-info:hover { transform: scale(1.02); background: var(--card); }

/* ---------- HAMBURGUESA ---------- */
.menu-toggle {
    position: fixed; top: 1rem; left: 1rem;
    width: 44px; height: 44px;
    background: var(--primary);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 1100;
    box-shadow: var(--shadow-md); transition: var(--transition);
    font-size: 1.2rem; color: white; border: none;
}
.menu-toggle:hover { background: var(--primary-dark); }

/* ---------- OVERLAY ---------- */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px);
    z-index: 999; opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.active { transform: translateX(0); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.5); }
    .sidebar.collapsed { width: 280px; }
    .sidebar.collapsed span { display: inline; }
    .main { margin-left: 0 !important; padding: 1rem; padding-top: 5rem; }
    .header { flex-direction: column; align-items: stretch; }
    .notifications-container { order: -1; }
    .user-info { justify-content: center; }
    .menu-toggle { top: 0.8rem; left: 0.8rem; width: 42px; height: 42px; }
}

/* ============================================
   ESTILOS GLOBALES PARA VISTAS INTERNAS
   ============================================ */

/* Tarjetas */
.card,
.card-gamer,
.torneo-card,
.grupo-card-gamer,
.columna-bracket,
.match-card,
.factura-card-gamer,
.gamer-card-table,
.torneo-detalle-gamer .torneo-header,
.tab-content-gamer,
.premios-multiples-gamer,
.clasificados-box-gamer,
.participante-card,
.profile-card,
.history-section,
.tournaments-section,
.reserva-card,
.ver-torneo-cliente .vt-header,
.ver-torneo-cliente .vt-tab-content,
.card-body-gamer,
.jornada-card,
.match-card-cliente,
.columna-bracket-cliente,
.premio-card-gamer,
.card-clasificado-gamer,
.stat-item,
.finanza-item,
.box-economia,
.torneo-card-body,
.participante-card-cliente,
.premio-card-cliente,
.gamer-card {
    background: var(--card) !important;
    border-color: var(--border) !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--text) !important;
    border-radius: 8px !important;
}

/* Hover en tarjetas */
.card:hover,
.torneo-card:hover,
.grupo-card-gamer:hover,
.columna-bracket:hover,
.match-card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Tablas */
table,
.tabla-torneos-gamer,
.tabla-ventas-gamer,
.tabla-factura-gamer,
.tabla-grupo-gamer,
.tabla-ranking,
.tabla-participantes-gamer,
.tabla-partidos-gamer,
.tabla-ranking-cliente {
    background: var(--card) !important;
    color: var(--text) !important;
    width: 100%;
    border-collapse: collapse;
    border-radius: 6px;
}
th {
    background: var(--bg) !important;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary) !important;
    padding: 0.8rem; text-align: left; font-weight: 600;
}
td {
    border-bottom: 1px solid var(--border) !important;
    padding: 0.8rem; text-align: left; vertical-align: middle;
    color: var(--text) !important;
}
tr:hover td {
    background: rgba(211, 62, 44, 0.04) !important;
}

/* Inputs y selects */
input, select, textarea,
.modern-input, .modern-select {
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    padding: 0.6rem 0.8rem; border-radius: 6px;
    width: 100%; transition: var(--transition);
}

/* Botones genéricos */
.btn,
.btn-save {
    background: var(--primary) !important;
    color: white !important;
    padding: 0.5rem 1rem; border-radius: 6px;
    border: none; cursor: pointer;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600;
}
.btn:hover, .btn-save:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px);
}

/* Badges de estado */
.estado-gamer.activo,
.estado-badge-grande.activo,
.torneo-status-badge.activo,
.badge-gamer.activo,
.vt-estado.activo {
    background: var(--success) !important; color: white !important;
    border-radius: 4px; padding: 0.2rem 0.6rem; font-size: 0.75rem;
}
.estado-gamer.finalizado,
.estado-badge-grande.finalizado,
.torneo-status-badge.finalizado,
.vt-estado.finalizado {
    background: var(--primary) !important; color: white !important;
    border-radius: 4px; padding: 0.2rem 0.6rem; font-size: 0.75rem;
}
.badge-gamer.pendiente {
    background: var(--warning) !important; color: white !important;
    border-radius: 4px;
}
.badge-gamer.inscrito,
.badge-gamer.registrado {
    background: #6366f1 !important; color: white !important;
    border-radius: 4px;
}

/* Fase actual */
.fase-box-gamer {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 1px 6px var(--primary-glow) !important;
    border-radius: 6px; padding: 0.5rem 1.2rem;
}

/* Tabs */
.tab-btn {
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-weight: 600;
    border-radius: 6px; padding: 0.5rem 1rem;
    cursor: pointer; transition: all 0.2s;
    font-size: 0.85rem;
}
.tab-btn i { color: var(--primary) !important; }
.tab-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}
.tab-btn.active i { color: white !important; }

/* Encabezados de sección */
.titulo-torneos-gamer,
.titulo-participantes-gamer,
.titulo-bracket-gamer,
.titulo-ranking-gamer,
.jornada-header,
.grupo-header,
.ronda-header,
.card-header-gamer,
.premios-header-gamer,
.clasificados-header,
.grupo-titulo {
    border-left: 3px solid var(--primary) !important;
    color: var(--text) !important;
    padding-left: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.titulo-torneos-gamer i,
.titulo-participantes-gamer i,
.titulo-bracket-gamer i,
.titulo-ranking-gamer i {
    color: var(--primary) !important;
}

/* VS Badge */
.vs-badge {
    background: var(--primary) !important;
    color: white !important;
    border-radius: 4px; padding: 0.1rem 0.5rem;
    font-weight: 700; font-size: 0.7rem;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }

/* ============================================
   LOGIN DEL ADMIN
   ============================================ */

.login-container {
    background: rgba(22, 23, 22, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--primary-glow);
    transition: transform 0.3s ease;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}
.login-container:hover { transform: scale(1.01); }

.login-header { text-align: center; margin-bottom: 2rem; }
.login-header i {
    font-size: 3rem; color: var(--primary);
    filter: drop-shadow(0 0 8px var(--primary)); margin-bottom: 0.5rem;
}
.login-header h2 {
    font-size: 1.8rem; font-weight: 800;
    background: linear-gradient(135deg, #fff, #B4B8BF);
    background-clip: text; -webkit-background-clip: text; color: transparent;
    letter-spacing: -0.5px;
}
.login-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }

.input-group { margin-bottom: 1.2rem; }
.input-group input {
    width: 100%; padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.05); border: 1px solid #2a2b2a;
    border-radius: 10px; font-size: 0.95rem; color: var(--text-light);
    transition: all 0.2s ease; outline: none; font-family: 'Inter', sans-serif;
}
.input-group input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(255, 255, 255, 0.08);
}
.input-group input::placeholder { color: #5a5c5f; font-weight: 400; }

.login-btn {
    width: 100%; background: var(--primary); border: none;
    padding: 0.9rem; border-radius: 10px; font-size: 1rem;
    font-weight: 700; color: white; cursor: pointer;
    transition: all 0.2s ease; display: flex; align-items: center;
    justify-content: center; gap: 8px; margin-top: 0.5rem;
    box-shadow: 0 4px 10px var(--primary-glow);
}
.login-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px var(--primary-glow); }

.login-footer {
    text-align: center; margin-top: 2rem; font-size: 0.75rem;
    color: var(--text-muted); border-top: 1px solid #2a2b2a; padding-top: 1.2rem;
}

.login-footer a {
    color: #ff8a80;
    font-weight: 800;
    text-decoration: none;
}

.login-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.error-message {
    background: rgba(239, 68, 68, 0.2); border-left: 4px solid #ef4444;
    padding: 0.8rem; border-radius: 10px; margin-bottom: 1rem;
    font-size: 0.85rem; color: #fecaca; display: flex; align-items: center; gap: 8px;
}

.login-error {
    background: rgba(239, 68, 68, 0.15); border-left: 4px solid #ef4444;
    color: #fca5a5; padding: 0.9rem 1.2rem; border-radius: 10px;
    margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500;
    display: flex; align-items: center; gap: 10px; animation: shakeError 0.5s ease;
}
.login-error i { color: #ef4444; font-size: 1.1rem; }

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@media (max-width: 480px) {
    .login-container { padding: 1.5rem; max-width: 100%; }
    .login-header h2 { font-size: 1.5rem; }
    .input-group input { padding: 0.8rem; }
    .login-btn { padding: 0.8rem; }
}

/* ============================================
   RESERVAS - LISTADO ADMIN
   ============================================ */

.titulo-reservas-gamer {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 1.5rem; font-size: 1.4rem; font-weight: 700;
    color: var(--text); border-left: 4px solid var(--primary);
    padding-left: 1rem;
}
.titulo-reservas-gamer i { color: var(--primary); font-size: 1.5rem; }

.top-bar-gamer {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}

.card-gamer {
    background: var(--card); border-radius: 10px; border: 1px solid var(--border);
    box-shadow: var(--shadow-sm); overflow: hidden; transition: all 0.3s ease;
}
.card-gamer:hover { box-shadow: var(--shadow-md); border-color: var(--primary); }

.card-header-gamer {
    background: var(--bg); padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
    font-weight: 600; color: var(--text); display: flex; align-items: center;
    gap: 10px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-header-gamer i { color: var(--primary); font-size: 1.2rem; }
.badge-header {
    margin-left: auto; background: var(--border); padding: 0.2rem 0.6rem;
    border-radius: 20px; font-size: 0.65rem; font-weight: 500; color: var(--text-light);
}
.card-body-gamer { padding: 1.5rem; }

.table-responsive-gamer { overflow-x: auto; }
.tabla-reservas-gamer { width: 100%; border-collapse: collapse; }
.tabla-reservas-gamer th {
    background: var(--bg); color: var(--text); font-weight: 700;
    padding: 1rem; border-bottom: 2px solid var(--primary);
    text-align: left; text-transform: uppercase; letter-spacing: 0.5px;
}
.tabla-reservas-gamer th i { margin-right: 8px; color: var(--primary); }
.tabla-reservas-gamer td {
    padding: 1rem; border-bottom: 1px solid var(--border);
    vertical-align: middle; color: var(--text);
}

.fila-reserva-gamer {
    opacity: 0; transform: translateX(-10px);
    animation: slideInRow 0.4s ease forwards;
}
@keyframes slideInRow { to { opacity: 1; transform: translateX(0); } }
.fila-reserva-gamer:hover td { background: rgba(211, 62, 44, 0.04); }

.badge-gamer {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 0.3rem 0.9rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
}
.badge-pendiente { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-completado, .badge-confirmada { background: rgba(34, 197, 94, 0.12); color: #22c55e; border: 1px solid #22c55e; }

.acciones-gamer { display: flex; gap: 8px; }

/* ============================================
   BOTONES DE PARTIDOS (TORNEOS)
   ============================================ */

.btn-mini-gamer {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.35rem 0.7rem; border-radius: 6px; text-decoration: none;
    transition: all 0.2s ease; color: white !important;
    font-weight: 600; font-size: 0.72rem; cursor: pointer; border: none;
    background: var(--primary) !important;
    box-shadow: 0 1px 4px var(--primary-glow) !important;
}
.btn-mini-gamer i { color: white !important; font-size: 0.75rem; }
.btn-mini-gamer:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

.btn-mini-gamer.empate {
    background: var(--warning) !important;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3) !important;
}
.btn-mini-gamer.empate:hover { box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5) !important; }

.btn-mini-gamer.success { background: var(--success) !important; }
.btn-mini-gamer.danger { background: var(--error) !important; }

.btn-validar-gamer {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.35rem 0.7rem; border-radius: 6px; text-decoration: none;
    transition: all 0.2s ease; color: white !important;
    font-weight: 600; font-size: 0.72rem; cursor: pointer; border: none;
    background: var(--success) !important;
    box-shadow: 0 1px 4px rgba(34, 197, 94, 0.3) !important;
}
.btn-validar-gamer i { color: white !important; font-size: 0.75rem; }
.btn-validar-gamer:hover { background: var(--success-dark) !important; transform: translateY(-1px); }

.validado-icon { color: var(--success) !important; font-weight: 600; }
.pendiente-icon { color: var(--text-light) !important; }

/* ============================================
   RESERVAS RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .top-bar-gamer { flex-direction: column; align-items: stretch; }
    .btn-gamer-primary { justify-content: center; width: 100%; }
    .card-body-gamer { padding: 1rem; }
    .tabla-reservas-gamer thead { display: none; }
    .tabla-reservas-gamer tr {
        display: block; margin-bottom: 1rem; border-radius: 10px;
        padding: 0.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    }
    .tabla-reservas-gamer td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.75rem; border: none; border-bottom: 1px solid var(--border);
    }
    .tabla-reservas-gamer td:last-child { border-bottom: none; }
    .tabla-reservas-gamer td::before {
        content: attr(data-label); font-weight: 700; color: var(--primary);
        width: 40%; text-transform: uppercase; letter-spacing: 0.5px;
    }
}

/* ============================================
   FORMULARIOS DEL ADMIN
   ============================================ */

.btn-gamer-outline {
    display: inline-flex; align-items: center; gap: 10px;
    background: transparent; color: var(--primary) !important;
    padding: 0.6rem 1.5rem; border-radius: 2rem; text-decoration: none;
    font-weight: 600; letter-spacing: 0.3px; transition: all 0.25s ease;
    border: 1px solid var(--primary); box-shadow: none;
}
.btn-gamer-outline:hover {
    background: var(--primary) !important; color: white !important;
    border-color: var(--primary) !important;
}

.gamer-card {
    background: var(--card) !important; backdrop-filter: blur(8px);
    border-radius: 1.2rem !important; padding: 2rem;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow-md) !important; transition: all 0.3s ease;
    max-width: 1100px; margin: 0 auto;
}
.gamer-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.15) !important; transform: translateY(-2px);
}

.card-header-glow {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 2rem; padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary) !important;
    font-size: 1.1rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--text) !important;
}
.card-header-glow i { font-size: 1.5rem; color: var(--primary) !important; }

.form-grid-gamer {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem;
}

.input-group-gamer { display: flex; flex-direction: column; gap: 0.5rem; }
.input-group-gamer label {
    font-size: 0.85rem; font-weight: 600; color: var(--text-light);
    display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.input-group-gamer label i { color: var(--primary) !important; }
.input-group-gamer label small {
    text-transform: none; font-weight: 400; font-size: 0.75rem; margin-left: auto;
}
.input-group-gamer input,
.input-group-gamer select {
    width: 100%; padding: 0.8rem 1rem; border-radius: 0.8rem;
    border: 1px solid var(--border) !important; background: var(--bg) !important;
    color: var(--text) !important; font-size: 0.95rem; transition: var(--transition);
}
.input-group-gamer input:focus,
.input-group-gamer select:focus {
    outline: none; border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}
.input-group-gamer input:hover:not(:focus),
.input-group-gamer select:hover:not(:focus) { border-color: var(--primary) !important; }

.form-actions-gamer { margin-top: 2rem; display: flex; justify-content: flex-end; }
.btn-gamer-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: white !important; padding: 0.8rem 2rem; border-radius: 2rem !important;
    border: none; font-weight: 700; font-size: 0.95rem; text-transform: uppercase;
    letter-spacing: 0.5px; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}
.btn-gamer-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
    box-shadow: 0 6px 18px var(--primary-glow) !important; transform: translateY(-1px);
}

@media (max-width: 768px) {
    .gamer-card { padding: 1.2rem; border-radius: 1rem !important; }
    .btn-gamer-outline { width: 100%; justify-content: center; }
    .form-actions-gamer { justify-content: stretch; }
    .btn-gamer-primary { width: 100%; justify-content: center; }
    .form-grid-gamer { gap: 1rem; }
    .card-header-glow { font-size: 1rem; }
}

/* ============================================
   LISTADO DE TORNEOS (ADMIN) - TARJETAS
   ============================================ */

.torneos-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.titulo-torneos-gamer {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}
.titulo-torneos-gamer i {
    color: var(--primary);
    font-size: 1.8rem;
}

.stats-mini-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}
.stat-mini {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
}
.stat-mini i { color: var(--primary); }
.stat-valor {
    font-weight: 700;
    color: var(--text);
}
.stat-label {
    color: var(--text-light);
    font-weight: 500;
}

.btn-crear-torneo {
    background: var(--primary);
    color: white;
    padding: 0.55rem 1.3rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px var(--primary-glow);
}
.btn-crear-torneo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.torneos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.torneo-card {
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(20px);
    animation: cardAppear 0.4s ease forwards;
}
@keyframes cardAppear {
    to { opacity: 1; transform: translateY(0); }
}
.torneo-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.torneo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 1.2rem;
}
.header-activo { background: rgba(34,197,94,0.08); border-bottom: 1px solid rgba(34,197,94,0.2); }
.header-finalizado { background: rgba(211,62,44,0.08); border-bottom: 1px solid rgba(211,62,44,0.2); }

.torneo-status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
}
.torneo-status-badge.activo { background: #22c55e; color: white; }
.torneo-status-badge.finalizado { background: var(--primary); color: white; }

.torneo-formato-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(211,62,44,0.08);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.torneo-card-body {
    padding: 1.2rem;
    text-align: center;
}
.torneo-juego-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}
.torneo-nombre {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
}
.torneo-juego-texto {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.8rem;
}
.torneo-fechas {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}
.torneo-fechas i { color: var(--primary); }

.torneo-progreso {
    margin-bottom: 1rem;
    background: var(--bg);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
}
.progreso-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}
.progreso-barra {
    height: 6px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.progreso-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--primary);
    transition: width 0.8s ease;
}

.torneo-finanzas {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}
.finanza-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    text-align: center;
    flex: 1;
}
.finanza-item i { color: var(--primary); font-size: 0.7rem; display: block; margin-bottom: 0.2rem; }
.finanza-item span { font-size: 0.6rem; color: var(--text-light); display: block; }
.finanza-item strong { font-size: 0.85rem; color: var(--text); }

.torneo-card-actions {
    display: flex;
    gap: 0.4rem;
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.action-btn {
    flex: 1;
    min-width: 55px;
    text-align: center;
    padding: 0.45rem 0.3rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.action-btn.ver { background: rgba(211,62,44,0.1); color: var(--primary); }
.action-btn.participantes { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.action-btn.editar { background: rgba(59,130,246,0.1); color: #3b82f6; }
.action-btn.finalizar { background: rgba(239,68,68,0.1); color: #ef4444; }
.action-btn.activar { background: rgba(34,197,94,0.1); color: #22c55e; }
.action-btn.eliminar { background: rgba(239,68,68,0.1); color: #ef4444; }
.action-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.sin-torneos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card);
    border-radius: 10px;
    border: 1px solid var(--border);
}
.sin-torneos i {
    font-size: 4rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 1rem;
}
.sin-torneos h3 { color: var(--text); margin-bottom: 0.5rem; }
.sin-torneos p { color: var(--text-light); margin-bottom: 1.5rem; }

@media (max-width: 768px) {
    .torneos-grid { grid-template-columns: 1fr; }
    .torneos-dashboard-header { flex-direction: column; align-items: flex-start; }
    .stats-mini-bar { width: 100%; }
    .stat-mini { flex: 1; justify-content: center; }
    .btn-crear-torneo { width: 100%; justify-content: center; }
}
