/* ========================
   CSS Variables / Themes
   ======================== */
:root,
[data-theme="dark"] {
    --primary-color: #005073;
    --primary-dark: #003852;
    --accent-color: #1eb980;
    --bg-body: #07090e;
    --bg-card: #11151c;
    --bg-sidebar: #0c0f17;
    --bg-header: rgba(12, 15, 23, 0.9);
    --text-main: #c9d1d9;
    --text-header: #f0f6fc;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --border-glow: rgba(30, 185, 128, 0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --glass-bg: rgba(17, 21, 28, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.05);
    --error-color: #ff7b7b;
    --success-color: #38ef7d;
    --warning-color: #f8c102;
    --sidebar-w: 260px;
    --header-h: 60px;
}

[data-theme="light"] {
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.92);
    --text-main: #4a5568;
    --text-header: #1a202c;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --border-glow: rgba(30, 185, 128, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.06);
    --hover-bg: rgba(0, 0, 0, 0.04);
    --primary-color: #0070a0;
    --primary-dark: #005073;
    --accent-color: #16a36a;
}

/* ========================
   Reset
   ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================
   Public Navbar (Home)
   ======================== */
.navbar {
    background: var(--bg-header);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-header);
}

.brand-logo .accent {
    color: var(--accent-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-header);
    font-size: 1.1rem;
    padding: 6px 10px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-main);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links i {
    margin-right: 0.3rem;
    font-size: 0.85rem;
}

.main-public {
    min-height: 80vh;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-sidebar);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.7rem 1.25rem;
    }
}

/* ========================
   Sidebar (Authenticated)
   ======================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-color), #13875d);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-header);
    letter-spacing: 0.02em;
}

.brand-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.sidebar-close {
    display: none;
    width: 30px;
    height: 30px;
    background: var(--hover-bg);
    border: none;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-close:hover { color: var(--text-header); }

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.nav-group {
    padding: 0.25rem 0;
}

.nav-group-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 0.75rem 1.25rem 0.3rem;
    user-select: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 1.25rem;
    margin: 1px 0.5rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.15s ease;
    text-decoration: none;
    position: relative;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.sidebar-link:hover {
    background: var(--hover-bg);
    color: var(--text-header);
}

.sidebar-link:hover i { opacity: 1; }

.sidebar-link.active {
    background: rgba(30, 185, 128, 0.1);
    color: var(--accent-color);
    font-weight: 500;
}

.sidebar-link.active i { opacity: 1; }

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 25%;
    height: 50%;
    width: 3px;
    background: var(--accent-color);
    border-radius: 0 3px 3px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-login-btn,
.sidebar-register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.sidebar-register-btn {
    background: linear-gradient(135deg, #1eb980, #13875d);
    color: #fff;
}

.sidebar-login-btn:hover,
.sidebar-register-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ========================
   Main Wrapper
   ======================== */
.main-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================
   Top Header
   ======================== */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-h);
    background: var(--bg-header);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hamburger {
    display: none;
    width: 38px;
    height: 38px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-header);
    font-size: 1.1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.hamburger:hover { background: var(--hover-bg); border-color: var(--accent-color); }

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.4rem 0.85rem;
    width: 280px;
    transition: border-color 0.2s;
}

.header-search:focus-within { border-color: var(--accent-color); }

.header-search i { color: var(--text-muted); font-size: 0.8rem; flex-shrink: 0; }

.header-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-header);
    font-size: 0.85rem;
    width: 100%;
    font-family: var(--font);
}

.header-search input::placeholder { color: var(--text-muted); }

.header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Header Icon Buttons */
.header-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-icon-btn:hover {
    background: var(--hover-bg);
    color: var(--accent-color);
    border-color: var(--border-color);
}

.notif-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 15px;
    height: 15px;
    background: var(--error-color);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Profile Button */
.header-profile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.25rem 0.65rem 0.25rem 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
    height: 40px;
}

.header-profile:hover { border-color: var(--accent-color); }

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-color), #13875d);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
}

.profile-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-header);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.profile-role { font-size: 0.6rem; padding: 0.05rem 0.35rem; }

.profile-chevron {
    font-size: 0.6rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 0.15rem;
}

/* Dropdowns */
.header-dropdown-wrapper { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-width: 220px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.18s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 0.65rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: background 0.12s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font);
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--hover-bg);
    color: var(--text-header);
}

.dropdown-item i { width: 16px; text-align: center; font-size: 0.85rem; flex-shrink: 0; }

.dropdown-item-text { font-size: 0.82rem; line-height: 1.3; }
.dropdown-item-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }

.dropdown-divider { height: 1px; background: var(--border-color); margin: 0.25rem 0; }

.dropdown-footer {
    padding: 0.5rem 0.85rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.dropdown-footer a { font-size: 0.75rem; color: var(--accent-color); font-weight: 500; }

.dropdown-logout { color: var(--error-color) !important; }
.dropdown-logout:hover { background: rgba(255, 123, 123, 0.1) !important; }

/* ========================
   Main Content
   ======================== */
.main-content {
    flex: 1;
    padding: 1.5rem;
}

/* Flash Messages */
.flash-container {
    margin-bottom: 1.25rem;
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
    border: 1px solid transparent;
    animation: flashIn 0.3s ease;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-icon { flex-shrink: 0; font-size: 1rem; }

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

.flash-close:hover { opacity: 1; }

.flash-success { background: rgba(30, 185, 128, 0.12); border-color: rgba(30, 185, 128, 0.3); color: #7ee7a3; }
.flash-error { background: rgba(255, 0, 0, 0.12); border-color: rgba(255, 0, 0, 0.3); color: var(--error-color); }
.flash-warning { background: rgba(248, 193, 2, 0.12); border-color: rgba(248, 193, 2, 0.3); color: #f8c102; }
.flash-info { background: rgba(0, 80, 115, 0.12); border-color: rgba(0, 80, 115, 0.3); color: #4da6d9; }

/* Legacy alert classes */
.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 0.5rem; border: 1px solid transparent; font-size: 0.88rem; }
.alert-success { background-color: rgba(30, 185, 128, 0.12); border-color: rgba(30, 185, 128, 0.3); color: #7ee7a3; }
.alert-error { background-color: rgba(255, 0, 0, 0.12); border-color: rgba(255, 0, 0, 0.3); color: var(--error-color); }
.alert-warning { background-color: rgba(248, 193, 2, 0.12); border-color: rgba(248, 193, 2, 0.3); color: #f8c102; }
.alert-info { background-color: rgba(0, 80, 115, 0.12); border-color: rgba(0, 80, 115, 0.3); color: #4da6d9; }

.messages-container { margin-bottom: 1rem; }

/* ========================
   Buttons
   ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: var(--font);
    font-size: 0.875rem;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    box-shadow: 0 3px 12px rgba(0, 80, 115, 0.3);
}

.btn-primary:hover { box-shadow: 0 5px 18px rgba(0, 80, 115, 0.4); transform: translateY(-1px); }

.btn-accent {
    background: linear-gradient(135deg, #1eb980, #13875d);
    color: #fff;
    box-shadow: 0 3px 12px rgba(30, 185, 128, 0.3);
}

.btn-accent:hover { box-shadow: 0 5px 18px rgba(30, 185, 128, 0.4); transform: translateY(-1px); }

.btn-text { background: none; color: var(--text-main); padding: 0; }
.btn-text:hover { color: var(--accent-color); }

/* ========================
   Cards
   ======================== */
.card, .glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover, .glass-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-glow);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

/* ========================
   Badges
   ======================== */
.badge {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
    line-height: 1.3;
}

.badge-pending { background-color: rgba(248, 193, 2, 0.2); color: #f8c102; border: 1px solid rgba(248, 193, 2, 0.3); }
.badge-approved { background-color: rgba(30, 185, 128, 0.2); color: #38ef7d; border: 1px solid rgba(30, 185, 128, 0.3); }
.badge-completed { background-color: rgba(0, 80, 115, 0.2); color: #4da6d9; border: 1px solid rgba(0, 80, 115, 0.3); }
.badge-rejected { background-color: rgba(255, 0, 0, 0.2); color: var(--error-color); border: 1px solid rgba(255, 0, 0, 0.3); }
.badge-student { background-color: rgba(30, 185, 128, 0.2); color: #38ef7d; }
.badge-instructor { background-color: rgba(0, 80, 115, 0.2); color: #4da6d9; }
.badge-admin { background-color: rgba(255, 123, 123, 0.2); color: var(--error-color); }

/* ========================
   Forms
   ======================== */
.auth-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    max-width: 500px;
    margin: 0 auto;
}

.auth-form .form-group { margin-bottom: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }

label { display: block; margin-bottom: 0.4rem; color: var(--text-header); font-size: 0.88rem; font-weight: 500; }

input, select, textarea {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-header);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-color); }
small { color: var(--text-muted); font-size: 0.82rem; }

.input-error {
    border-color: var(--error-color) !important;
}
.input-error:focus {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 123, 123, 0.15);
}
.field-error {
    display: block;
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    line-height: 1.3;
}

.search-input-modern {
    flex: 1;
    min-width: 350px;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-header);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.search-input-modern:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(30, 185, 128, 0.12);
    outline: none;
}

.select-input-modern {
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-header);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.5rem;
}

.select-input-modern:hover { border-color: rgba(255, 255, 255, 0.2); }
.select-input-modern:focus { border-color: var(--accent-color); outline: none; box-shadow: 0 0 0 3px rgba(30, 185, 128, 0.1); }
.select-input-modern option { background-color: var(--bg-card); color: var(--text-header); }

/* ========================
   Attendance Chips
   ======================== */
.attendance-chip {
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.attendance-low { background: linear-gradient(135deg, #cb2d3e, #ef473a); }
.attendance-mid { background: linear-gradient(135deg, #f8ff00, #f8c102); color: #000; border-color: rgba(0,0,0,0.1); }
.attendance-high { background: linear-gradient(135deg, #11998e, #38ef7d); }

/* ========================
   Tables
   ======================== */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.table-modern th,
.table-modern td {
    padding: 0.85rem 0.85rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--glass-border);
}

.table-modern th {
    background: rgba(255, 255, 255, 0.04);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--text-header);
}

.table-modern tbody tr { transition: background-color 0.15s ease; }
.table-modern tbody tr:hover { background-color: var(--hover-bg); }
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; }

/* ========================
   Footer
   ======================== */
.footer {
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================
   Hero
   ======================== */
.hero { text-align: center; padding: 4rem 1rem; }
.hero h1 { font-size: 2.8rem; color: var(--text-header); margin-bottom: 0.75rem; font-weight: 700; }
.hero h1 .accent { color: var(--accent-color); }
.hero p { font-size: 1.15rem; color: var(--text-main); margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ========================
   Grid Layouts
   ======================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

/* ========================
   Utility
   ======================== */
.text-green { color: var(--success-color); }
.text-yellow { color: var(--warning-color); }
.text-red { color: var(--error-color); }
.text-muted { color: var(--text-muted); }

/* ========================
   Responsive — Tablet
   ======================== */
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .main-wrapper { margin-left: 220px; }
    :root { --sidebar-w: 220px; }
}

/* ========================
   Responsive — Mobile
   ======================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    .sidebar-close {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .hamburger {
        display: flex;
    }

    .header-search {
        display: none;
    }

    .profile-info {
        display: none;
    }

    .header-profile {
        padding: 0.25rem;
    }

    .profile-chevron {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .hero h1 { font-size: 1.8rem; }
    .courses-grid { grid-template-columns: 1fr; }
    .card { padding: 1.25rem; }
}

@media (max-width: 480px) {
    .top-header { padding: 0 0.6rem; }

    .header-icon-btn { width: 34px; height: 34px; font-size: 0.9rem; }

    .header-profile {
        border: none;
        padding: 0;
        height: auto;
    }

    .profile-avatar { width: 30px; height: 30px; font-size: 0.65rem; }

    .dropdown-menu {
        right: -0.25rem;
        min-width: 200px;
    }

    .sidebar { width: 85vw; max-width: 280px; }
}

/* ========================
   Hero Banner
   ======================== */
.hero-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
}
.hero-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 480px;
    padding: 5rem 2rem 4rem;
    gap: 1.5rem;
    background: linear-gradient(180deg, rgba(0,0,0,0.72) 0%, rgba(0,20,40,0.82) 50%, rgba(0,40,70,0.92) 100%);
}
.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3);
    max-width: 700px;
    line-height: 1.25;
    margin: 0;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: #e0e0e0;
    max-width: 580px;
    line-height: 1.7;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 0;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.hero-btn {
    font-size: 1.05rem;
    padding: 0.9rem 2rem;
}
.hero-btn-glass {
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.35);
    color: #fff;
}
.hero-btn-glass:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.55);
}
@media (max-width: 768px) {
    .hero-overlay { min-height: 380px; padding: 4rem 1.5rem 3rem; gap: 1.2rem; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; padding: 0.6rem 1rem; }
}
@media (max-width: 480px) {
    .hero-overlay { min-height: 320px; padding: 3rem 1rem 2.5rem; gap: 1rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-btn { font-size: 0.95rem; padding: 0.8rem 1.5rem; }
}

/* ========================
   Popup Ad Overlay
   ======================== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: popupFadeIn 0.3s ease;
}
.popup-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: popupSlideUp 0.35s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.popup-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}
.popup-close:hover { background: var(--error-color); }
.popup-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.popup-body {
    padding: 1.5rem;
    text-align: center;
}
.popup-body h3 {
    margin-bottom: 0.5rem;
    color: var(--text-header);
    font-size: 1.3rem;
}
.popup-body p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
}
.popup-fade-out {
    animation: popupFadeOut 0.3s ease forwards;
}
@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes popupSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes popupFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Course card hover */
.course-card:hover img {
    transform: scale(1.05);
}

/* CAPTCHA */
.captcha-question {
    display: inline-block;
    background: var(--bg-body);
    border: 1px dashed var(--accent-color);
    border-radius: 6px;
    padding: 0.35rem 0.8rem;
    color: var(--accent-color);
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    letter-spacing: 1px;
    user-select: none;
}
