/* Reset y Variables CSS Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-rgb: 99, 102, 241;
    --secondary-color: #06b6d4;
    --secondary-rgb: 6, 182, 212;
    --tertiary-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --danger-rgb: 239, 68, 68;
    --success-color: #10b981;
    --success-rgb: 16, 185, 129;
    --success-dark: #059669;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-color: #1f2937;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px;
}

/* Header Styles */
.header {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 1rem;
}

.user-info i {
    color: var(--primary-color);
}

/* Navigation Styles */
.navigation {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 1rem;
    display: block;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Main Content */
.main-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.page-title {
    margin-bottom: 40px;
}

.page-title h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Common Utilities */
.text-center {
    text-align: center;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success {
    background: #d1fae5 !important;
    border-color: var(--tertiary-color) !important;
}

.error {
    background: #fee2e2 !important;
    border-color: var(--danger-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 20px;
    }
}

/* Botón Moderno de Cerrar Sesión */
.modern-logout-btn {
    margin-left: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.modern-logout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.modern-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
    background: linear-gradient(135deg, #e55a67 0%, #d63447 100%);
}

.modern-logout-btn:hover::before {
    left: 100%;
}

.modern-logout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.modern-logout-btn i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.modern-logout-btn:hover i {
    transform: translateX(2px);
}

.modern-logout-btn span {
    font-weight: 600;
}

/* Responsive para el botón */
@media (max-width: 768px) {
    .modern-logout-btn {
        margin-left: 10px;
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .modern-logout-btn span {
        display: none;
    }
    
    .modern-logout-btn {
        border-radius: 50%;
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
}

/* ========== NOTIFICACIONES GLOBALES ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    animation: notificationSlideIn 0.3s ease-out forwards;
    margin-bottom: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 18px;
    min-width: 18px;
}

.notification-content span {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    margin-left: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.1);
}

/* Tipos de notificaciones */
.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 4px solid #34d399;
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 4px solid #f87171;
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left: 4px solid #fbbf24;
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-left: 4px solid #60a5fa;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
        animation: notificationSlideInMobile 0.3s ease-out forwards;
    }
    
    @keyframes notificationSlideInMobile {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}
