/* ============================================
   AJUPAM PAGER - ESTILOS PRINCIPALES
   Sistema de Notificaciones de Canchas
   ============================================ */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Colores principales - Mejorados para WCAG AA */
    --primary-blue: #0056b3;
    --primary-blue-light: #0066CC;
    --primary-blue-dark: #004085;
    --neon-yellow: #FFD700;
    --tennis-yellow: #CCFF00;
    --tennis-yellow-dark: #b8e600;
    --dark-gray: #1a1a1a;
    --medium-gray: #555555;
    --light-gray: #F8F9FA;
    --white: #FFFFFF;
    --error: #D32F2F;
    --success: #388E3C;
    --warning: #F57C00;
    --info: #0288D1;

    /* Colores de borde */
    --border-color: #DEE2E6;
    --border-color-dark: #CED4DA;

    /* Overlays */
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --overlay-light: rgba(255, 255, 255, 0.95);

    /* Sombras mejoradas */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.12);

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* Tipografía */
    --font-display: 'Nunito', sans-serif;
    --font-body: 'Poppins', sans-serif;

    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 2000;
    --z-modal: 2010;
    --z-popover: 2020;
    --z-tooltip: 2030;
    --z-toast: 2040;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-gray);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Asegurar que los iconos Font Awesome se renderizan correctamente */
i.fas, i.far, i.fal, i.fad, i.fab,
.fas, .far, .fal, .fad, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-weight: 900 !important;  /* Solid icons weight */
    display: inline-block !important;
    line-height: 1 !important;
}

i.far, .far {
    font-weight: 400 !important;  /* Regular icons weight */
}

i.fab, .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Asegurar que los íconos en botones se vean bien */
.btn i.fas, .btn i.far, .btn i.fab,
.btn .fas, .btn .far, .btn .fab {
    margin-right: 0.5rem;
    vertical-align: middle;
}

.btn i.fas:only-child, .btn i.far:only-child, .btn i.fab:only-child,
.btn .fas:only-child, .btn .far:only-child, .btn .fab:only-child {
    margin-right: 0;
}

/* Fix específico para botones del admin */
.admin-header .btn i,
.admin-actions .btn i,
#logout-btn i,
#broadcast-btn i,
#add-court-btn i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    margin-right: 0 !important;
    display: inline-block !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ============================================
   UTILIDADES
   ============================================ */
.hidden {
    display: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 35px;
    width: auto;
    filter: brightness(0) invert(1); /* Convierte el logo a blanco */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions .btn-link {
    color: var(--white);
    font-weight: 600;
}

.header-actions .btn-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.notifications-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.notifications-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notifications-btn:active {
    transform: scale(0.95);
}

.notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ============================================
   SISTEMA DE BOTONES UNIFICADO
   ============================================ */
/* Base para todos los botones */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning,
.btn-success,
.btn-link {
    font-family: var(--font-body);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Botón primario */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 86, 179, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Botón secundario */
.btn-secondary {
    background: var(--white);
    color: var(--dark-gray);
    border-color: var(--border-color-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--light-gray);
    border-color: var(--medium-gray);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Botón danger */
.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #B71C1C 100%);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #B71C1C 0%, var(--error) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Botón warning */
.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #E65100 100%);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(245, 124, 0, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #E65100 0%, var(--warning) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-warning:active {
    transform: translateY(0);
}

/* Botón success */
.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #2E7D32 100%);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(56, 142, 60, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #2E7D32 0%, var(--success) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 142, 60, 0.3);
}

/* Botón link */
.btn-link {
    background: transparent;
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border: none;
    box-shadow: none;
}

.btn-link:hover {
    background: rgba(0, 86, 179, 0.05);
    color: var(--primary-blue-dark);
}

/* Modificadores */
.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* Botones con icono */
.btn-icon,
.btn-icon-small {
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-icon {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
}

.btn-icon i {
    margin-right: 0 !important;
}

.btn-icon-small {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LOADING (for loading screens, not buttons)
   ============================================ */
div.loading {
    text-align: center;
    padding: 3rem;
    color: var(--medium-gray);
}

div.loading i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: block;
}

/* ============================================
   AUTH VIEW
   ============================================ */
.auth-view {
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.auth-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--medium-gray);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

/* ============================================
   USER VIEW
   ============================================ */
.user-view {
    padding: 2rem 0;
    padding-bottom: calc(80px + 2rem); /* Height of bottom nav + spacing */
    display: grid;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.welcome-card h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.welcome-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.bulk-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Courts Container - Similar to external-links-section */
.courts-container {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.courts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.courts-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.courts-bulk-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Courts List - Grid Layout */
.courts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.court-card {
    background: linear-gradient(135deg, var(--tennis-yellow) 0%, var(--tennis-yellow-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.court-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.court-card.disabled {
    opacity: 0.6;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

.court-header {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.court-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark-gray);
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Estados de canchas */
.court-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.court-card.court-libre {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.court-card.court-ocupada {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.court-card.court-esperando {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.court-card.court-libre .court-header h3,
.court-card.court-ocupada .court-header h3,
.court-card.court-esperando .court-header h3 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.court-card.court-libre .court-status-badge,
.court-card.court-ocupada .court-status-badge,
.court-card.court-esperando .court-status-badge {
    color: white;
}

.court-category {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.court-time {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .courts-container {
        padding: 1.5rem;
    }

    .courts-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .courts-header h3 {
        font-size: 1.3rem;
    }

    .courts-bulk-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .courts-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .court-header h3 {
        font-size: 1.3rem;
    }
}

.court-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
}

.status-available {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-unavailable {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
}

.status-disabled {
    background: rgba(0, 0, 0, 0.05);
    color: var(--medium-gray);
}

.court-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

/* ============================================
   BANNERS PUBLICITARIOS
   ============================================ */
.banners-section {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.banner-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.banner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.banner-content {
    position: relative;
    z-index: 2;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--white);
}

.banner-content h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.banner-btn {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.banner-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   ENLACES EXTERNOS
   ============================================ */
.external-links-section {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.external-links-section > h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
}

.external-links-section > h3 i {
    margin-right: 0.5rem;
}

.links-category {
    margin-bottom: 2rem;
}

.links-category:last-child {
    margin-bottom: 0;
}

.links-category h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.links-category h4 i {
    margin-right: 0.5rem;
    color: var(--primary-blue);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.link-card i {
    font-size: 2rem;
}

.link-card span {
    font-weight: 600;
    font-size: 1rem;
}

.link-card-fem {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
}

.link-card-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.link-card-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* Responsive para enlaces */
@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .banner-content h3 {
        font-size: 1.5rem;
    }

    .banner-content p {
        font-size: 0.95rem;
    }

    .external-links-section {
        padding: 1.5rem;
    }
}

.subscription-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subscription-toggle span {
    font-weight: 600;
    color: var(--dark-gray);
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: var(--radius-full);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--primary-blue);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle input:disabled + .toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Subscriptions Section */
.subscriptions-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.subscriptions-section h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subscriptions-list {
    display: grid;
    gap: 0.75rem;
}

.subscription-item {
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 500;
}

.subscription-item i {
    font-size: 1.2rem;
}

.empty-state {
    text-align: center;
    color: var(--medium-gray);
    padding: 2rem;
}

/* ============================================
   ADMIN VIEW
   ============================================ */
.admin-view {
    display: grid;
    gap: 2rem;
    padding: 2rem 0;
    padding-bottom: calc(80px + 2rem); /* Height of bottom nav + spacing */
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.admin-header h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin: 0;
}

/* Admin Courts */
.admin-courts-section {
    margin: 2rem 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-courts-list {
    display: grid;
    gap: 1rem;
}

/* Admin Courts Table */
.table-responsive {
    overflow-x: auto;
    margin-top: 1rem;
}

.courts-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.courts-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
}

.courts-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.courts-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}

.courts-table tbody tr:hover {
    background: var(--gray-50);
}

.courts-table tbody tr:last-child {
    border-bottom: none;
}

.courts-table td {
    padding: 1rem;
    vertical-align: middle;
}

.courts-table td.loading-cell {
    text-align: center;
    padding: 2rem;
}

.courts-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.courts-table .court-name {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1rem;
}

.courts-table .subscribers-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--gray-700);
}

.courts-table .subscribers-count i {
    color: var(--primary-blue);
}

.courts-table .status-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.courts-table .status-badge.available {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.courts-table .status-badge.unavailable {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.courts-table .table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.courts-table .table-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Dropdown menu */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-color);
    transition: background 0.2s ease;
}

.dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dropdown-item i {
    width: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .courts-table {
        font-size: 0.875rem;
    }

    .courts-table th,
    .courts-table td {
        padding: 0.75rem 0.5rem;
    }

    .courts-table .table-actions {
        flex-direction: column;
    }

    .courts-table .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

.admin-court-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 2px solid var(--border-color);
    border-left: 5px solid var(--primary-blue);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.admin-court-card:hover {
    box-shadow: var(--shadow-md);
    border-left-color: var(--primary-blue-dark);
}

.admin-court-card.disabled {
    opacity: 0.65;
    border-left-color: var(--medium-gray);
    background: var(--light-gray);
}

.admin-court-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-court-header h4 {
    font-size: 1.375rem;
    color: var(--dark-gray);
    margin: 0;
    font-weight: 700;
    flex: 1;
}

.court-badge {
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.badge-success {
    background: linear-gradient(135deg, var(--success) 0%, #2E7D32 100%);
    color: var(--white);
}

.badge-disabled {
    background: linear-gradient(135deg, var(--medium-gray) 0%, #757575 100%);
    color: var(--white);
}

.admin-court-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-gray);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    padding: 0.75rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.admin-court-stats i {
    color: var(--primary-blue);
    font-size: 1.125rem;
}

.admin-court-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.75rem;
    border-top: 2px solid var(--border-color);
}

/* Statistics */
.stats-section {
    margin: 2rem 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.stats-section h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-card i {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   ADMIN CONFIGURATION SECTION
   ============================================ */
.config-section {
    margin: 2rem 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.config-section > h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
    text-align: center;
}

.config-section > h3 i {
    margin-right: 0.5rem;
}

.config-card {
    background: var(--background);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-blue);
}

.config-card:last-child {
    margin-bottom: 0;
}

.config-card h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.config-card h4 i {
    margin-right: 0.5rem;
    color: var(--primary-blue);
}

.config-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-input {
    padding: 0.75rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: var(--font-body);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder {
    color: var(--medium-gray);
    opacity: 0.7;
}

.config-form .btn {
    margin-top: 0.5rem;
    align-self: flex-start;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Estilos antiguos de modal removidos - ahora están en MODALES MODERNOS más abajo */

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    text-align: center;
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--neon-yellow);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer a:hover {
    text-decoration: underline;
}

.footer-version {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .welcome-card {
        padding: 2rem 1rem;
    }
    
    .welcome-card h2 {
        font-size: 2rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
    }
    
    .court-header {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .court-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-court-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-court-actions {
        width: 100%;
    }
    
    .admin-court-actions button {
        flex: 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .footer,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-link,
    .modal-overlay,
    .toast-container {
        display: none !important;
    }

    body {
        background: white;
    }

    .container {
        max-width: 100%;
    }
}

/* ============================================
   MODALES MODERNOS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-modal-backdrop);
    animation: fadeIn 0.2s ease;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal-dialog {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: var(--z-modal);
    border: 1px solid var(--border-color);
}

.modal-dialog-sm {
    max-width: 420px;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h3 i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 1.75rem 1.5rem;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-body p {
    margin-bottom: 1.25rem;
    color: var(--dark-gray);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.modal-body p strong {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Form groups en modales */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.modal-input,
.modal-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
    background: var(--white);
    color: var(--dark-gray);
}

.modal-input:hover,
.modal-textarea:hover {
    border-color: var(--border-color-dark);
}

.modal-input:focus,
.modal-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
}

.modal-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--light-gray);
}

.modal-footer .btn {
    min-width: 100px;
}

/* Animaciones para modales */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive modales */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        max-width: none;
    }

    .modal-body {
        padding: 1.5rem 1rem;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
        min-width: unset;
    }
}


/* ============================================
   ANIMACIONES Y FEEDBACK VISUAL
   ============================================ */

/* Loading state en botones */
.btn.loading {
    position: relative;
    pointer-events: none;
    overflow: hidden;
    /* Maintain button size during loading */
    min-width: fit-content;
    width: auto;
    white-space: nowrap;
}

/* Icon-only buttons maintain fixed size */
.btn-icon.loading,
.btn-icon-small.loading {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
}

.btn.loading > * {
    /* Keep content visible during loading */
    opacity: 0.6;
    /* Prevent text from collapsing */
    display: inline-block;
    visibility: visible;
}

/* Rotating border effect at bottom */
.btn.loading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 25%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 75%,
        transparent 100%
    );
    animation: btnSlideProgress 1.2s ease-in-out infinite;
}

@keyframes btnSlideProgress {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Animación de éxito al suscribirse */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-subscribe.success-animation {
    animation: successPulse 0.4s ease;
}

/* Animación de entrada de cards */
.court-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.court-card:nth-child(1) {
    animation-delay: 0.05s;
}

.court-card:nth-child(2) {
    animation-delay: 0.1s;
}

.court-card:nth-child(3) {
    animation-delay: 0.15s;
}

.court-card:nth-child(4) {
    animation-delay: 0.2s;
}

.court-card:nth-child(5) {
    animation-delay: 0.25s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover mejorado en cards */
.court-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.court-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Admin cards hover */
.admin-court-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-court-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   MODAL PWA INSTALACIÓN
   ============================================ */
.pwa-install-dialog {
    max-width: 450px;
}

.pwa-install-content {
    padding: 2rem;
    text-align: center;
}

.pwa-install-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

.pwa-install-icon img {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
}

.pwa-install-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.pwa-install-description {
    color: var(--medium-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.pwa-install-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--radius-md);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.feature-item span {
    font-size: 0.875rem;
    color: var(--dark-gray);
    font-weight: 500;
}

.pwa-install-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pwa-install-actions .btn-link {
    background: none;
    border: none;
    color: var(--medium-gray);
    padding: 0.5rem;
    font-size: 0.9rem;
    text-decoration: none;
}

.pwa-install-actions .btn-link:hover {
    color: var(--dark-gray);
    text-decoration: underline;
}

/* Responsive PWA modal */
@media (max-width: 768px) {
    .pwa-install-content {
        padding: 1.5rem;
    }

    .pwa-install-features {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .feature-item {
        flex-direction: row;
        justify-content: center;
    }
}

/* ============================================
   PANEL DE NOTIFICACIONES
   ============================================ */
.notifications-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notifications-panel.open {
    transform: translateX(0);
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0052a3 100%);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.notifications-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.notifications-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Variante para header de notificaciones (fondo oscuro) */
.notifications-header .btn-icon-small {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.notifications-header .btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--medium-gray);
    gap: 1rem;
}

.notifications-empty i {
    font-size: 3rem;
    opacity: 0.3;
}

.notifications-empty p {
    font-size: 1.1rem;
    opacity: 0.6;
}

.notification-item {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.notification-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.notification-item.unread {
    background: #f0f7ff;
    border-left: 4px solid var(--primary-blue);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.notification-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-gray);
    flex: 1;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--medium-gray);
    white-space: nowrap;
}

.notification-item-body {
    font-size: 0.9rem;
    color: var(--medium-gray);
    line-height: 1.4;
}

.notification-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.notification-item-actions button {
    font-size: 0.8rem;
    padding: 0.4rem 0.75rem;
}

/* Responsive notifications panel */
@media (max-width: 768px) {
    .notifications-panel {
        width: 100%;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .notifications-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.content-section {
    display: block;
    position: relative;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateX(0);
    opacity: 1;
}

.content-section.hidden {
    display: none;
}

.content-section.slide-out-left {
    animation: slideOutLeft 0.3s ease-out forwards;
}

.content-section.slide-out-right {
    animation: slideOutRight 0.3s ease-out forwards;
}

.content-section.slide-in-left {
    animation: slideInLeft 0.3s ease-out forwards;
}

.content-section.slide-in-right {
    animation: slideInRight 0.3s ease-out forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.75rem 0.5rem;
    padding-bottom: max(env(safe-area-inset-bottom), 1rem);
}

.mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: var(--radius-md);
    gap: 0.25rem;
}

.nav-tab i {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.nav-tab.active {
    color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.1);
}

.nav-tab:hover {
    background: var(--gray-100);
}

.nav-tab.active:hover {
    background: rgba(0, 102, 204, 0.15);
}

/* Show mobile nav only on mobile devices */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: grid;
    }

    /* Add padding to user-view to account for bottom nav */
    .user-view {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    }
}

/* Hide mobile nav in admin view */
#admin-view .mobile-bottom-nav {
    display: none;
}

/* ============================================
   ADMIN BOTTOM NAVIGATION
   ============================================ */
.admin-content-section {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.admin-content-section.hidden {
    display: none;
}

.admin-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.admin-nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border-radius: var(--radius-md);
    gap: 0.25rem;
}

.admin-nav-tab i {
    font-size: 1.25rem;
    margin-bottom: 0.125rem;
}

.admin-nav-tab.active {
    color: var(--primary-blue);
    background: rgba(0, 102, 204, 0.1);
}

.admin-nav-tab:hover {
    background: var(--gray-100);
}

.admin-nav-tab.active:hover {
    background: rgba(0, 102, 204, 0.15);
}

/* Add padding to admin-view to account for bottom nav */
.admin-view {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

/* ============================================
   BANNER ZONES (One per section)
   ============================================ */
.banner-zone {
    margin: 2rem 0;
}

.banner-zone .banner-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-zone .banner-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.banner-zone .banner-content {
    text-align: center;
    color: var(--white);
    padding: 2rem;
    z-index: 1;
    max-width: 600px;
}

.banner-zone .banner-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-zone .banner-btn {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    padding: 0.875rem 2rem;
}