/* ==========================================================================
   Instant Skills LMS - Custom Styling System (Pure CSS)
   ========================================================================== */

/* Font & Global Reset */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Variables - Gravity-Shift System Palette */
    --primary: #5B56E8;          /* Vibrant royal purple-blue */
    --primary-glow: rgba(91, 86, 232, 0.15);
    --secondary: #2563EB;        /* Bright blue */
    --success: #10B981;          /* Emerald green */
    --warning: #F59E0B;          /* Amber Yellow */
    --danger: #EF4444;           /* Coral red */
    
    /* Layout Backgrounds */
    --bg-sidebar: #0F172A;       /* Distinct slate navy sidebar canvas */
    --sidebar-text-main: #FFFFFF;
    --sidebar-text-muted: #94A3B8;
    --sidebar-active-bg: #5B56E8; /* Active link fill */
    --sidebar-active-border: #5B56E8;
    
    /* Main Workspace Midnight Dark Blue Canvas */
    --bg-main: #0B132B;          /* Deep midnight dark blue */
    --bg-card: #1E293B;          /* Muted dark slate navy */
    --text-main: #FFFFFF;        /* Pure white */
    --text-muted: #94A3B8;       /* Cool gray */
    --text-accent: #64748B;      /* Accent gray */
    
    /* Layout & Border Controls */
    --radius: 12px;              /* 12px smooth modern curved edges */
    --radius-sm: 8px;
    --glass-border: rgba(255, 255, 255, 0.08); /* Subtle border */
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    
    /* Fonts */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 45%);
    z-index: -2;
    pointer-events: none;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   UI UTILITY COMPONENTS
   ========================================================================== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.05);
}

/* Helper card borders just like the screenshot! */
.card-border-green { border-left: 4px solid var(--success) !important; }
.card-border-blue { border-left: 4px solid var(--primary) !important; }
.card-border-amber { border-left: 4px solid var(--warning) !important; }
.card-border-indigo { border-left: 4px solid var(--primary) !important; }
.card-border-purple { border-left: 4px solid var(--primary) !important; }
.card-border-danger { border-left: 4px solid var(--warning) !important; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: var(--glass-border);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-main);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-main);
}

.form-select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: rgba(79, 70, 229, 0.1); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.2); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-danger { background: rgba(79, 70, 229, 0.1); color: var(--primary); border: 1px solid rgba(79, 70, 229, 0.2); } /* Standardized danger badge to primary */
.badge-muted { background: rgba(100, 116, 139, 0.1); color: var(--text-muted); border: 1px solid rgba(100, 116, 139, 0.2); }

/* Horizontal scrolling table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    margin-bottom: 1.5rem;
}

.lms-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: var(--bg-card);
}

.lms-table th {
    background: var(--bg-main);
    padding: 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--glass-border);
}

.lms-table td {
    padding: 1rem;
    font-size: 0.95rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.lms-table tr:last-child td {
    border-bottom: none;
}

.lms-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   PORTAL LAYOUT (SIDEBAR & MAIN SECTION)
   ========================================================================== */
.portal-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar styling */
.portal-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.45rem;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 2rem;
    color: white;
}

.sidebar-logo i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo span {
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    margin-right: -0.5rem;
    padding-right: 0.5rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.05);
}

.sidebar-menu-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--sidebar-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 0.5rem 0.75rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.05rem;
    color: #ffffff; /* High contrast white icons */
}

.sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg) !important;
    color: #ffffff !important;
    border-left: none !important;
    border-radius: 0 50px 50px 0 !important;
    box-shadow: 0 4px 12px rgba(91, 86, 232, 0.2) !important;
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

/* Portal Content Area */
.portal-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 3rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header bar */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--glass-border);
}

.header-title h1 {
    font-size: 1.85rem;
    font-weight: 800;
}

.header-title p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-notification-bell {
    position: relative;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.nav-notification-bell:hover {
    color: var(--text-main);
}

.bell-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   DASHBOARD STATS & LAYOUT
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--secondary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

/* Dashboard Grids */
.dashboard-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.dashboard-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.75rem;
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feed-item {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.feed-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.feed-content {
    display: flex;
    flex-direction: column;
}

.feed-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 17, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: flex-start; /* Align to top to allow scroll spacing */
    justify-content: center;
    padding: 2.5rem 1.5rem;
    overflow-y: auto; /* Enable scrolling for overflow content */
}

.modal-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto; /* Center horizontally */
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-main);
}

/* Filter Bar controls */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

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

/* Timetable styling */
.timetable-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.timetable-header-cell {
    background: rgba(30, 58, 138, 0.08);
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border-radius: 4px;
    border: 1px solid rgba(30, 58, 138, 0.15);
    color: var(--primary);
}

.timetable-time-col {
    background: rgba(30, 58, 138, 0.03);
    padding: 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
    border: 1px solid rgba(30, 58, 138, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.timetable-slot {
    background: var(--bg-card);
    border: 1px dashed var(--glass-border);
    border-radius: 4px;
    min-height: 80px;
    padding: 0.5rem;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.timetable-slot.occupied {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid var(--primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

.timetable-slot-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.timetable-slot-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Online Chat center styles */
.chat-container {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-bubble-wrapper {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
}

.chat-bubble-wrapper.me {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-bubble-wrapper.me .chat-bubble {
    background: var(--primary);
    border-color: transparent;
}

.chat-sender-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    display: flex;
    gap: 0.5rem;
}

.chat-bubble-wrapper.me .chat-sender-info {
    justify-content: flex-end;
}

.chat-input-bar {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0 0 0;
    border-top: 1px solid var(--glass-border);
}

/* Leaderboard custom stylings */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
}

.leaderboard-row:nth-child(1) {
    background: linear-gradient(to right, rgba(245, 158, 11, 0.1), transparent);
    border-color: rgba(245, 158, 11, 0.4);
}

.leaderboard-row:nth-child(2) {
    background: linear-gradient(to right, rgba(148, 163, 184, 0.1), transparent);
    border-color: rgba(148, 163, 184, 0.4);
}

.leaderboard-row:nth-child(3) {
    background: linear-gradient(to right, rgba(180, 83, 9, 0.1), transparent);
    border-color: rgba(180, 83, 9, 0.4);
}

.leaderboard-rank {
    font-size: 1.25rem;
    font-weight: 800;
    width: 40px;
    color: var(--text-muted);
}

.leaderboard-row:nth-child(1) .leaderboard-rank { color: #f59e0b; }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #94a3b8; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #b45309; }

.leaderboard-name {
    flex: 1;
    font-weight: 700;
    color: white;
}

.leaderboard-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.leaderboard-score {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    width: 60px;
    text-align: right;
}

/* Empty State Styling */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h4 {
    color: var(--text-main);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Mobile Sidebar Toggle Button */
.mobile-sidebar-toggle {
    display: none;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    z-index: 1001;
    position: fixed;
    top: 1.25rem;
    left: 1.25rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .portal-sidebar {
        width: 80px;
        padding: 2rem 0.5rem;
        align-items: center;
    }
    
    .sidebar-logo span, .sidebar-menu-title, .sidebar-link span, .sidebar-footer .sidebar-link span {
        display: none;
    }
    
    .sidebar-logo {
        justify-content: center;
        margin-bottom: 2.5rem;
    }
    
    .sidebar-link {
        justify-content: center;
        padding: 0.75rem;
    }
    
    .portal-content {
        margin-left: 80px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    .portal-sidebar {
        transform: translateX(-100%);
        width: 250px;
        align-items: stretch;
    }
    
    .portal-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-logo span, .sidebar-menu-title, .sidebar-link span, .sidebar-footer .sidebar-link span {
        display: inline;
    }
    
    .sidebar-logo {
        justify-content: flex-start;
    }
    
    .sidebar-link {
        justify-content: flex-start;
    }
    
    .portal-content {
        margin-left: 0;
        padding: 5rem 1.5rem 1.5rem 1.5rem;
    }
    
    .portal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SIDEBAR COLLAPSIBLE SUB-MENUS
   ========================================================================== */
.sidebar-dropdown-group {
    display: flex;
    flex-direction: column;
}
.sidebar-dropdown-group .dropdown-toggle {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    outline: none;
}
.sidebar-dropdown-menu {
    display: none;
    flex-direction: column;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 1.85rem;
    margin-bottom: 0.5rem;
    gap: 0.25rem;
}
.sidebar-dropdown-group.open .sidebar-dropdown-menu {
    display: flex;
}
.sidebar-dropdown-group.open .dropdown-chevron {
    transform: rotate(180deg);
}
.sidebar-sub-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--sidebar-text-muted);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}
.sidebar-sub-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-sub-link.active {
    background: var(--sidebar-active-bg) !important;
    color: #ffffff !important;
    border-left: 2px solid var(--sidebar-active-border) !important;
}

/* ==========================================================================
   PREMIUM CREATION WORKFLOW LAYOUT
   ========================================================================== */
.dark-creation-theme {
    background: #0b0f19;
    color: #f8fafc;
    min-height: 100vh;
    padding: 2rem 3rem;
    font-family: var(--font-sans);
}
.creation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.creation-title h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
}
.creation-title p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}
.creation-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}
@media (max-width: 1024px) {
    .creation-grid {
        grid-template-columns: 1fr;
    }
}
.creation-card {
    background: #151e2e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    margin-bottom: 2rem;
}
.creation-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}
.creation-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}
.creation-card-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}
.creation-input, .creation-select, .creation-textarea {
    width: 100%;
    padding: 0.85rem 1.15rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.creation-input:focus, .creation-select:focus, .creation-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}
.creation-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

/* Clickable Selector Cards */
.selector-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.selector-card-item {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.selector-card-item:hover {
    border-color: rgba(79, 70, 229, 0.5);
    background: rgba(79, 70, 229, 0.03);
}
.selector-card-item.active {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.15);
}
.selector-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #94a3b8;
}
.selector-card-item.active .selector-card-icon {
    background: var(--primary);
    color: #ffffff;
}
.selector-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}
.selector-card-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Checkbox Blocks */
.checkbox-group-container {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.checkbox-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}
.checkbox-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
}
.checkbox-card-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: #f8fafc;
}

/* Toggles & Switch */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.switch-label {
    font-size: 0.9rem;
    color: #f8fafc;
    font-weight: 600;
}
.switch-input-element {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}
.switch-input-element input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
    border-radius: 34px;
}
.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.switch-input-element input:checked + .switch-slider {
    background-color: var(--primary);
}
.switch-input-element input:checked + .switch-slider:before {
    transform: translateX(22px);
}