/* css/master.css */
:root {
    /* COLORES DINÁMICOS (Esto cambiará según el torneo) */
    --primary-color: #00C853; /* Verde Neón por defecto */
    --primary-glow: rgba(0, 200, 83, 0.4); 
    
    /* MODO OSCURO BASE */
    --bg-color: #121212;       /* Fondo casi negro */
    --card-bg: #1E1E1E;        /* Gris oscuro para tarjetas */
    --text-color: #ffffff;
    --text-muted: #B0B0B0;
    --input-bg: #2C2C2C;
    --danger: #ff4444;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* Centrado para PC */
    min-height: 100vh;
}

/* CONTENEDOR MÓVIL (Simula una App) */
.app-container {
    width: 100%;
    max-width: 480px; /* Ancho máximo de celular */
    background-color: var(--bg-color);
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

/* FORMULARIOS MODERNOS */
.logo-area {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.logo-area h1 {
    font-size: 2.5rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.modern-input {
    width: 100%;
    padding: 15px;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box; /* Importante para que no se salga */
    transition: 0.3s;
}

.modern-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-main {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #000;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: transform 0.2s;
}

.btn-main:active {
    transform: scale(0.98); /* Efecto de presión */
}

.links {
    margin-top: 20px;
    text-align: center;
}

.links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* --- ESTILOS DEL MENÚ HAMBURGUESA --- */

/* Barra Superior Fija */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
}

.page-title {
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.profile-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

/* El Menú Lateral (Sidebar) */
.sidebar {
    height: 100%;
    width: 280px; /* Ancho del menú */
    position: fixed;
    z-index: 1000; /* Siempre encima */
    top: 0;
    left: -280px; /* Oculto a la izquierda */
    background-color: #1a1a1a; /* Gris muy oscuro */
    overflow-x: hidden;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Animación suave moderna */
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    padding-top: 60px;
}

.sidebar.active {
    left: 0; /* Al activarse, entra a la pantalla */
}

/* Header del Menú */
.sidebar-header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    padding: 20px;
    background-color: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-small {
    width: 30px; 
    height: 30px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-weight: bold;
    color: white;
}

.username {
    font-weight: bold;
    font-size: 0.9rem;
}

.closebtn {
    font-size: 2rem;
    color: #888;
    text-decoration: none;
    line-height: 1;
}

/* Enlaces del Menú */
.menu-item {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1rem;
    color: #e0e0e0;
    display: block;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #252525;
    border-left: 3px solid var(--primary-color);
    color: white;
}

.text-danger {
    color: var(--danger) !important;
}

/* El Fondo Oscuro (Overlay) */
.overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7); /* Oscurece el fondo */
    z-index: 900; /* Debajo del menú pero encima del contenido */
    display: none; /* Oculto por defecto */
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* Tarjeta de Saldo (Estilo extra) */
.card-balance {
    background: linear-gradient(145deg, #1e1e1e, #252525);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border: 1px solid #333;
}

.balance-amount {
    color: var(--primary-color); 
    font-size: 3rem; 
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
}

.balance-status {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* AJUSTE PARA ICONOS */
i.bx {
    vertical-align: middle;
    margin-right: 5px; /* Espacio entre icono y texto */
}

.icon-large {
    margin-right: 0; /* En el panel admin no queremos margen a la derecha porque están centrados */
}

/* Arreglar fondo del icono animado de SweetAlert2 */
.swal2-icon.swal2-success .swal2-success-fix,
.swal2-icon.swal2-success .swal2-success-circular-line-left,
.swal2-icon.swal2-success .swal2-success-circular-line-right {
    background-color: #1e1e1e !important;
}

/* Opcional: Si el "transparent" hace que la animación se vea rara, 
   cambia 'transparent' por el color exacto de tu fondo, 
   por ejemplo: background-color: #1e1e1e !important; */

/* =========================================
   ESTILOS LOGIN CON PATRÓN DE ICONOS (CSS PURO)
   ========================================= */

.auth-page {
    background-color: #050505; /* Negro profundo */
    
    /* PATRÓN DE FÚTBOL CREADO CON CÓDIGO (SVG) */
    background-image: 
        /* 1. Sombra radial para dar profundidad (foco de luz al centro) */
        radial-gradient(circle at center, rgba(30,30,30,0.4) 0%, #000000 100%),
        
        /* 2. EL PATRÓN DE ICONOS: Balón, Portería, Tarjeta, Bandera */
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23333333' fill-opacity='0.25'%3E%3C!-- Balón (Círculo) --%3E%3Cpath d='M10 10c2.76 0 5 2.24 5 5s-2.24 5-5 5-5-2.24-5-5 2.24-5 5-5zm0 2c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z'/%3E%3C!-- Tarjeta (Rectángulo) --%3E%3Cpath d='M50 10h6v8h-6z'/%3E%3C!-- Portería (Forma U) --%3E%3Cpath d='M30 50v-6h10v6h-2v-4h-6v4z'/%3E%3C!-- Banderín (Triángulo) --%3E%3Cpath d='M70 35v10h-2V30l7 3.5L70 37z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

    background-size: cover, 80px 80px; /* Tamaño de repetición del patrón */
    background-position: center, center;
    background-attachment: fixed; /* Efecto fijo profesional */
    
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* LA TARJETA DEL FORMULARIO */
.login-card {
    background-color: #1E1E1E; /* Gris oscuro mate */
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    padding: 30px 25px;
    box-sizing: border-box;
    
    /* Línea VERDE NEÓN en la parte de ARRIBA */
    border-top: 5px solid var(--primary-color);
    border-bottom: 1px solid #333; /* Un detalle sutil abajo */
    
    box-shadow: 0 20px 60px rgba(0,0,0,0.9); /* Sombra intensa para que flote sobre el fondo */
    position: relative;
    z-index: 10;
}

/* Título */
.login-title {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800; /* Más grueso */
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.login-subtitle {
    color: var(--primary-color); /* Subtítulo en verde */
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 25px;
    text-align: center;
    display: block;
    opacity: 0.8;
}

/* Inputs mejorados */
.app-input-group {
    margin-bottom: 15px;
}

.app-label {
    display: flex;
    align-items: center;
    color: #aaa;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Iconos pequeños al lado del label (opcional si usas HTML extra) */
.app-label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.app-input {
    width: 100%;
    background-color: #0a0a0a; /* Input muy oscuro */
    border: 1px solid #333;
    border-radius: 10px;
    padding: 16px;
    color: white;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s;
}

.app-input:focus {
    border-color: var(--primary-color);
    background-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.1);
}

.app-input::placeholder {
    color: #444;
}

/* Botón estilo App */
.btn-app {
    width: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #00a142 100%); /* Degradado sutil */
    color: #000;
    font-weight: 800;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 4px 0 #007c33; /* Efecto 3D botón presionado */
    transition: all 0.1s;
}

.btn-app:active {
    transform: translateY(4px); /* Se hunde al presionar */
    box-shadow: 0 0 0 #007c33;
}

/* Enlaces */
.auth-links {
    margin-top: 30px;
    text-align: center;
}

.auth-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-block;
    margin: 0 10px;
}

.auth-links a:hover {
    color: white;
}

/* =========================================
   ESTILOS DEL LOGOTIPO (BRANDING)
   ========================================= */

.app-brand {
    text-align: center;
    margin-bottom: 30px; /* Espacio entre el logo y la tarjeta */
    z-index: 20;
    position: relative;
}

/* El nombre MIFUTBASE grande */
.brand-title {
    font-size: 3rem; /* Tamaño grande para móvil */
    font-weight: 900; /* Muy, muy grueso (Black) */
    font-style: italic; /* Inclinado = Velocidad/Deporte */
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Sombra negra fuerte */
}

/* Poner parte del texto en verde neón */
.brand-title span {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(0, 200, 83, 0.6); /* Resplandor neón */
}

/* El eslogan pequeño abajo */
.brand-subtitle {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
    letter-spacing: 3px; /* Letras separadas estilo técnico */
    margin-top: 8px;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(0,0,0,0.6); /* Fondo semitransparente para leerse mejor sobre el patrón */
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block; /* Para que el fondo solo cubra el texto */
}

/* ... (Tus estilos anteriores siguen igual) ... */

/* =========================================
   ESTILOS SWEETALERT 2 (MODO OSCURO PRO)
   ========================================= */

/* Ventana Principal */
div.swal2-popup {
    background-color: #1E1E1E !important; /* Gris oscuro de tus tarjetas */
    border: 1px solid #333;
    border-radius: 20px !important;
    padding: 2em !important;
}

/* Título */
h2.swal2-title {
    color: #ffffff !important;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.5rem !important;
    letter-spacing: 1px;
}

/* Texto del cuerpo */
div.swal2-html-container {
    color: #b0b0b0 !important;
    font-size: 1rem !important;
    line-height: 1.6;
}

/* Botón Confirmar (Verde) */
button.swal2-confirm {
    background: linear-gradient(180deg, var(--primary-color) 0%, #009624 100%) !important;
    color: #000 !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    border-radius: 10px !important;
    padding: 12px 30px !important;
    box-shadow: 0 5px 15px var(--primary-glow) !important;
    border: none !important;
}

/* Botón Cancelar (Rojo/Gris) */
button.swal2-cancel {
    background: #333 !important;
    color: #fff !important;
    border-radius: 10px !important;
    padding: 12px 20px !important;
}

/* Ajuste de Iconos para fondo oscuro */
.swal2-icon.swal2-info {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}
.swal2-icon.swal2-warning {
    border-color: #ffcc00 !important;
    color: #ffcc00 !important;
}