:root {
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --purple-color: #9b59b6;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto !important;
}

main {
    flex: 1;
}

/* Boton y texto morado para dedicatoria */
.btn-outline-purple {
    color: var(--purple-color);
    border-color: var(--purple-color);
    background: transparent;
}

.btn-outline-purple:hover {
    color: #fff;
    background-color: var(--purple-color);
    border-color: var(--purple-color);
}

.text-purple {
    color: var(--purple-color) !important;
}

/* Navbar mejorado */
.navbar {
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Hero welcome */
.hero-welcome {
    position: relative;
    overflow: hidden;
}

.hero-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.feature-box {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo al pasar el mouse */
.feature-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(107, 140, 206, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.feature-box:hover::before {
    transform: scale(1);
}

.feature-box:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(107, 140, 206, 0.25);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
}

/* Efecto de giro sutil en el icono al hover */
.feature-box:hover i {
    transform: translateY(-8px) rotate(5deg) scale(1.1);
    transition: transform 0.3s ease;
}

/* Cards de servicios */
.service-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.service-card.selected {
    border-color: var(--primary-color);
    background-color: #e7f1ff;
}

.service-card .card-body {
    padding: 1.5rem;
}

.service-card .service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card .service-duration {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.service-card .service-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--success-color);
}

/* Box Terapéuticos */
.box-horarios {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.box-title {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.box-title small {
    font-weight: normal;
    margin-left: auto;
}

/* Grid de horarios */
.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 0.5rem;
}

.horario-slot {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #f8f9fa;
}

.horario-slot:hover {
    border-color: var(--primary-color);
    background-color: #e7f1ff;
}

.horario-slot.selected {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.horario-slot.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #e9ecef;
}

/* Mensaje de no disponible */
.no-horarios {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.no-horarios i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Confirmación */
.confirmacion-box {
    background-color: #e8f5e9;
    border: 2px solid var(--success-color);
    border-radius: 10px;
    padding: 2rem;
}

.confirmacion-box .codigo {
    font-size: 1.5rem;
    font-weight: bold;
    background-color: white;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    letter-spacing: 2px;
}

/* Detalles de reserva */
.detalle-reserva {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.detalle-reserva .label {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.detalle-reserva .value {
    font-weight: 500;
    margin-bottom: 1rem;
}

/* Estado de reservas */
.badge-estado {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
}

.estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.estado-confirmada {
    background-color: #d4edda;
    color: #155724;
}

.estado-cancelada {
    background-color: #f8d7da;
    color: #721c24;
}

.estado-completada {
    background-color: #cce5ff;
    color: #004085;
}

/* Animaciones */
.step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .horarios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    /* === MOBILE OPTIMIZATION === */
    /* Prevenir zoom automático en iOS y mejorar área táctil */
    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px !important; /* Evita zoom en iOS */
        padding: 14px 16px !important;
        border-radius: 12px !important;
        min-height: 48px; /* Área táctil mínima Apple HIG */
    }
    
    /* Botones optimizados para touch */
    button,
    .btn,
    a.btn {
        min-height: 48px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        padding: 12px 20px !important;
        border-radius: 12px !important;
    }
    
    /* Reducir animaciones para mejor rendimiento */
    *,
    *::before,
    *::after {
        animation-duration: 0.2s !important;
        transition-duration: 0.15s !important;
    }
    
    /* Scroll suave optimizado */
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Links y áreas clicables más grandes */
    a:not(.btn) {
        padding: 8px 4px;
        margin: -8px -4px;
    }
    
    /* Botones de acción en welcome - Siempre visibles en móvil */
    #section-welcome .d-grid {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    #section-welcome .btn {
        font-size: 16px !important;
        padding: 14px 20px !important;
        min-height: 54px;
    }
}

/* Admin styles */
.admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-card .stat-label {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

.table-reservas {
    border-radius: 10px;
    overflow: hidden;
}

.table-reservas th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.btn-action {
    padding: 5px 10px;
    font-size: 0.85rem;
}

/* Calendar styles */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background-color: #f8f9fa;
}

.calendar-day {
    text-align: center;
    padding: 10px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled) {
    background-color: #e7f1ff;
}

.calendar-day.today {
    font-weight: bold;
    border-color: var(--primary-color);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.has-reservas {
    position: relative;
}

.calendar-day.has-reservas::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--success-color);
    border-radius: 50%;
}

/* Cards de reservas del usuario */
.reserva-card {
    transition: all 0.2s ease;
    border-left: 4px solid var(--primary-color);
}

.reserva-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Estado de reservas en badges */
.badge-estado {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

.estado-pendiente {
    background-color: #ffc107;
    color: #000;
}

.estado-confirmada {
    background-color: #198754;
    color: #fff;
}

.estado-completada {
    background-color: #0d6efd;
    color: #fff;
}

.estado-cancelada {
    background-color: #dc3545;
    color: #fff;
}

/* Pantalla de carga para admin */
#loading-screen, #access-denied {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    z-index: 9999;
}

/* Selector de duración */
.duracion-selector {
    border: 1px solid #dee2e6;
}

.btn-duracion {
    background-color: #fff;
    border: 2px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-duracion:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: #e7f1ff;
}

.btn-duracion.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: #fff;
}

/* Botones principales mejorados */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    background: var(--gradient-primary);
}

/* Cards mejoradas */
.card {
    border: none;
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

.card-header.bg-primary {
    background: var(--gradient-primary) !important;
}

/* Footer links */
.footer a:hover {
    color: #fff !important;
    transition: color 0.3s ease;
}

/* Animación suave para modales */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
}

/* Tarjetas de tipo de consumo (solo lectura) */
.consumo-card {
    transition: all 0.3s ease;
    cursor: default;
}

.consumo-card.border-primary {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ============================================= */
/* CALENDARIO MENSUAL */
/* ============================================= */
.calendario-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.calendario-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.calendario-dia {
    background: white;
    min-height: 100px;
    padding: 5px;
    position: relative;
}

.calendario-dia.otro-mes {
    background: #f8f9fa;
    opacity: 0.5;
}

.calendario-dia.hoy {
    background: #e8f4fd;
    border: 2px solid #0d6efd;
}

.calendario-dia-numero {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.calendario-dia.hoy .calendario-dia-numero {
    color: #0d6efd;
}

.calendario-evento {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendario-evento.confirmada {
    background-color: #d4edda;
    color: #155724;
    border-left: 3px solid #28a745;
}

.calendario-evento.pendiente {
    background-color: #fff3cd;
    color: #856404;
    border-left: 3px solid #ffc107;
}

.calendario-evento.cancelada {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
    text-decoration: line-through;
}

/* ============================================= */
/* NOTIFICACIONES */
/* ============================================= */
.notificacion-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: background-color 0.2s;
}

.notificacion-item:hover {
    background-color: #f8f9fa;
}

.notificacion-item:last-child {
    border-bottom: none;
}

.notificacion-icono {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notificacion-icono.warning {
    background-color: #fff3cd;
    color: #856404;
}

.notificacion-icono.danger {
    background-color: #f8d7da;
    color: #721c24;
}

.notificacion-icono.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.notificacion-contenido {
    flex: 1;
}

.notificacion-titulo {
    font-weight: 600;
    margin-bottom: 2px;
}

.notificacion-mensaje {
    color: #666;
    font-size: 0.9rem;
}

/* ============================================= */
/* DASHBOARD */
/* ============================================= */
.dash-reserva-item {
    padding: 12px;
    border-radius: 8px;
    background-color: #f8f9fa;
    margin-bottom: 10px;
    border-left: 4px solid #28a745;
}

.dash-reserva-item .hora {
    font-weight: 600;
    color: #28a745;
}

.dash-reserva-item .box-badge {
    font-size: 0.75rem;
}

/* ============================================= */
/* BOX FAVORITO */
/* ============================================= */
.box-favorito-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.box-favorito-btn:hover {
    transform: scale(1.1);
}

.box-favorito-btn.favorito {
    color: #dc3545;
}

.box-favorito-btn.favorito i {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ============================================= */
/* NUEVA NAVEGACIÓN PREMIUM */
/* ============================================= */

/* === SIDEBAR LATERAL DESKTOP === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    background: var(--gradient-dark);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.app-sidebar.collapsed {
    width: 80px;
}

.app-sidebar-header {
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-sidebar .brand-logo {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.app-sidebar .brand-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}

.app-sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
}

/* User Profile Section */
.sidebar-user {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    transition: all 0.3s;
}

.sidebar-user-card:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
}

.sidebar-avatar .status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background: #10b981;
    border: 3px solid #1a1a2e;
    border-radius: 50%;
}

.sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.sidebar-user-role {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-sidebar.collapsed .sidebar-user-info {
    display: none;
}

/* Navigation Menu */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.nav-section-title {
    color: rgba(255,255,255,0.4);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 1rem 1rem 0.5rem;
    white-space: nowrap;
}

.app-sidebar.collapsed .nav-section-title {
    text-align: center;
    padding: 1rem 0.5rem 0.5rem;
}

.app-sidebar.collapsed .nav-section-title span {
    display: none;
}

.app-sidebar.collapsed .nav-section-title::after {
    content: '•••';
    display: block;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-nav-item.active {
    background: rgba(102, 126, 234, 0.15);
    color: white;
}

.sidebar-nav-item.active::before {
    transform: translateX(0);
}

.sidebar-nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.sidebar-nav-item:hover i {
    transform: scale(1.1);
}

.sidebar-nav-item span {
    white-space: nowrap;
    transition: opacity 0.2s;
}

.app-sidebar.collapsed .sidebar-nav-item span {
    opacity: 0;
    width: 0;
}

.app-sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
    padding: 0.875rem;
}

/* Badge de notificación */
.nav-badge {
    margin-left: auto;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
    min-width: 22px;
    text-align: center;
}

.app-sidebar.collapsed .nav-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    padding: 2px 5px;
    font-size: 0.6rem;
}

/* Hours indicator */
.sidebar-hours {
    padding: 1rem;
    margin: 0 0.75rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.sidebar-hours-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.sidebar-hours-value {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.sidebar-hours-value small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.7;
}

.app-sidebar.collapsed .sidebar-hours {
    padding: 0.75rem 0.5rem;
    margin: 0 0.5rem 0.5rem;
    text-align: center;
}

.app-sidebar.collapsed .sidebar-hours-label {
    display: none;
}

.app-sidebar.collapsed .sidebar-hours-value {
    font-size: 1.1rem;
    justify-content: center;
}

.app-sidebar.collapsed .sidebar-hours-value small {
    display: none;
}

/* Collapse button */
.sidebar-toggle {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 10px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-toggle-btn i {
    transition: transform 0.3s;
}

.app-sidebar.collapsed .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.app-sidebar.collapsed .sidebar-toggle-btn span {
    display: none;
}

/* Main Content */
.app-main {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-sidebar.collapsed ~ .app-main {
    margin-left: 80px;
}

/* Top Bar */
.app-topbar {
    background: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

.app-topbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-topbar-title i {
    color: var(--primary-color);
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 1.1rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.topbar-btn:hover {
    background: #e5e7eb;
    color: var(--primary-color);
}

.topbar-btn .badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-user:hover {
    background: #e5e7eb;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.topbar-user-info {
    line-height: 1.2;
}

.topbar-user-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: #1f2937;
}

/* App Content */
.app-content {
    flex: 1;
    padding: 1.5rem;
    background: #f5f7fa;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* === MOBILE BOTTOM NAV === */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    z-index: 1040;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.5rem 1rem;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s;
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.4rem;
    transition: transform 0.2s;
}

.mobile-nav-item span {
    font-size: 0.65rem;
    font-weight: 500;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

.mobile-nav-item .mobile-badge {
    position: absolute;
    top: 2px;
    right: 8px;
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Center FAB */
.mobile-nav-fab {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-top: -28px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    border: 4px solid white;
    transition: all 0.2s;
}

.mobile-nav-fab:hover,
.mobile-nav-fab:active {
    transform: scale(1.05);
    color: white;
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.show {
    opacity: 1;
}

/* Quick Actions Floating Menu */
.quick-actions {
    position: fixed;
    bottom: 100px;
    right: 1.5rem;
    z-index: 1030;
}

.quick-actions-btn {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.quick-actions-btn:hover {
    transform: scale(1.05);
}

.quick-actions-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.quick-actions.open .quick-actions-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quick-actions.open .quick-actions-btn {
    transform: rotate(45deg);
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.quick-action-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.quick-action-item i {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px !important;
    }
    
    .app-sidebar.mobile-show {
        transform: translateX(0);
    }
    
    .app-main {
        margin-left: 0 !important;
        padding-bottom: 80px;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .quick-actions {
        bottom: 90px;
    }
    
    .app-topbar-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .app-content {
        padding: 1rem;
    }
    
    .topbar-user-info {
        display: none;
    }
    
    .hero-welcome {
        padding: 2rem 1rem !important;
    }
    
    .hero-welcome h1 {
        font-size: 1.75rem;
    }
    
    .feature-box {
        margin-bottom: 0.5rem;
    }
    
    .calendario-container {
        font-size: 0.8rem;
    }
    
    .calendario-dia {
        min-height: 60px;
    }
    
    .calendario-evento {
        font-size: 0.6rem;
    }
}

/* Animaciones de entrada para secciones */
.section-enter {
    animation: sectionEnter 0.4s ease forwards;
}

@keyframes sectionEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 8px;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton variants */
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.shorter { width: 40%; }

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
}

/* Loading shimmer on buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    left: 50%;
    top: 50%;
    margin-left: -0.6em;
    margin-top: -0.6em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for notifications */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bounce animation */
.bounce {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Ripple effect for buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Glow effect on focus */
.glow-focus:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

[data-theme="dark"] .glow-focus:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4);
}

/* Card press effect */
.press-effect {
    transition: transform 0.1s ease;
}

.press-effect:active {
    transform: scale(0.98);
}

/* Floating animation for FAB */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Success check animation */
.check-animation {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.5s ease-out forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* Gradient text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass card effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================= */
/* DEDICATORIA ESPECIAL - MODAL */
/* ============================================= */
.dedicatoria-modal-content {
    background: linear-gradient(145deg, #fff5f8 0%, #fef3f7 50%, #fff9fb 100%);
    border: none;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(102, 126, 234, 0.3);
}

.dedicatoria-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 2.5rem 2rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dedicatoria-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.dedicatoria-hearts {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.dedicatoria-hearts i {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    animation: floatHeart 3s ease-in-out infinite;
}

.heart-1 {
    top: 20%;
    left: 15%;
    font-size: 1.2rem;
    animation-delay: 0s;
}

.heart-2 {
    top: 30%;
    right: 20%;
    font-size: 0.9rem;
    animation-delay: 0.5s;
}

.heart-3 {
    bottom: 25%;
    left: 25%;
    font-size: 1rem;
    animation-delay: 1s;
}

@keyframes floatHeart {
    0%, 100% { transform: translateY(0) rotate(-5deg); opacity: 0.6; }
    50% { transform: translateY(-10px) rotate(5deg); opacity: 1; }
}

.dedicatoria-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: pulseIcon 2s ease-in-out infinite;
}

.dedicatoria-icon i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); }
    50% { transform: scale(1.05); box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3); }
}

.dedicatoria-body {
    padding: 2rem 2.5rem;
    text-align: center;
}

.dedicatoria-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1.5rem;
    position: relative;
}

.dedicatoria-titulo::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.dedicatoria-texto {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
    font-style: italic;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(240, 147, 251, 0.05) 100%);
    border-radius: 16px;
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, #667eea, #f093fb) 1;
    margin-bottom: 1.5rem;
    position: relative;
}

.dedicatoria-texto::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 4rem;
    color: rgba(102, 126, 234, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
}

.dedicatoria-firma {
    margin-top: 1rem;
}

.dedicatoria-firma span {
    display: block;
    font-size: 0.9rem;
    color: #718096;
}

.dedicatoria-firma strong {
    display: block;
    font-size: 1.1rem;
    color: #667eea;
    margin-top: 0.25rem;
}

.dedicatoria-footer {
    padding: 0 2rem 2rem;
    text-align: center;
}

.btn-dedicatoria {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.btn-dedicatoria:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-dedicatoria i {
    margin-right: 0.5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
}

/* Estilo para página de bienvenida sin sidebar */
body.welcome-page .app-sidebar,
body.welcome-page .mobile-nav,
body.welcome-page .app-topbar,
body.welcome-page .quick-actions {
    display: none !important;
}

body.welcome-page .app-main {
    margin-left: 0 !important;
    padding-bottom: 0 !important;
}

/* Página de bienvenida estilizada - Diseño terapéutico */
body.welcome-page {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 50%, #bcccdc 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Patrón sutil de fondo con animación */
body.welcome-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
    pointer-events: none;
    animation: patternFloat 15s ease-in-out infinite;
}

@keyframes patternFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -10px); }
}

body.welcome-page .app-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Sección de bienvenida */
#section-welcome {
    min-height: 100vh;
    width: 100%;
}

/* ============================================
   ANIMACIONES DE ENTRADA ESPECTACULARES
============================================ */

/* Animación de la tarjeta principal */
#section-welcome .card {
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animación del hero con efecto de onda */
#section-welcome .hero-welcome {
    animation: heroGradient 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Animación del icono principal con pulsación */
#section-welcome .hero-icon i {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 6px 20px rgba(0,0,0,0.15));
    }
    50% { 
        transform: scale(1.05);
        filter: drop-shadow(0 8px 30px rgba(255,255,255,0.3));
    }
}

/* Animación de fade-in escalonada para las tarjetas */
#section-welcome .feature-box:nth-child(1) {
    animation: featureSlideIn 0.6s ease-out 0.3s both;
}

#section-welcome .feature-box:nth-child(2) {
    animation: featureSlideIn 0.6s ease-out 0.5s both;
}

#section-welcome .feature-box:nth-child(3) {
    animation: featureSlideIn 0.6s ease-out 0.7s both;
}

@keyframes featureSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de brillo en las decoraciones del hero */
#section-welcome .hero-welcome > div[style*="radial-gradient"] {
    animation: decorationFloat 6s ease-in-out infinite;
}

#section-welcome .hero-welcome > div[style*="radial-gradient"]:first-of-type {
    animation-delay: 0s;
}

#section-welcome .hero-welcome > div[style*="radial-gradient"]:last-of-type {
    animation-delay: 3s;
}

@keyframes decorationFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-20px, -20px) scale(1.1);
        opacity: 0.8;
    }
}

/* Animación de los iconos dentro de las tarjetas */
#section-welcome .feature-box i {
    animation: iconFloat 3s ease-in-out infinite;
}

#section-welcome .feature-box:nth-child(1) i { animation-delay: 0s; }
#section-welcome .feature-box:nth-child(2) i { animation-delay: 1s; }
#section-welcome .feature-box:nth-child(3) i { animation-delay: 2s; }

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Efecto de partículas brillantes */
#section-welcome .hero-welcome::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 200px 200px, 150px 150px, 180px 180px;
    animation: particleMove 20s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

@keyframes particleMove {
    0% { background-position: 0 0, 50px 50px, 25px 25px; }
    100% { background-position: 200px 200px, 250px 250px, 225px 225px; }
}

/* Animación de los botones principales */
#section-welcome button,
#section-welcome a.btn {
    animation: buttonEntrance 0.5s ease-out 0.9s both;
    position: relative;
    overflow: hidden;
}

@keyframes buttonEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de brillo en hover de botones */
#section-welcome button::before,
#section-welcome a.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

#section-welcome button:hover::before,
#section-welcome a.btn:hover::before {
    left: 100%;
}

/* Efecto hover mejorado para botones */
#section-welcome button:hover,
#section-welcome a.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(107, 140, 206, 0.4);
}

#section-welcome button:active,
#section-welcome a.btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Mejoras de accesibilidad */
.sidebar-nav-item:focus,
.mobile-nav-item:focus,
.quick-action-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animación de hover para cards */
.card.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Tooltip personalizado */
.tooltip-custom {
    position: relative;
}

.tooltip-custom::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 0.5rem 0.75rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
}

.tooltip-custom:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Estilo glassmorphism para cards especiales */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Gradientes adicionales */
.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* Scrollbar personalizada para contenido */
.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Pulse animation para elementos importantes */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

/* Badge para elementos nuevos */
.badge-new::after {
    content: 'Nuevo';
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 0.6rem;
    padding: 2px 6px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    font-weight: 600;
}

/* Estado de carga para botones */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================= */
/* COMMAND PALETTE / BÚSQUEDA GLOBAL */
/* ============================================= */
.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    animation: fadeIn 0.15s ease;
}

.command-palette {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    z-index: 2001;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

[data-theme="dark"] .command-palette {
    background: #1e293b;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.command-palette-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="dark"] .command-palette-header {
    border-bottom-color: #334155;
}

.command-palette-header i {
    color: #9ca3af;
    font-size: 1.1rem;
}

.command-palette-header input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: inherit;
}

.command-palette-header input::placeholder {
    color: #9ca3af;
}

.command-palette-header kbd {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

[data-theme="dark"] .command-palette-header kbd {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

.command-palette-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-group {
    margin-bottom: 0.5rem;
}

.command-group-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    padding: 0.5rem 0.75rem;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.command-item:hover,
.command-item.selected {
    background: #f3f4f6;
}

[data-theme="dark"] .command-item:hover,
[data-theme="dark"] .command-item.selected {
    background: #334155;
}

.command-item i {
    width: 24px;
    text-align: center;
    color: #6b7280;
}

.command-item span:first-of-type {
    flex: 1;
}

.command-shortcut {
    background: #e5e7eb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b7280;
}

[data-theme="dark"] .command-shortcut {
    background: #475569;
    color: #94a3b8;
}

.command-palette-footer {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 0.75rem;
    color: #9ca3af;
}

[data-theme="dark"] .command-palette-footer {
    background: #0f172a;
    border-top-color: #334155;
}

.command-palette-footer kbd {
    background: #e5e7eb;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    margin-right: 0.25rem;
}

/* ============================================= */
/* ONBOARDING TOUR */
/* ============================================= */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 3000;
}

.onboarding-spotlight {
    position: absolute;
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    transition: all 0.4s ease;
    pointer-events: none;
}

.onboarding-tooltip {
    position: absolute;
    width: 320px;
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 3001;
    animation: tooltipPop 0.3s ease;
}

@keyframes tooltipPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.onboarding-step {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.onboarding-tooltip h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.onboarding-tooltip p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.onboarding-actions {
    display: flex;
    justify-content: space-between;
}

/* ============================================= */
/* TOAST NOTIFICATIONS */
/* ============================================= */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    transform-origin: right center;
}

[data-theme="dark"] .toast-notification {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-notification.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.toast-icon.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.toast-icon.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.toast-icon.info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.toast-message {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
}

[data-theme="dark"] .toast-message {
    color: #94a3b8;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1rem;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #374151;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ============================================= */
/* PROGRESS RING (Sidebar) */
/* ============================================= */
.sidebar-progress {
    padding: 1rem;
    margin: 0 0.75rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-ring-container {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transition: stroke-dashoffset 1s ease;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-ring-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.progress-ring-label {
    display: block;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.progress-info {
    flex: 1;
    min-width: 0;
}

.progress-title {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.progress-bar-mini {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 1s ease;
}

.app-sidebar.collapsed .sidebar-progress {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    margin: 0 0.5rem 0.5rem;
}

.app-sidebar.collapsed .progress-ring-container {
    width: 50px;
    height: 50px;
}

.app-sidebar.collapsed .progress-ring {
    width: 50px;
    height: 50px;
}

.app-sidebar.collapsed .progress-ring circle {
    cx: 25;
    cy: 25;
    r: 20;
}

.app-sidebar.collapsed .progress-ring-value {
    font-size: 0.9rem;
}

.app-sidebar.collapsed .progress-info {
    display: none;
}

/* ============================================= */
/* THEME TOGGLE & DARK MODE */
/* ============================================= */
.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
}

[data-theme="dark"] body {
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .app-content {
    background: var(--bg-primary);
}

[data-theme="dark"] .app-topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .card-header {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

[data-theme="dark"] .table {
    color: var(--text-primary);
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-header {
    border-color: var(--border-color);
}

[data-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* ============================================= */
/* SEARCH TRIGGER BUTTON */
/* ============================================= */
.search-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 280px;
}

.search-trigger:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

[data-theme="dark"] .search-trigger {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .search-trigger:hover {
    background: #334155;
}

.search-trigger i {
    font-size: 0.9rem;
}

.search-trigger span {
    flex: 1;
    text-align: left;
}

.search-trigger kbd {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.7rem;
    border: 1px solid #e5e7eb;
}

[data-theme="dark"] .search-trigger kbd {
    background: #0f172a;
    border-color: #475569;
}

/* ============================================= */
/* TOPBAR IMPROVEMENTS */
/* ============================================= */
.app-topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 2rem;
}

.topbar-chevron {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-left: 0.25rem;
    transition: transform 0.2s;
}

.topbar-user.show .topbar-chevron {
    transform: rotate(180deg);
}

.topbar-avatar-lg {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.dropdown-menu-animated {
    animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item kbd {
    background: #f3f4f6;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
}

[data-theme="dark"] .dropdown-item kbd {
    background: #334155;
}

/* ============================================= */
/* NAV ITEM INDICATOR */
/* ============================================= */
.nav-item-indicator {
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s;
}

.sidebar-nav-item:hover .nav-item-indicator {
    background: rgba(255, 255, 255, 0.3);
}

.sidebar-nav-item.active .nav-item-indicator {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* ============================================= */
/* SIDEBAR USER ARROW */
/* ============================================= */
.sidebar-user-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    transition: all 0.2s;
}

.sidebar-user-card:hover .sidebar-user-arrow {
    color: rgba(255, 255, 255, 0.6);
    transform: translateX(3px);
}

.app-sidebar.collapsed .sidebar-user-arrow {
    display: none;
}

/* ============================================= */
/* ANIMATIONS */
/* ============================================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

.animate-bounce-in {
    animation: bounceIn 0.4s ease;
}

/* Ripple effect on buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 10.01%);
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.btn-ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Confetti for celebrations */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    z-index: 5000;
    pointer-events: none;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================= */
/* DASHBOARD PREMIUM WIDGETS */
/* ============================================= */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-greeting h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1f2937;
}

[data-theme="dark"] .dashboard-greeting h2 {
    color: #f1f5f9;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: height 0.3s ease;
}

.stat-card:hover::before {
    height: 6px;
}

.stat-card-primary::before { background: var(--gradient-primary); }
.stat-card-success::before { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card-info::before { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.stat-card-secondary::before { background: linear-gradient(135deg, #6b7280, #4b5563); }

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-primary .stat-card-icon {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
}

.stat-card-success .stat-card-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.stat-card-info .stat-card-icon {
    background: rgba(6, 182, 212, 0.12);
    color: #06b6d4;
}

.stat-card-secondary .stat-card-icon {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

[data-theme="dark"] .stat-card-value {
    color: #f1f5f9;
}

.stat-card-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card-trend {
    font-size: 1.2rem;
    font-weight: 600;
}

.stat-card-trend.up { color: #10b981; }
.stat-card-trend.down { color: #ef4444; }

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-action-card {
    background: white;
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

[data-theme="dark"] .quick-action-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin: 0 auto 0.75rem;
    transition: transform 0.3s;
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1);
}

.quick-action-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
}

[data-theme="dark"] .quick-action-card span {
    color: var(--text-secondary);
}

/* Card Hover Effect */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Timeline style for reservas */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 1rem;
    border-left: 2px solid #e5e7eb;
    margin-left: 0.5rem;
}

[data-theme="dark"] .timeline-item {
    border-left-color: var(--border-color);
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item.completed::before {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981;
}

.timeline-time {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}

[data-theme="dark"] .timeline-time {
    color: #f1f5f9;
}

.timeline-content {
    margin-top: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* Greeting based on time */
.greeting-emoji {
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

/* ============================================
   ESTILOS MEJORADOS PARA MODAL DE LOGIN
============================================ */

/* Animación de entrada del modal */
.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Efectos de hover en inputs */
#loginModal .form-control:focus,
#registerModal .form-control:focus {
    border-color: #6b8cce !important;
    box-shadow: 0 0 0 0.25rem rgba(107, 140, 206, 0.15) !important;
}

#loginModal .input-group:focus-within,
#registerModal .input-group:focus-within {
    box-shadow: 0 4px 15px rgba(107, 140, 206, 0.2) !important;
}

/* Efecto hover en botón de login */
#loginModal button[type="submit"]:hover,
#registerModal button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 140, 206, 0.4) !important;
}

#loginModal button[type="submit"]:active,
#registerModal button[type="submit"]:active {
    transform: translateY(0);
}

/* Animación sutil en los iconos de input */
#loginModal .input-group-text i,
#registerModal .input-group-text i {
    transition: all 0.3s ease;
}

#loginModal .input-group:focus-within .input-group-text i,
#registerModal .input-group:focus-within .input-group-text i {
    transform: scale(1.1);
}

/* Overlay del modal con blur */
.modal-backdrop.show {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Botón de mostrar/ocultar contraseña */
#toggleLoginPassword,
#toggleRegisterPassword {
    transition: all 0.3s ease;
}

#toggleLoginPassword:hover,
#toggleRegisterPassword:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
}

#toggleLoginPassword:hover i,
#toggleRegisterPassword:hover i {
    color: #6b8cce !important;
    transform: scale(1.1);
}

#toggleLoginPassword:active,
#toggleRegisterPassword:active {
    transform: scale(0.95);
}

/* ============================================
   RESPONSIVE - OPTIMIZACIÓN MÓVIL
============================================ */

/* Tablets y pantallas medianas */
@media (max-width: 992px) {
    #section-welcome .hero-welcome h1 {
        font-size: 2rem !important;
    }
    
    #section-welcome .hero-welcome p {
        font-size: 1rem !important;
    }
    
    #section-welcome .hero-icon i {
        font-size: 3.5rem !important;
    }
}

/* Móviles - Optimización completa */
@media (max-width: 768px) {
    /* Permitir scroll en móviles */
    body.welcome-page {
        overflow-y: auto !important;
        min-height: 100vh;
    }
    
    /* Quitar min-height fijo que bloquea el scroll */
    #section-welcome {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    /* Ajustar padding general */
    body.welcome-page .app-content {
        padding: 1rem !important;
        min-height: auto !important;
        display: block !important;
    }
    
    /* Tarjeta principal más compacta */
    #section-welcome .card {
        border-radius: 16px !important;
    }
    
    /* Hero más compacto */
    #section-welcome .hero-welcome {
        padding: 2.5rem 1.5rem !important;
    }
    
    #section-welcome .hero-icon {
        margin-bottom: 1rem !important;
    }
    
    #section-welcome .hero-icon i {
        font-size: 3rem !important;
    }
    
    #section-welcome .hero-welcome h1 {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #section-welcome .hero-welcome p {
        font-size: 0.95rem !important;
    }
    
    /* Contenido interno */
    #section-welcome .p-5 {
        padding: 2rem 1.5rem !important;
    }
    
    #section-welcome .text-center.mb-5 {
        margin-bottom: 2rem !important;
    }
    
    #section-welcome .text-center.mb-5 h4 {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    #section-welcome .text-center.mb-5 p {
        font-size: 0.95rem !important;
    }
    
    /* Tarjetas de características */
    #section-welcome .row.g-4 {
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    #section-welcome .feature-box {
        padding: 1.5rem 1rem !important;
    }
    
    #section-welcome .feature-box i {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #section-welcome .feature-box h6 {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    #section-welcome .feature-box small {
        font-size: 0.85rem !important;
    }
    
    /* Botones más compactos */
    #section-welcome .btn-lg {
        padding: 0.65rem 2rem !important;
        font-size: 0.95rem !important;
    }
    
    #section-welcome .d-flex.gap-3 {
        gap: 0.75rem !important;
    }
    
    /* Decoraciones del hero - ocultar en móvil */
    #section-welcome .hero-welcome > div[style*="radial-gradient"] {
        display: none !important;
    }
    
    /* Modal de login responsivo */
    #loginModal .modal-body,
    #registerModal .modal-body {
        padding: 1.5rem !important;
    }
    
    #loginModal .modal-header,
    #registerModal .modal-header {
        padding: 1.5rem !important;
    }
    
    #loginModal .modal-title,
    #registerModal .modal-title {
        font-size: 1.1rem !important;
    }
    
    #loginModal .form-control,
    #registerModal .form-control {
        font-size: 0.95rem !important;
        padding: 0.65rem !important;
    }
    
    #loginModal .btn[type="submit"],
    #registerModal .btn[type="submit"] {
        padding: 0.75rem !important;
        font-size: 1rem !important;
    }
}

/* Móviles pequeños */
@media (max-width: 576px) {
    /* Asegurar scroll funcional */
    #section-welcome {
        min-height: auto !important;
        padding: 1rem 0 !important;
    }
    
    body.welcome-page .app-content {
        min-height: auto !important;
    }
    
    /* Hero aún más compacto */
    #section-welcome .hero-welcome {
        padding: 2rem 1rem !important;
    }
    
    #section-welcome .hero-welcome h1 {
        font-size: 1.5rem !important;
    }
    
    #section-welcome .hero-welcome p {
        font-size: 0.9rem !important;
    }
    
    #section-welcome .hero-icon i {
        font-size: 2.5rem !important;
    }
    
    /* Contenido */
    #section-welcome .p-5 {
        padding: 1.5rem 1rem !important;
    }
    
    #section-welcome .text-center.mb-5 h4 {
        font-size: 1.1rem !important;
    }
    
    #section-welcome .text-center.mb-5 p {
        font-size: 0.9rem !important;
    }
    
    /* Tarjetas en columna */
    #section-welcome .feature-box {
        padding: 1.25rem 1rem !important;
    }
    
    #section-welcome .feature-box i {
        font-size: 1.75rem !important;
    }
    
    #section-welcome .feature-box h6 {
        font-size: 0.9rem !important;
    }
    
    #section-welcome .feature-box small {
        font-size: 0.8rem !important;
    }
    
    /* Botones apilados */
    #section-welcome .btn-lg {
        width: 100%;
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    #section-welcome .d-flex.flex-wrap {
        flex-direction: column !important;
    }
    
    /* Modal ocupando más espacio */
    .modal-dialog {
        margin: 0.5rem !important;
    }
    
    #loginModal .modal-content,
    #registerModal .modal-content {
        border-radius: 16px !important;
    }
}

/* Modo landscape en móviles */
@media (max-width: 896px) and (orientation: landscape) {
    #section-welcome {
        min-height: auto !important;
    }
    
    #section-welcome .hero-welcome {
        padding: 1.5rem 1rem !important;
    }
    
    #section-welcome .p-5 {
        padding: 1.5rem !important;
    }
    
    #section-welcome .row.g-4 {
        margin-bottom: 1.5rem !important;
    }
}
/* ========================================== */
/* ESTILOS PARA COMPRA DE PACKS */
/* ========================================== */

/* Tarjetas de packs responsive */
@media (max-width: 768px) {
    #section-comprar-packs .card {
        margin-bottom: 1.5rem;
    }
    
    #section-comprar-packs .card-header h3 {
        font-size: 2rem !important;
    }
    
    #section-comprar-packs .display-6 {
        font-size: 1.75rem !important;
    }
    
    #section-comprar-packs ul {
        font-size: 0.85rem !important;
    }
    
    /* Alert de tipo de consumo */
    #alert-tipo-consumo {
        font-size: 0.9rem;
        padding: 1rem !important;
    }
    
    #alert-tipo-consumo i {
        font-size: 1.5rem !important;
    }
    
    /* Botones de compra */
    #section-comprar-packs .btn-primary {
        font-size: 16px !important;
        padding: 14px 20px !important;
        min-height: 52px !important;
    }
    
    /* Información adicional */
    #section-comprar-packs .card-body.p-4 {
        padding: 1.25rem !important;
    }
    
    /* Números de pasos */
    #section-comprar-packs .rounded-circle {
        min-width: 28px !important;
        width: 28px !important;
        height: 28px !important;
        font-size: 0.85rem !important;
    }
}

/* Animación de entrada para tarjetas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#packs-container .card {
    animation: fadeInUp 0.4s ease forwards;
}

#packs-container .card:nth-child(1) { animation-delay: 0.1s; }
#packs-container .card:nth-child(2) { animation-delay: 0.2s; }
#packs-container .card:nth-child(3) { animation-delay: 0.3s; }
#packs-container .card:nth-child(4) { animation-delay: 0.4s; }

/* === FIX SCROLL GLOBAL === */
/* Asegurar que siempre haya scroll disponible */
html {
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

html, body {
    height: auto !important;
    min-height: 100vh;
}

/* Fix para cuando modal deja overflow:hidden */
body:not(.modal-open) {
    overflow-y: auto !important;
}

/* Secciones deben permitir scroll */
section[id^="section-"] {
    overflow-y: auto;
    overflow-x: hidden;
}