/* assets/css/styles.css */

/* ============================================
   VARIABLES Y CONFIGURACIÓN BASE
   ============================================ */
:root {
    /* Colores Principales - Tema iPODAT (Azul y Naranja) */
    --primary: #ff8800;
    /* Naranja más brillante y contrastante */
    --primary-dark: #cc6d00;
    /* Naranja oscuro para hover */
    --primary-light: #ffaa4d;
    /* Naranja claro */

    --secondary: #1a44a0;
    /* Azul secundario más vibrante */
    --secondary-dark: #0f2c6e;

    --accent: #ff8800;
    /* Acento naranja */

    /* Colores de Estado */
    --success: #10b981;
    --success-light: #34d399;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --danger: #ef4444;
    --danger-light: #f87171;
    --info: #3b82f6;
    --info-light: #60a5fa;

    /* Colores Neutros y Fondos */
    --dark: #030b2e;
    /* Azul muy oscuro (Fondo Principal) */
    --dark-light: #0a1640;
    /* Azul ligeramente más claro (Cards/Sidebar) */

    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #ff7b00 0%, #ff9500 100%);
    --gradient-secondary: linear-gradient(135deg, #030b2e 0%, #0a1640 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(135deg, #0a1640 0%, #030b2e 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* Efectos de Neón (Adaptados a naranja/azul) */
    --neon-primary: 0 0 20px rgba(255, 123, 0, 0.5), 0 0 40px rgba(255, 123, 0, 0.3);
    --neon-secondary: 0 0 20px rgba(10, 36, 114, 0.5), 0 0 40px rgba(10, 36, 114, 0.3);
    --neon-success: 0 0 20px rgba(16, 185, 129, 0.5), 0 0 40px rgba(16, 185, 129, 0.3);

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

    /* Bordes */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition: 300ms ease;
    --transition-slow: 500ms ease;

    /* Tipografía */
    --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Poppins', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Espaciado */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
}

/* ============================================
   RESET Y BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--dark);
    color: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Fondo animado futurista */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.login-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        conic-gradient(from 0deg at 50% 50%,
            transparent 0deg,
            rgba(99, 102, 241, 0.03) 60deg,
            transparent 120deg);
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Partículas flotantes */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    animation: float 15s infinite;
    opacity: 0.5;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 6s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 8s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 10s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 12s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 14s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 16s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
}

.login-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    padding: 5px;
    box-shadow: var(--neon-primary);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: var(--neon-primary);
    }

    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.8), 0 0 60px rgba(99, 102, 241, 0.4);
    }
}

.login-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-title h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-title p {
    color: var(--gray-400);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.login-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.form-group .input-wrapper {
    position: relative;
}

.form-group .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    transition: var(--transition);
}

.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input::placeholder {
    color: var(--gray-500);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-group input:focus+.input-icon,
.form-group input:focus~.input-icon {
    color: var(--primary);
}

/* Estilos globales para select y opciones */
select,
.form-group select {
    width: 100%;
    padding: 1rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

select:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

select option,
.form-group select option {
    background: #1e293b;
    color: white;
    padding: 12px;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 0.875rem;
    color: var(--gray-400);
    cursor: pointer;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-light);
}

.forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::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: var(--transition-slow);
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-primary);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.current-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary);
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, var(--dark-light) 0%, var(--dark) 100%);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
    box-shadow: var(--neon-primary);
}

.sidebar-brand {
    overflow: hidden;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
}

.sidebar-brand h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
}

.sidebar-brand span {
    font-size: 0.75rem;
    color: var(--gray-400);
    display: block;
}

.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 10;
}

.sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-section-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
}

.sidebar.collapsed .nav-section-title {
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.nav-item {
    margin: 0.25rem 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--white);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--neon-primary);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--white);
    border-radius: var(--radius-full);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-text {
    white-space: nowrap;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
}

.nav-badge {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 2px 5px;
    font-size: 0.6rem;
}

/* Submenú */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item.open .nav-submenu {
    max-height: 500px;
}

.nav-submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

.nav-arrow {
    margin-left: auto;
    transition: var(--transition);
}

.nav-item.open .nav-arrow {
    transform: rotate(180deg);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--white);
    flex-shrink: 0;
}

.user-info {
    overflow: hidden;
    flex: 1;
}

.sidebar.collapsed .user-info {
    display: none;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--white);
    /* Cambiado a blanco para mejor visibilidad */
    opacity: 0.8;
}

.user-menu-toggle {
    color: var(--gray-400);
    transition: var(--transition);
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

.sidebar.collapsed+.main-content,
.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
}

/* Header Principal */
.main-header {
    height: var(--header-height);
    background: var(--dark);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    -webkit-tap-highlight-color: rgba(255, 123, 0, 0.3);
    touch-action: manipulation;
}

.menu-toggle:hover,
.menu-toggle:active {
    background: var(--primary);
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.breadcrumb a,
.breadcrumb span {
    font-size: 0.85rem;
    color: var(--gray-400);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb .separator {
    color: var(--gray-600);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Búsqueda Global */
.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input::placeholder {
    color: var(--gray-500);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.search-box .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

.search-box .search-shortcut {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Iconos de Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.header-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.header-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--dark);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ============================================
   ÁREA DE CONTENIDO
   ============================================ */
.content-area {
    padding: 2rem;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-welcome {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.dashboard-welcome::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
}

.welcome-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.meta-item i {
    font-size: 1rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.stat-card.success::before {
    background: var(--gradient-success);
}

.stat-card.warning::before {
    background: linear-gradient(180deg, var(--warning), var(--accent));
}

.stat-card.info::before {
    background: var(--gradient-secondary);
}

.stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-light);
}

.stat-card.success .stat-icon {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-light);
}

.stat-card.warning .stat-icon {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-light);
}

.stat-card.info .stat-icon {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.stat-trend.down {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

.stat-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-link {
    font-size: 0.85rem;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-link:hover {
    color: var(--primary);
}

/* ============================================
   CARDS Y PANELES
   ============================================ */
.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title i {
    color: var(--primary-light);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   TABLAS
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--gray-200);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

.data-table .student-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.student-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
}

.student-info h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
}

.student-info span {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-light);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-light);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-light);
}

.badge-info {
    background: rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

.badge-gray {
    background: rgba(107, 114, 128, 0.2);
    color: var(--gray-400);
}

/* Acciones de tabla */
.table-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action-btn.view {
    background: rgba(59, 130, 246, 0.2);
    color: var(--info);
}

.action-btn.edit {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-btn.view:hover {
    background: var(--info);
    color: var(--white);
}

.action-btn.edit:hover {
    background: var(--warning);
    color: var(--white);
}

.action-btn.delete:hover {
    background: var(--danger);
    color: var(--white);
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.form-group label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-control.error {
    border-color: var(--danger);
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Password Toggle */
.input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--primary);
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-primary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-300);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-success);
}

.btn-danger {
    background: var(--gradient-danger);
    color: var(--white);
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   MODALES
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   ALERTAS Y NOTIFICACIONES
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success-light);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-light);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning-light);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info-light);
}

.alert i {
    font-size: 1.25rem;
}

.alert span {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 300px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================
   HORARIO SEMANAL
   ============================================ */
.schedule-grid {
    display: grid;
    grid-template-columns: 100px repeat(5, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.schedule-header {
    background: rgba(99, 102, 241, 0.2);
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--primary-light);
}

.schedule-time {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-400);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.schedule-cell {
    background: rgba(30, 41, 59, 0.6);
    padding: 0.75rem;
    min-height: 80px;
}

.schedule-cell.break {
    background: rgba(245, 158, 11, 0.1);
}

.schedule-cell.lunch {
    background: rgba(16, 185, 129, 0.1);
}

.schedule-class {
    background: var(--gradient-primary);
    border-radius: var(--radius);
    padding: 0.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.schedule-class.informatica {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.schedule-class.administrativa {
    background: linear-gradient(135deg, #10b981, #059669);
}

.schedule-class.alojamiento {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.schedule-class .subject {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
}

.schedule-class .teacher {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
}

.schedule-class .room {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: auto;
}

/* ============================================
   GRÁFICOS Y ESTADÍSTICAS
   ============================================ */
.chart-container {
    position: relative;
    height: 300px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-300);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Progress Bars */
.progress-group {
    margin-bottom: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.progress-label span:first-child {
    color: var(--gray-300);
}

.progress-label span:last-child {
    color: var(--primary-light);
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 1s ease;
}

.progress-fill.success {
    background: var(--gradient-success);
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning), var(--accent));
}

.progress-fill.danger {
    background: var(--gradient-danger);
}

/* ============================================
   CALENDARIO
   ============================================ */
.calendar {
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav button:hover {
    background: var(--primary);
    color: var(--white);
}

.calendar-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.calendar-day-name {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    background: rgba(0, 0, 0, 0.2);
}

.calendar-day {
    padding: 0.75rem;
    min-height: 80px;
    background: rgba(30, 41, 59, 0.8);
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background: rgba(99, 102, 241, 0.1);
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.2);
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-300);
    margin-bottom: 0.5rem;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-event {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-event.academic {
    background: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.day-event.cultural {
    background: rgba(168, 85, 247, 0.3);
    color: #c4b5fd;
}

.day-event.holiday {
    background: rgba(239, 68, 68, 0.3);
    color: var(--danger-light);
}

/* ============================================
   PERFILES Y AVATARES
   ============================================ */
.profile-card {
    text-align: center;
    padding: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: var(--neon-primary);
}

.profile-avatar .status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--success);
    border: 3px solid var(--dark);
    border-radius: 50%;
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.profile-role {
    color: var(--primary-light);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   BOOTSTRAP OVERRIDES - TEMA OSCURO
   ============================================ */

/* Tablas Bootstrap */
.table {
    width: 100%;
    color: var(--gray-200);
    border-collapse: collapse;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-300);
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid rgba(255, 123, 0, 0.3);
}

.table td {
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--gray-200);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table-hover tbody tr:hover {
    background: rgba(255, 123, 0, 0.1);
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

/* Badges Bootstrap */
.badge-success {
    background: rgba(16, 185, 129, 0.25) !important;
    color: var(--success-light) !important;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.25) !important;
    color: var(--warning-light) !important;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.25) !important;
    color: var(--danger-light) !important;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.badge-primary {
    background: rgba(255, 123, 0, 0.25) !important;
    color: var(--primary-light) !important;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

/* Botones pequeños */
.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
}

.btn-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gray-200);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Modal Bootstrap Override */
.modal-content {
    background: var(--dark-light) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--gray-100);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    color: var(--white);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.close {
    color: var(--gray-400);
    text-shadow: none;
    opacity: 0.8;
}

.close:hover {
    color: var(--white);
    opacity: 1;
}

/* Form Controls en Modal */
.modal .form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: var(--radius-md);
}

.modal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.modal label {
    color: var(--gray-300);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Container Fluid */
.container-fluid {
    padding: 0;
}

/* Row y Col */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-lg-4,
.col-lg-8,
.col-md-6 {
    padding: 0 0.75rem;
}

.col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-lg-8 {
    flex: 0 0 66.666%;
    max-width: 66.666%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 992px) {

    .col-lg-4,
    .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Shadow */
.shadow {
    box-shadow: var(--shadow-lg) !important;
}

/* Margin y Padding Bootstrap */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.m-0 {
    margin: 0 !important;
}

/* Text utilities */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-muted {
    color: var(--gray-400) !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.font-italic {
    font-style: italic !important;
}

/* Flex utilities */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

/* Custom file input */
.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(2.5rem + 4px);
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(2.5rem + 4px);
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.5;
}

.custom-file-label::after {
    content: "Examinar";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Alert Bootstrap */
.alert-success {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    color: var(--success-light) !important;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: var(--danger-light) !important;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: var(--info-light) !important;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

/* Botón block */
.btn-block {
    display: block;
    width: 100%;
}

/* Botón lg */
.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.btn-success {
    background: var(--gradient-success) !important;
    border: none !important;
    color: var(--white) !important;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--neon-success);
}

.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: none !important;
    color: var(--white) !important;
}

/* Textarea */
textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Hr */
hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
}

/* ============================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Overlay para móvil cuando sidebar está abierto */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   PANTALLAS EXTRA GRANDES (1920px+)
   ============================================ */
@media (min-width: 1920px) {
    :root {
        --sidebar-width: 320px;
    }

    html {
        font-size: 18px;
    }

    .content-area {
        padding: 3rem;
        max-width: 1800px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .page-title {
        font-size: 2rem;
    }
}

/* ============================================
   LAPTOPS GRANDES (1440px - 1919px)
   ============================================ */
@media (max-width: 1440px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .content-area {
        padding: 1.5rem;
    }
}

/* ============================================
   LAPTOPS ESTÁNDAR (1024px - 1279px)
   ============================================ */
@media (max-width: 1280px) {
    :root {
        --sidebar-width: 260px;
    }

    .search-box {
        width: 250px;
    }

    .header-right {
        gap: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* ============================================
   TABLETS Y LAPTOPS PEQUEÑAS (768px - 1023px)
   ============================================ */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
        --header-height: 60px;
    }

    /* Sidebar colapsado por defecto en tablet */
    .sidebar {
        width: var(--sidebar-width);
    }

    .sidebar .nav-text,
    .sidebar .sidebar-brand,
    .sidebar .nav-section-title,
    .sidebar .user-info {
        display: none;
    }

    .sidebar .nav-link {
        justify-content: center;
        padding: 1rem;
    }

    .sidebar .nav-badge {
        position: absolute;
        top: 5px;
        right: 5px;
        padding: 2px 5px;
        font-size: 0.6rem;
    }

    .sidebar-header {
        justify-content: center;
        padding: 1rem;
    }

    .main-content {
        margin-left: 80px;
    }

    .main-header {
        padding: 0 1.5rem;
    }

    .search-box {
        width: 200px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .content-area {
        padding: 1.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .welcome-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Tablas responsivas */
    .data-table th,
    .data-table td {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   MÓVILES Y TABLETS VERTICALES (481px - 767px)
   ============================================ */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    /* Sidebar oculto por defecto, se muestra como overlay */
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        z-index: 1001;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar.mobile-open .nav-text,
    .sidebar.mobile-open .sidebar-brand,
    .sidebar.mobile-open .nav-section-title,
    .sidebar.mobile-open .user-info {
        display: block;
    }

    .sidebar.mobile-open .nav-link {
        justify-content: flex-start;
        padding: 0.875rem 1rem;
    }

    .sidebar-overlay {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    /* Header móvil */
    .main-header {
        padding: 0 1rem;
        height: 56px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .search-box {
        display: none;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .header-btn {
        width: 40px;
        height: 40px;
    }

    .page-title {
        font-size: 1.1rem;
    }

    .breadcrumb {
        display: none;
    }

    /* Contenido */
    .content-area {
        padding: 1rem;
    }

    /* Dashboard welcome */
    .dashboard-welcome {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .welcome-content h1 {
        font-size: 1.25rem;
    }

    .welcome-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Tablas responsivas - scroll horizontal */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 0.625rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Formularios */
    .form-row {
        flex-direction: column;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Modales */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-content {
        padding: 1.25rem;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Botones */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
    }

    /* Login */
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-title h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   MÓVILES PEQUEÑOS (max 480px)
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .sidebar {
        width: 100%;
    }

    /* Header extra compacto */
    .main-header {
        padding: 0 0.75rem;
    }

    .page-title {
        font-size: 1rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Contenido */
    .content-area {
        padding: 0.75rem;
    }

    /* Dashboard welcome */
    .dashboard-welcome {
        padding: 1rem;
        border-radius: var(--radius-lg);
    }

    .welcome-content h1 {
        font-size: 1.1rem;
    }

    .welcome-content p {
        font-size: 0.85rem;
    }

    /* Stats - una columna */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
    }

    .stat-header {
        margin-bottom: 0;
    }

    .stat-content {
        flex: 1;
    }

    .stat-value {
        font-size: 1.25rem;
        margin-bottom: 0;
    }

    /* Cards */
    .card {
        padding: 1rem;
        border-radius: var(--radius-md);
    }

    .card-title {
        font-size: 1rem;
    }

    /* Tablas - vista tarjeta en móvil pequeño */
    .table-responsive-cards .data-table,
    .table-responsive-cards .data-table thead,
    .table-responsive-cards .data-table tbody,
    .table-responsive-cards .data-table th,
    .table-responsive-cards .data-table td,
    .table-responsive-cards .data-table tr {
        display: block;
    }

    .table-responsive-cards .data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive-cards .data-table tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
        padding: 0.5rem;
    }

    .table-responsive-cards .data-table td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        white-space: normal;
    }

    .table-responsive-cards .data-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 45%;
        font-weight: 600;
        text-align: left;
        color: var(--gray-400);
    }

    /* Formularios */
    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Login */
    .login-page {
        padding: 1rem;
    }

    .login-card {
        padding: 1.5rem 1rem;
    }

    .login-logo img {
        width: 80px;
        height: 80px;
    }

    .login-title h1 {
        font-size: 1.25rem;
    }

    /* Botones */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    /* Quick actions */
    .quick-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .quick-action-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
        padding: 0.75rem;
        font-size: 0.75rem;
    }

    .quick-action-btn i {
        font-size: 1.25rem;
    }

    /* AI Hub cards */
    .ai-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .ai-tool-card {
        padding: 0.75rem;
    }

    .ai-tool-card .tool-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .ai-tool-card .tool-name {
        font-size: 0.7rem;
    }
}

/* ============================================
   IMPRESIÓN
   ============================================ */
@media print {

    .sidebar,
    .main-header,
    .quick-actions,
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .content-area {
        padding: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ============================================
   ORIENTACIÓN LANDSCAPE EN MÓVILES
   ============================================ */
@media (max-width: 896px) and (orientation: landscape) {
    .sidebar {
        width: 250px;
    }

    .content-area {
        padding: 0.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .dashboard-welcome {
        padding: 1rem;
    }

    .welcome-meta {
        flex-direction: row;
    }
}

/* ============================================
   PREFERENCIAS DE USUARIO
   ============================================ */
/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   DISPOSITIVOS TÁCTILES (sin hover)
   ============================================ */
@media (hover: none) and (pointer: coarse) {

    /* Deshabilitar efectos hover que causan doble-tap */
    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-link:hover {
        background: transparent;
    }

    .header-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Mejor feedback táctil */
    .menu-toggle:active,
    .nav-link:active,
    .header-btn:active,
    .btn:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}