/* =====================================================
   EL MEJOR INTERNET - Estilos Globales
   Paleta: Amarillo #F5B800, Azul #1565C0, Blanco
   ===================================================== */

:root {
    --amarillo: #F5B800;
    --amarillo-claro: #FFD84D;
    --amarillo-oscuro: #C99300;
    --azul: #1565C0;
    --azul-claro: #1976D2;
    --azul-oscuro: #0D47A1;
    --blanco: #ffffff;
    --gris-claro: #F8F9FA;
    --gris: #6c757d;
    --texto: #212529;
    --sombra: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: #f0f4f8;
    color: var(--texto);
    min-height: 100vh;
}

/* ---- NAVBAR ---- */
.navbar-elmejor {
    background: var(--azul) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.navbar-elmejor .navbar-brand img { height: 42px; }
.navbar-elmejor .navbar-brand span {
    color: var(--amarillo);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}
.navbar-elmejor .nav-link { color: rgba(255,255,255,0.9) !important; font-weight: 600; }
.navbar-elmejor .nav-link:hover, .navbar-elmejor .nav-link.active { color: var(--amarillo) !important; }

/* ---- LOGIN / REGISTRO ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul) 50%, #1a237e 100%);
    padding: 20px;
}
.auth-card {
    background: var(--blanco);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    width: 100%;
    max-width: 460px;
}
.auth-header {
    background: linear-gradient(135deg, var(--amarillo) 0%, var(--amarillo-oscuro) 100%);
    padding: 30px 20px;
    text-align: center;
}
.auth-header img { height: 70px; margin-bottom: 10px; }
.auth-header h4 { color: var(--azul-oscuro); font-weight: 800; margin: 0; font-size: 1.1rem; }
.auth-body { padding: 30px; }
.auth-body h5 { color: var(--azul); font-weight: 700; margin-bottom: 20px; }

/* ---- FORM CONTROLS ---- */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(21,101,192,0.15);
    outline: none;
}
.form-label { font-weight: 600; color: #444; margin-bottom: 4px; font-size: 0.9rem; }
.input-group-text { background: var(--gris-claro); border: 2px solid #e0e0e0; }

/* ---- BOTONES ---- */
.btn-primary-em {
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    border: none;
    border-radius: var(--radius);
    padding: 11px 24px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary-em:hover { background: var(--azul-oscuro); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(21,101,192,0.4); }

.btn-amarillo {
    background: linear-gradient(135deg, var(--amarillo) 0%, var(--amarillo-oscuro) 100%);
    color: var(--azul-oscuro);
    border: none;
    border-radius: var(--radius);
    padding: 9px 20px;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-amarillo:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(245,184,0,0.5); }

/* ---- SIDEBAR (PANEL CLIENTE/ADMIN) ---- */
.panel-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--azul-oscuro) 0%, var(--azul) 100%);
    color: white;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s;
}
.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.sidebar-logo img { height: 55px; }
.sidebar-logo .site-name { color: var(--amarillo); font-weight: 800; font-size: 0.95rem; margin-top: 6px; }
.sidebar-logo .user-name { color: rgba(255,255,255,0.8); font-size: 0.82rem; }

.sidebar-menu { padding: 15px 0; }
.sidebar-menu .menu-section { 
    padding: 8px 20px 4px; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    color: rgba(255,255,255,0.4); 
    letter-spacing: 1.5px; 
    font-weight: 700;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.12);
    color: var(--amarillo);
    border-left-color: var(--amarillo);
}
.sidebar-menu a i { width: 20px; text-align: center; font-size: 1rem; }

/* Badge plan */
.badge-plan-activo { background: #2e7d32; color: white; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.badge-plan-suspendido { background: #c62828; color: white; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }

/* ---- CONTENT AREA ---- */
.content-area {
    margin-left: 260px;
    padding: 25px;
    flex: 1;
    min-height: 100vh;
}
.page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--amarillo);
}
.page-header h2 { color: var(--azul); font-weight: 800; font-size: 1.5rem; }
.page-header p { color: var(--gris); font-size: 0.9rem; margin: 0; }

/* ---- CARDS ---- */
.card-em {
    background: var(--blanco);
    border-radius: var(--radius);
    box-shadow: var(--sombra);
    border: none;
    overflow: hidden;
}
.card-em .card-header-em {
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 100%);
    color: white;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1rem;
}
.card-em .card-body-em { padding: 20px; }

/* Stats cards */
.stat-card {
    background: var(--blanco);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--sombra);
    border-left: 5px solid var(--amarillo);
    display: flex;
    align-items: center;
    gap: 15px;
}
.stat-card.azul { border-left-color: var(--azul); }
.stat-card.verde { border-left-color: #2e7d32; }
.stat-card.rojo { border-left-color: #c62828; }
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    background: var(--amarillo);
    color: var(--azul-oscuro);
}
.stat-card.azul .stat-icon { background: rgba(21,101,192,0.12); color: var(--azul); }
.stat-card.verde .stat-icon { background: rgba(46,125,50,0.12); color: #2e7d32; }
.stat-card.rojo .stat-icon { background: rgba(198,40,40,0.12); color: #c62828; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--texto); line-height: 1; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--gris); font-weight: 600; margin-top: 2px; }

/* ---- TABLAS ---- */
.tabla-em { border-radius: var(--radius); overflow: hidden; box-shadow: var(--sombra); }
.tabla-em thead th {
    background: var(--azul);
    color: white;
    font-weight: 700;
    padding: 12px 14px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}
.tabla-em tbody tr { transition: background 0.15s; }
.tabla-em tbody tr:hover { background: rgba(21,101,192,0.04); }
.tabla-em tbody td { padding: 11px 14px; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; vertical-align: middle; }

/* Badges de estado */
.badge-pendiente { background: #FFF3CD; color: #856404; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-verificado { background: #D1E7DD; color: #0f5132; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-rechazado { background: #F8D7DA; color: #842029; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }

/* ---- ALERTS ---- */
.alert-em-success { background: #d4edda; border-left: 4px solid #28a745; color: #155724; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.alert-em-danger  { background: #f8d7da; border-left: 4px solid #dc3545; color: #721c24; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.alert-em-warning { background: #fff3cd; border-left: 4px solid #ffc107; color: #856404; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }
.alert-em-info    { background: #cce5ff; border-left: 4px solid #004085; color: #004085; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; }

/* Plan suspendido banner */
.plan-suspendido-banner {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

/* ---- UPLOAD ZONE ---- */
.upload-zone {
    border: 3px dashed var(--azul);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(21,101,192,0.03);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--amarillo);
    background: rgba(245,184,0,0.08);
}
.upload-zone i { font-size: 2.5rem; color: var(--azul); margin-bottom: 8px; }
.upload-zone p { color: var(--gris); margin: 0; font-size: 0.9rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .content-area { margin-left: 0; padding: 15px; }
    .sidebar-toggle {
        display: block !important;
        position: fixed;
        top: 15px; left: 15px;
        z-index: 1100;
        background: var(--azul);
        color: white;
        border: none;
        border-radius: 8px;
        width: 42px; height: 42px;
        font-size: 1.2rem;
        cursor: pointer;
    }
}
.sidebar-toggle { display: none; }
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.show { display: block; }
