@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6C5CE7;
    --primary-hover: #5A4BD1;
    --primary-light: rgba(108, 92, 231, 0.15);
    --secondary: #00CEC9;
    --secondary-hover: #00B5B0;
    --accent: #FD79A8;
    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #E17055;
    --dark: #0F0E17;
    --dark-surface: rgba(15, 14, 23, 0.85);
    --dark-card: rgba(30, 28, 45, 0.9);
    --light: #F8F9FE;
    --light-alt: #EEEDF5;
    --white: #FFFFFF;
    --gray: #9CA3AF;
    --gray-light: #D1D5DB;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-light: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ============================================
   BACKGROUNDS PER PORTAL
   ============================================ */
.auth-body-colaborador,
.auth-body-empresa,
.auth-body-superadmin,
.auth-body-cliente,
.landing-body {
    background-color: #F8FAFC;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   FLOATING PARTICLES (decorative)
   ============================================ */
.particles {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute;
    width: 6px; height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: floatParticle 15s infinite linear;
}
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; animation-duration: 22s; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; animation-duration: 16s; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; animation-duration: 19s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; animation-duration: 21s; }

@keyframes floatParticle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1.5); opacity: 0; }
}

/* ============================================
   LANDING PAGE GRID
   ============================================ */
.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
    padding: 2rem;
}

.portal-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    cursor: pointer;
    color: var(--text-primary);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.portal-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.portal-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}
.portal-card:hover::before {
    transform: scaleX(1);
}

.portal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounceIn 0.6s ease-out;
}
.portal-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.portal-card p { color: var(--text-secondary); font-size: 0.9rem; }

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    color: var(--white);
    width: 100%;
    max-width: 460px;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}
.glass-card.wide { max-width: 600px; }
.glass-card.dark-mode {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}
.glass-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
}
.glass-card .subtitle {
    text-align: center;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    font-size: 0.9rem;
}
.glass-card .logo-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
    animation: fadeInUp 0.4s ease-out backwards;
}
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.15s; }
.form-group:nth-child(3) { animation-delay: 0.2s; }
.form-group:nth-child(4) { animation-delay: 0.25s; }
.form-group:nth-child(5) { animation-delay: 0.3s; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    outline: none;
    transition: var(--transition);
    font-size: 0.95rem;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.25);
}

.glass-card .form-control { color: var(--white); }
.glass-card .form-control::placeholder { color: rgba(255, 255, 255, 0.5); }
.glass-card.dark-mode .form-control {
    background: var(--white);
    color: var(--text-primary);
    border-color: var(--gray-light);
}
.glass-card.dark-mode .form-control::placeholder { color: var(--gray); }
.glass-card.dark-mode .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Dashboard Forms */
body:not([class*="auth-body"]) .form-control {
    background: var(--white);
    color: var(--text-primary);
    border: 1.5px solid var(--gray-light);
}
body:not([class*="auth-body"]) .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: width 0.4s, height 0.4s, top 0.4s, left 0.4s;
}
.btn:active::after {
    width: 300px; height: 300px;
    top: calc(50% - 150px);
    left: calc(50% - 150px);
}

.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #7c6cf0);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.45);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #55efc4);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(0, 206, 201, 0.3);
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e76f51);
    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);
    transform: translateY(-2px);
}

.btn-google {
    background: var(--white);
    color: var(--text-primary);
    border: 2px solid var(--gray-light);
    font-weight: 600;
}
.btn-google:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.btn-google img { width: 20px; height: 20px; }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-xs { padding: 0.3rem 0.7rem; font-size: 0.75rem; }

.btn-icon {
    width: 36px; height: 36px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   LAYOUT — SIDEBAR + MAIN
   ============================================ */
.app-container {
    display: flex;
    flex: 1;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 270px;
    background: var(--dark-surface);
    backdrop-filter: blur(20px);
    color: var(--white);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
    animation: slideInLeft 0.5s ease-out;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0.5rem 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1rem;
}
.sidebar-header .brand {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-header .brand-sub {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 2px;
}

.sidebar-nav { flex: 1; }

.nav-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}
.nav-link:hover {
    background: rgba(108, 92, 231, 0.15);
    color: var(--white);
}
.nav-link.active {
    background: linear-gradient(135deg, var(--primary), #7c6cf0);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}
.nav-link .nav-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.nav-link .badge-nav {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}
.sidebar-user .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem;
}
.sidebar-user .user-info { flex: 1; }
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 600; }
.sidebar-user .user-role { font-size: 0.7rem; color: var(--gray); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    background: var(--light);
    animation: fadeIn 0.4s ease-out;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}
.page-header .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out backwards;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    border-radius: 4px 0 0 4px;
}
.stat-card.purple::after { background: var(--primary); }
.stat-card.teal::after { background: var(--secondary); }
.stat-card.pink::after { background: var(--accent); }
.stat-card.green::after { background: var(--success); }
.stat-card.orange::after { background: var(--warning); }
.stat-card.red::after { background: var(--danger); }

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out backwards;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   COURSE CARDS GRID
   ============================================ */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out backwards;
}
.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.course-card .course-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), rgba(0, 206, 201, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
}
.course-card .course-body {
    padding: 1.25rem;
}
.course-card .course-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.course-card .course-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.course-card .course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.course-card .course-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.04);
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
}
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.table th {
    padding: 0.9rem 1rem;
    text-align: left;
    background: var(--light-alt);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}
.table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.9rem;
    vertical-align: middle;
}
.table tbody tr {
    transition: var(--transition);
}
.table tbody tr:hover {
    background: var(--primary-light);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-pending { background: #FEF3C7; color: #D97706; }
.badge-success { background: #D1FAE5; color: #059669; }
.badge-danger { background: #FEE2E2; color: #DC2626; }
.badge-info { background: #DBEAFE; color: #2563EB; }
.badge-purple { background: var(--primary-light); color: var(--primary); }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: zoomIn 0.3s ease-out;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.modal-header h3 { font-size: 1.2rem; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border: none; background: var(--light);
    border-radius: 50%; cursor: pointer;
    font-size: 1.1rem; display: flex;
    align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--danger); color: var(--white); }

.modal-body { margin-bottom: 1.5rem; }
.modal-footer {
    display: flex; gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* ============================================
   ALERTS / MESSAGES
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.3s ease-out;
}
.alert-error {
    background: #FEE2E2;
    color: #DC2626;
    border-left: 4px solid #DC2626;
}
.alert-success {
    background: #D1FAE5;
    color: #059669;
    border-left: 4px solid #059669;
}
.alert-warning {
    background: #FEF3C7;
    color: #D97706;
    border-left: 4px solid #D97706;
}
.alert-info {
    background: #DBEAFE;
    color: #2563EB;
    border-left: 4px solid #2563EB;
}

/* ============================================
   TABS
   ============================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--light-alt);
    margin-bottom: 1.5rem;
}
.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}
.tab:hover { color: var(--primary); }
.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}
.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.empty-state p { font-size: 0.9rem; }

/* ============================================
   SEARCH BAR
   ============================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.search-input {
    flex: 1;
    min-width: 250px;
    position: relative;
}
.search-input input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    background: var(--white);
}
.search-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.search-input .search-icon {
    position: absolute; left: 0.8rem; top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */
.landing-hero {
    width: 100%;
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), #a29bfe);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out;
}
.landing-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.landing-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.landing-section {
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out backwards;
}

/* ============================================
   MESSAGES / INBOX
   ============================================ */
.message-list { list-style: none; }
.message-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: var(--transition);
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.message-item:hover { background: var(--primary-light); }
.message-item.unread { background: rgba(108, 92, 231, 0.05); font-weight: 600; }
.message-item .msg-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 0.85rem;
    flex-shrink: 0;
}
.message-item .msg-content { flex: 1; }
.message-item .msg-subject { font-size: 0.95rem; margin-bottom: 2px; }
.message-item .msg-preview {
    font-size: 0.8rem; color: var(--text-secondary);
    display: -webkit-box; -webkit-line-clamp: 1;
    -webkit-box-orient: vertical; overflow: hidden;
}
.message-item .msg-time {
    font-size: 0.75rem; color: var(--gray);
    white-space: nowrap;
}

/* ============================================
   PLAN CARDS
   ============================================ */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
    animation: fadeInUp 0.5s ease-out backwards;
}
.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.plan-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.plan-card.featured::before {
    content: '⭐ Más Popular';
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white; padding: 4px 16px;
    border-radius: 20px; font-size: 0.75rem;
    font-weight: 700;
}
.plan-card .plan-name {
    font-size: 1.2rem; font-weight: 700;
    margin-bottom: 0.5rem;
}
.plan-card .plan-price {
    font-size: 2.5rem; font-weight: 800;
    color: var(--primary); margin-bottom: 0.25rem;
}
.plan-card .plan-price span {
    font-size: 0.9rem; font-weight: 500;
    color: var(--text-secondary);
}
.plan-card .plan-duration {
    font-size: 0.85rem; color: var(--text-secondary);
    margin-bottom: 1.25rem;
}
.plan-card .plan-features {
    list-style: none; text-align: left;
    margin-bottom: 1.5rem;
}
.plan-card .plan-features li {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
.plan-card .plan-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
}

/* ============================================
   DIVIDERS AND HELPERS
   ============================================ */
.divider {
    display: flex; align-items: center;
    margin: 1.5rem 0;
    color: rgba(255,255,255,0.4);
    font-size: 0.8rem;
}
.divider::before, .divider::after {
    content: ''; flex: 1; height: 1px;
    background: rgba(255,255,255,0.2);
}
.divider::before { margin-right: 1rem; }
.divider::after { margin-left: 1rem; }

.glass-card.dark-mode .divider { color: var(--gray); }
.glass-card.dark-mode .divider::before,
.glass-card.dark-mode .divider::after { background: var(--gray-light); }

.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.link-auth {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    text-decoration: underline;
    transition: var(--transition);
}
.link-auth:hover { color: var(--white); }

.glass-card.dark-mode .link-auth {
    color: var(--primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-25px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease-out; }
.animate-zoomIn { animation: zoomIn 0.4s ease-out; }

/* Loading shimmer */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { padding: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .courses-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 1.3rem; }
    .form-row { grid-template-columns: 1fr; }
    .glass-card { padding: 1.5rem; margin: 1rem; }
    .landing-hero h1 { font-size: 1.8rem; }
    .modal { margin: 0.5rem; }
    .table th, .table td { padding: 0.6rem 0.5rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .landing-grid { grid-template-columns: 1fr; }
    .stat-card .stat-value { font-size: 1.5rem; }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(108, 92, 231, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(108, 92, 231, 0.5); }

/* ============================================
   TOOLTIP
   ============================================ */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%; left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--dark);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

/* ============================================
   FILE UPLOAD
   ============================================ */
.file-upload-area {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(108, 92, 231, 0.02);
}
.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.file-upload-area .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray);
}
.file-upload-area p { font-size: 0.9rem; color: var(--text-secondary); }

/* ============================================
   COPY LINK BOX
   ============================================ */
.copy-link-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-light);
}
.copy-link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--text-primary);
    outline: none;
}
.copy-link-box .btn-copy {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}
.copy-link-box .btn-copy:hover { background: var(--primary-hover); }

/* Subscription status indicator */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.status-dot.active { background: var(--success); }
.status-dot.pending { background: var(--warning); }
.status-dot.expired { background: var(--danger); }
.status-dot.inactive { background: var(--gray); }

/* ============================================
   SPLIT LOGIN CARDS (NEW DESIGN)
   ============================================ */
.split-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.split-login-card {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    min-height: 550px;
    animation: zoomIn 0.5s ease-out backwards;
}

.split-login-left {
    flex: 1;
    position: relative;
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--white);
    background-size: cover;
    background-position: center;
    color: var(--dark);
    overflow: hidden;
}

.split-login-left::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    transition: all 0.5s ease;
}

/* Distinct light overlays for each portal */
.overlay-sa::before { background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(226, 232, 240, 0.8) 100%); }
.overlay-emp::before { background: linear-gradient(135deg, rgba(255, 247, 237, 0.9) 0%, rgba(255, 237, 213, 0.8) 100%); }
.overlay-col::before { background: linear-gradient(135deg, rgba(240, 249, 255, 0.9) 0%, rgba(224, 242, 254, 0.8) 100%); }
.overlay-cli::before { background: linear-gradient(135deg, rgba(240, 253, 244, 0.9) 0%, rgba(220, 252, 231, 0.8) 100%); }

.split-login-card:hover .overlay-sa::before { background: linear-gradient(135deg, rgba(248, 250, 252, 0.85) 0%, rgba(226, 232, 240, 0.7) 100%); }
.split-login-card:hover .overlay-emp::before { background: linear-gradient(135deg, rgba(255, 247, 237, 0.85) 0%, rgba(255, 237, 213, 0.7) 100%); }
.split-login-card:hover .overlay-col::before { background: linear-gradient(135deg, rgba(240, 249, 255, 0.85) 0%, rgba(224, 242, 254, 0.7) 100%); }
.split-login-card:hover .overlay-cli::before { background: linear-gradient(135deg, rgba(240, 253, 244, 0.85) 0%, rgba(220, 252, 231, 0.7) 100%); }

.split-login-left-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.split-login-left .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    color: var(--primary);
    animation: fadeInDown 0.6s ease-out;
}

.split-login-left h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    color: var(--dark);
    letter-spacing: -0.5px;
}

.split-login-left p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Decorative geometric shapes */
.split-login-left::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.1));
    border-radius: 50%;
    z-index: 0;
    animation: floatParticle 20s infinite linear;
}

.split-login-right {
    flex: 1;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--white);
    color: var(--text-primary);
}

.split-login-right .auth-icon {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 1.8rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.split-login-right h2 {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.split-login-right .subtitle {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.info-box {
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 12px;
}
.info-box .icon {
    color: var(--primary);
    font-size: 1.2rem;
}
.info-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark);
}
.info-box p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .split-login-card { flex-direction: column; }
    .split-login-left { min-height: 300px; padding: 2rem; }
    .split-login-right { padding: 2.5rem 2rem; }
    .split-login-left .logo { top: 2rem; }
}
