/* =========================================
   1. Variables - PALETA AMARILLA/DORADA
   ========================================= */

:root {
    /* Paleta Amarilla/Dorada/Blanca/Gris */
    --bg-primary: #ffffff;
    /* Blanco puro */
    --bg-secondary: #faf8f3;
    /* Crema muy claro */
    --bg-tertiary: #f5f1e8;
    /* Crema dorado claro */
    --bg-card: #ffffff;
    /* Blanco tarjetas */
    --bg-dark: #2d2d2d;
    /* Gris oscuro Binance */
    --bg-darker: #1e1e1e;
    /* Gris casi negro */

    /* Amarillos y Dorados */
    --gold-primary: #f0b90b;
    /* Dorado Binance */
    --gold-secondary: #fcd535;
    /* Amarillo dorado */
    --gold-light: #fff3cd;
    /* Amarillo muy claro */
    --gold-dark: #e9a801;
    /* Dorado oscuro */

    /* Grises */
    --gray-light: #f8f9fa;
    /* Gris muy claro */
    --gray-medium: #6c757d;
    /* Gris medio */
    --gray-dark: #343a40;
    /* Gris oscuro */

    /* Textos */
    --text-primary: #2d2d2d;
    /* Texto principal gris oscuro */
    --text-secondary: #5a5a5a;
    /* Texto secundario */
    --text-muted: #8a8a8a;
    /* Texto apagado */
    --text-white: #ffffff;
    /* Texto blanco */

    /* Sombras */
    --shadow: 0 2px 8px rgba(240, 185, 11, 0.15);
    --shadow-lg: 0 8px 25px rgba(240, 185, 11, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100vh;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =========================================
   2. Header Dorado Estilo App Binance
   ========================================= */

.header {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    height: 64px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Logo - Solo imagen más grande */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 8px 0;
}

.logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

/* Navegación Desktop */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    height: 100%;
}

.nav-links a {
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-info span:first-child {
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-white);
    border-radius: 1px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* =========================================
   4. Hero Section
   ========================================= */

.hero {
    padding: 6rem 0 3rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    margin-top: 64px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.slogan {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   5. Botones Dorados
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    outline: none;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--text-white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--gold-primary);
    border: 2px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: var(--gold-primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

/* =========================================
   6. Formularios
   ========================================= */

.form-container {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    margin: 2rem auto;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--gold-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1);
}

/* =========================================
   7. Dashboard App Style
   ========================================= */

.dashboard {
    padding: 1rem 0 2rem;
    min-height: calc(100vh - 64px);
    margin-top: 64px;
    background: var(--bg-secondary);
}

.dashboard h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Stats Cards App */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 0.25rem;
}

/* Quick Actions App */
.quick-actions {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.quick-actions h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* =========================================
   8. Tablas App Style
   ========================================= */

.table-container {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table thead th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* =========================================
   9. Estados Dorados
   ========================================= */

.estado-verificado {
    background: var(--gold-primary);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.estado-pendiente {
    background: var(--gray-medium);
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.estado-rechazado {
    background: #dc3545;
    color: var(--text-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

/* =========================================
   10. Footer
   ========================================= */

.footer {
    background: var(--bg-dark);
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.875rem;
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

/* =========================================
   11. Responsive Perfecto - App Style
   ========================================= */

/* Tablet */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 64px);
        background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
        flex-direction: column;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        gap: 1rem;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        height: 48px;
        padding: 0 1rem;
    }

    .user-info {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .slogan {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .actions-grid {
        grid-template-columns: 1fr 1fr;
    }

    .container {
        padding: 0 12px;
    }
}

/* Móvil */
@media (max-width: 480px) {
    .navbar {
        padding: 0 12px;
    }

    .logo img {
        height: 40px;
    }

    .hero {
        padding: 4rem 0 2rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .nav-links {
        width: 100%;
    }
}

/* Overlay para menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.menu-overlay.active {
    display: block;
}

/* =========================================
   12. Utilidades App
   ========================================= */

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold-primary);
}

.bg-gold {
    background: var(--gold-primary);
}

.rounded {
    border-radius: 12px;
}

.shadow {
    box-shadow: var(--shadow);
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Ocultar scrollbar en móvil */
@media (max-width: 768px) {
    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* =========================================
   13. Estilos para Logo Grande (500x250)
   ========================================= */

.logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 4px 0;
}

.logo img {
    height: 56px;
    /* Ajustado para header de 64px */
    width: auto;
    max-width: 140px;
    /* Proporción de 500x250 */
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo:hover img {
    transform: scale(1.03);
}

/* Responsive para logo */
@media (max-width: 768px) {
    .logo img {
        height: 48px;
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 44px;
        max-width: 110px;
    }
}

/* =========================================
   14. Estilos App Binance Adicionales
   ========================================= */

/* Botones estilo app */
.btn-app {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Cards estilo app */
.card-app {
    border-radius: 12px;
    background: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

/* Header app sticky */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Contenido con padding top para header fijo */
.main-content {
    padding-top: 64px;
    min-height: 100vh;
}

/* Animaciones suaves */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Mejoras para dispositivos táctiles */
@media (hover: none) and (pointer: coarse) {
    .btn:active {
        transform: scale(0.98);
    }

    .nav-links a:active {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Optimización para iOS */
@supports (-webkit-touch-callout: none) {
    .header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Estilos mejorados para forms y cards */
.form-container {
    background: var(--bg-card);
    border: 1px solid var(--gold-secondary);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(240, 185, 11, 0.2);
}

.form-control {
    border-radius: 12px;
    border: 1px solid var(--gold-light);
    padding: 0.9rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.9rem 2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

.rifa-info {
    background: var(--bg-card);
    border-left: 5px solid var(--gold-primary);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

/* =========================================
   PALETA DE COLORES MEJORADA - DORADO ELEGANTE
   ========================================= */
:root {
    /* Colores base */
    --white: #ffffff;
    --black: #000000;

    /* Escala de grises sofisticada */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Paleta dorada premium */
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    /* Dorado principal */
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-800: #92400e;
    --gold-900: #78350f;

    /* Colores semánticos */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Aplicación */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-card: var(--white);
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-500);
    --border: var(--gray-200);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-gold: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
}

/* =========================================
   HEADER MEJORADO
   ========================================= */
.header {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================================
   COMPONENTES MEJORADOS
   ========================================= */
.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* Botones premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1.25;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--white);
    box-shadow: var(--shadow-gold);
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--gold-600);
    border: 1px solid var(--gold-200);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    border-color: var(--gold-500);
    color: var(--gold-700);
    background: var(--gold-50);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    color: var(--gray-900);
    border-color: var(--gray-400);
}

.btn-success {
    background: #10b981;
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-error {
    background: #ef4444;
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.btn-error:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* =========================================
   HEADER MEJORADO CON BOTÓN DE RETROCESO
   ========================================= */
.header {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    padding: 0;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    height: 70px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Botón de retroceso */
.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

/* Logo container mejorado */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navegación Desktop Mejorada */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 45px;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-links .logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links .logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info span:first-child {
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: capitalize;
}

/* =========================================
   INDEX.PHP OPTIMIZADO - SIN SCROLL
   ========================================= */
.hero {
    padding: 4rem 0 2rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;

    font-weight: 800;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    background-color: white;
}

.slogan {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Secciones compactas */
.info-section,
.featured-raffles,
.stats-section {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.info-section h2,
.featured-raffles h2,
.stats-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--gold-100), var(--gold-200));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: var(--gold-600);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Rifas destacadas compactas */
.raffles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.raffle-highlight {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s ease;
}

.raffle-highlight:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.raffle-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.raffle-highlight h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.raffle-highlight p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.raffle-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Estadísticas compactas */
.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* =========================================
   FORMULARIOS MEJORADOS
   ========================================= */
.form-container {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-600));
}

.form-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-control:hover {
    border-color: var(--gray-300);
}

/* Alertas mejoradas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Checkboxes mejorados */
.form-group label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    accent-color: var(--gold-500);
}

/* Grid para formularios de dos columnas */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* =========================================
   RESPONSIVE MEJORADO
   ========================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }

    .brand-text {
        font-size: 1.25rem;
    }

    .logo img {
        height: 40px;
        max-width: 120px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .slogan {
        font-size: 1.2rem;
    }

    .features-grid,
    .raffles-grid,
    .stats-grid-compact {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
        flex-direction: column;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        gap: 1rem;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        height: 50px;
        padding: 0 1rem;
    }

    .user-info {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 1rem;
        min-height: 70vh;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
}

/* =========================================
   HEADER MEJORADO - CORREGIDO
   ========================================= */
.header {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    padding: 0;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 70px;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Botón de retroceso */
.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 1rem;
    flex-shrink: 0;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

.back-button .icon {
    font-size: 24px;
}

/* Logo container mejorado */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    border-radius: 8px;
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navegación Desktop Mejorada */
.nav-links {
    display: flex;
    list-style: none;
    gap: 1rem;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 45px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-links .logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links .logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-left: 1rem;
}

.user-info span:first-child {
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: capitalize;
}

/* Overlay para menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.menu-overlay.active {
    display: block;
}

/* =========================================
   RESPONSIVE - HEADER
   ========================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }

    .brand-text {
        font-size: 1.25rem;
    }

    .logo img {
        height: 40px;
        max-width: 120px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
        flex-direction: column;
        padding: 2rem 1.5rem;
        transition: left 0.3s ease;
        gap: 1rem;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        width: 100%;
        justify-content: flex-start;
        height: 50px;
        padding: 0 1rem;
    }

    .user-info {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        width: 100%;
        align-items: flex-start;
        margin-left: 0;
    }

    .back-button {
        margin-right: 0.5rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }

    .brand-text {
        font-size: 1.1rem;
    }

    .logo img {
        height: 35px;
        max-width: 100px;
    }

    .nav-links {
        width: 100%;
    }
}

/* =========================================
   15. Intl Tel Input Customization
   ========================================= */
.iti {
    width: 100%;
    display: block;
    margin-bottom: 0.5rem;
}

.iti__country-list {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    /* Force full width of container */
    max-width: 100% !important;
    max-height: 250px;
    overflow-y: scroll !important;
    /* Always show vertical scrollbar */
    overflow-x: hidden !important;
    /* Hide horizontal scrollbar */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    white-space: normal !important;
    background-color: white;
    z-index: 100;

    /* Scrollbar Style */
    scrollbar-width: auto;
    scrollbar-color: var(--gold-primary) #f0f0f0;
}

/* Scrollbar Customization */
.iti__country-list::-webkit-scrollbar {
    width: 16px;
    /* Thick and visible */
}

.iti__country-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0 8px 8px 0;
    border-left: 1px solid #e5e5e5;
}

.iti__country-list::-webkit-scrollbar-thumb {
    background-color: var(--gold-primary);
    border-radius: 8px;
    border: 4px solid #f0f0f0;
    /* Inner border for floating effect */
}

.iti__country-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--gold-dark);
}

.iti__country {
    padding: 10px 15px;
    border-bottom: 1px solid #f9f9f9;
}

.iti input.form-control {
    padding-left: 90px !important;
    padding-right: 12px !important;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    height: 50px;
    width: 100%;
}

.iti__selected-flag {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    background-color: transparent !important;
}

.iti__selected-flag:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}