/* ============================================================
   LMS System - Main Stylesheet
   ============================================================ */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --transition: all 0.25s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-light: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    transition: var(--transition);
    margin: 0;
}

/* ─── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    z-index: 1000;
    transition: var(--transition);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    height: var(--header-height);
    border-bottom: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}

.sidebar-brand span {
    margin-left: 0.75rem;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-nav {
    padding: 0.75rem 0;
    list-style: none;
    margin: 0;
}

.nav-section-title {
    padding: 0.5rem 1.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,.5);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-section-title { opacity: 0; }

.sidebar-nav .nav-item { margin: 0.1rem 0.5rem; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    font-size: 0.875rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,.15);
    color: white;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    flex-shrink: 0;
    text-align: center;
}

.nav-text { margin-left: 0.75rem; transition: var(--transition); }

/* ─── MAIN CONTENT ────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* ─── TOP HEADER ──────────────────────────────────────────── */
.top-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow);
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.btn-sidebar-toggle:hover { background: var(--bg-light); color: var(--primary); }

/* ─── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* ─── STAT CARDS ──────────────────────────────────────────── */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

/* ─── TABLES ──────────────────────────────────────────────── */
.table {
    color: var(--text-primary);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover { background: rgba(79,70,229,.04); }

/* ─── BADGES ──────────────────────────────────────────────── */
.badge-free { background: #d1fae5; color: #065f46; }
.badge-paid { background: #dbeafe; color: #1e40af; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-live { background: #fee2e2; color: #991b1b; animation: pulse 1.5s infinite; }
.badge-scheduled { background: #fef3c7; color: #92400e; }
.badge-ended { background: #f1f5f9; color: #64748b; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ─── FORMS ───────────────────────────────────────────────── */
.form-control, .form-select {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.15);
    background: var(--card-bg);
    color: var(--text-primary);
}

/* ─── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ─── STUDENT DASHBOARD (Full Screen Responsive) ─────────── */
.student-app {
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-light);
    min-height: 100vh;
    position: relative;
}

@media (min-width: 768px) {
    .student-content {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .app-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.student-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.25rem 1rem 2.5rem;
    color: white;
    position: relative;
}

.student-header .greeting { font-size: 0.85rem; opacity: 0.85; }
.student-header .student-name { font-size: 1.3rem; font-weight: 700; }

.student-content {
    margin-top: -1.5rem;
    padding: 0 0.75rem 5rem;
    position: relative;
    z-index: 1;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.app-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.app-card:hover, .app-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.app-card .app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.4rem;
}

.app-card .app-label {
    font-size: 0.8rem;
    font-weight: 600;
}

/* ─── BOTTOM NAV (Student) ────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0,0,0,.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    transition: var(--transition);
}

.bottom-nav-item i { font-size: 1.3rem; margin-bottom: 2px; }

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary);
}

/* ─── COURSE CARDS ────────────────────────────────────────── */
.course-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.course-card .course-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.course-card .course-thumb-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.course-card .course-body { padding: 1rem; }
.course-card .course-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem; }
.course-card .course-meta { font-size: 0.8rem; color: var(--text-muted); }
.course-card .course-price { font-weight: 700; color: var(--primary); font-size: 1.1rem; }

/* ─── LIVE CLASS ──────────────────────────────────────────── */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ef4444;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse 1.5s infinite;
}

.live-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.chat-container {
    height: 350px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.chat-message {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.chat-message.own { flex-direction: row-reverse; }

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-bubble {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    max-width: 75%;
    font-size: 0.875rem;
}

.chat-message.own .chat-bubble {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chat-sender { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.2rem; }
.chat-message.own .chat-sender { text-align: right; color: rgba(255,255,255,.7); }

/* ─── NOTIFICATIONS ───────────────────────────────────────── */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notification-item:hover { background: rgba(79,70,229,.04); }
.notification-item.unread { border-left: 3px solid var(--primary); }

/* ─── VIDEO PLAYER ────────────────────────────────────────── */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ─── LOADING ─────────────────────────────────────────────── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.mobile-open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .top-header { padding: 0 1rem; }
}

/* ─── DARK MODE OVERRIDES ─────────────────────────────────── */
[data-theme="dark"] .table { --bs-table-bg: transparent; color: var(--text-primary); }
[data-theme="dark"] .table thead th { color: var(--text-muted); background: #0f172a; }
[data-theme="dark"] .table tbody td { color: var(--text-primary); border-color: var(--border-color); }
[data-theme="dark"] .table-hover tbody tr:hover { background: rgba(255,255,255,.03); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}
[data-theme="dark"] .form-control::placeholder { color: #64748b; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79,70,229,.2); }
[data-theme="dark"] .modal-content {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .modal-header { border-color: #334155; }
[data-theme="dark"] .modal-footer { border-color: #334155; }
[data-theme="dark"] .dropdown-menu {
    background: #1e293b;
    border-color: #334155;
}
[data-theme="dark"] .dropdown-item { color: #f1f5f9; }
[data-theme="dark"] .dropdown-item:hover { background: #334155; }
[data-theme="dark"] .card { background: var(--card-bg); border-color: var(--border-color); }
[data-theme="dark"] .card-header { background: rgba(0,0,0,.2); border-color: var(--border-color); color: var(--text-primary); }
[data-theme="dark"] .card-body { color: var(--text-primary); }
[data-theme="dark"] .btn-outline-primary { color: #818cf8; border-color: #818cf8; }
[data-theme="dark"] .btn-outline-secondary { color: #94a3b8; border-color: #475569; }
[data-theme="dark"] .btn-outline-success { color: #34d399; border-color: #34d399; }
[data-theme="dark"] .btn-outline-danger { color: #f87171; border-color: #f87171; }
[data-theme="dark"] .btn-outline-warning { color: #fbbf24; border-color: #fbbf24; }
[data-theme="dark"] .btn-outline-info { color: #38bdf8; border-color: #38bdf8; }
[data-theme="dark"] .btn-light { background: #334155; border-color: #475569; color: #f1f5f9; }
[data-theme="dark"] .btn-light:hover { background: #475569; }
[data-theme="dark"] .badge.bg-light { background: #334155 !important; color: #f1f5f9 !important; }
[data-theme="dark"] .badge.bg-info { background: rgba(56,189,248,.15) !important; color: #38bdf8 !important; }
[data-theme="dark"] .bg-light { background: #0f172a !important; }
[data-theme="dark"] .text-dark { color: #f1f5f9 !important; }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .border { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-bottom { border-color: var(--border-color) !important; }
[data-theme="dark"] .border-top { border-color: var(--border-color) !important; }
[data-theme="dark"] .page-title { color: var(--text-primary); }
[data-theme="dark"] .nav-tabs .nav-link { color: var(--text-muted); }
[data-theme="dark"] .nav-tabs .nav-link.active { color: var(--text-primary); background: var(--card-bg); border-color: var(--border-color); }
[data-theme="dark"] .nav-pills .nav-link { color: var(--text-muted); }
[data-theme="dark"] .nav-pills .nav-link.active { background: var(--primary); color: #fff; }
[data-theme="dark"] .form-check-input { background-color: #334155; border-color: #475569; }
[data-theme="dark"] .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .form-label { color: var(--text-primary); }
[data-theme="dark"] .input-group-text { background: #334155; border-color: #475569; color: var(--text-muted); }
[data-theme="dark"] .top-header { background: var(--card-bg); border-color: var(--border-color); }
[data-theme="dark"] .fw-semibold, [data-theme="dark"] .fw-bold { color: var(--text-primary); }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 { color: var(--text-primary); }
[data-theme="dark"] .list-group-item { background: var(--card-bg); border-color: var(--border-color); color: var(--text-primary); }
[data-theme="dark"] .form-text { color: var(--text-muted); }
[data-theme="dark"] hr { border-color: var(--border-color); opacity: .3; }
[data-theme="dark"] .admin-search-results { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .admin-search-results .search-item { color: #f1f5f9; }
[data-theme="dark"] .admin-search-results .search-item:hover,
[data-theme="dark"] .admin-search-results .search-item.active { background: #334155; }

/* ─── UTILITIES ───────────────────────────────────────────── */
.text-primary-custom { color: var(--primary) !important; }
.bg-gradient-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.rounded-xl { border-radius: var(--radius-lg) !important; }
.shadow-custom { box-shadow: var(--shadow-md) !important; }
.page-title { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.section-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.75rem; }

/* ── Attendance Calendar (New Design) ────────────────────── */
.att-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.att-cal-header {
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    color: #64748b;
    padding: 6px 0;
}
.att-cal-cell {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transition: all .2s;
}
.att-cal-cell:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.att-cal-empty {
    border: none;
    background: transparent;
}
.att-cal-today {
    box-shadow: 0 0 0 2px #4f46e5;
}
.att-cal-date {
    font-size: .75rem;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.05);
}
.att-cal-status {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .5px;
}
.att-cal-time {
    font-size: .55rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 2px;
}
.att-cal-time i {
    font-size: .5rem;
}

@media (max-width: 480px) {
    .att-cal-cell { min-height: 50px; padding: 3px; }
    .att-cal-date { font-size: .65rem; width: 18px; height: 18px; }
    .att-cal-status { font-size: .6rem; }
    .att-cal-time { font-size: .5rem; }
}

/* ── Admin Menu Search ────────────────────────────────────── */
.admin-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    margin-top: 4px;
}
.admin-search-results .search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: .85rem;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: background .15s;
}
.admin-search-results .search-item:hover,
.admin-search-results .search-item.active {
    background: #ede9fe;
    color: #4f46e5;
}
.admin-search-results .search-item i {
    font-size: .9rem;
    color: #64748b;
    width: 18px;
    text-align: center;
}
.admin-search-results .search-item:hover i,
.admin-search-results .search-item.active i {
    color: #4f46e5;
}
@media (max-width: 768px) {
    .admin-search-wrapper { max-width: 200px !important; }
}

/* ─── TOP MENU LAYOUT ─────────────────────────────────────── */
.layout-top-menu .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: var(--header-height);
    overflow: visible;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 1rem;
}
.layout-top-menu .sidebar .sidebar-brand {
    height: var(--header-height);
    border-bottom: none;
    padding: 0 1rem 0 0;
    flex-shrink: 0;
}
.layout-top-menu .sidebar .sidebar-nav {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
    height: var(--header-height);
    scrollbar-width: none;
}
.layout-top-menu .sidebar .sidebar-nav::-webkit-scrollbar { display: none; }
.layout-top-menu .sidebar .sidebar-nav .nav-section-title { display: none; }
.layout-top-menu .sidebar .sidebar-nav .nav-item {
    flex-shrink: 0;
}
.layout-top-menu .sidebar .sidebar-nav .nav-link {
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    font-size: 0.8rem;
    border-radius: 6px;
    gap: 0.35rem;
}
.layout-top-menu .sidebar .sidebar-nav .nav-link .nav-text {
    opacity: 1 !important;
    display: inline !important;
}
.layout-top-menu .main-content {
    margin-left: 0 !important;
    padding-top: var(--header-height) !important;
}
.layout-top-menu .top-header {
    margin-left: 0 !important;
    top: var(--header-height) !important;
}
.layout-top-menu #sidebar-toggle { display: none; }
/* Mobile: revert to sidebar on small screens */
@media (max-width: 768px) {
    .layout-top-menu .sidebar {
        position: fixed;
        width: var(--sidebar-width);
        height: 100vh;
        max-height: 100vh;
        flex-direction: column;
        overflow-y: auto;
    }
    .layout-top-menu .sidebar .sidebar-nav {
        flex-direction: column;
        flex-wrap: wrap;
        height: auto;
        overflow-x: visible;
    }
    .layout-top-menu .sidebar .sidebar-nav .nav-section-title { display: block; }
    .layout-top-menu .main-content { padding-top: 0 !important; }
    .layout-top-menu .top-header { top: 0 !important; }
    .layout-top-menu #sidebar-toggle { display: block; }
    .layout-top-menu .admin-search-wrapper { display: none !important; }
}

/* Top Menu Scroll Buttons */
.top-menu-scroll-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
    backdrop-filter: blur(4px);
}
.top-menu-scroll-btn:hover {
    background: rgba(255,255,255,.35);
    transform: scale(1.1);
}
.layout-top-menu .top-menu-scroll-btn {
    display: flex;
}
@media (max-width: 768px) {
    .layout-top-menu .top-menu-scroll-btn { display: none; }
}

/* ─── LOADING SKELETON ────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, rgba(79,70,229,.05) 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card { height: 100px; border-radius: 12px; }
