@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&display=swap');

:root {
    /* Typography */
    --font-display: "Manrope", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-serif: 'Garamond', 'Times New Roman', serif;

    /* User's Exact Premium Palette */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.4);
    --primary-light: #eef6ff;
    --primary-rgb: 59, 130, 246;

    --secondary: #60a5fa;
    --secondary-dark: #3b82f6;
    --secondary-glow: rgba(96, 165, 250, 0.4);
    --secondary-rgb: 96, 165, 250;

    --accent: #fdba74;
    --accent-glow: rgba(253, 186, 116, 0.4);
    --soft-accent: #fff4e7;

    --success: #34d399;
    --success-dark: #10b981;
    --success-glow: rgba(52, 211, 153, 0.4);
    --success-rgb: 52, 211, 153;

    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.4);

    --warning: var(--secondary);
    --warning-dark: #fbbf24;
    --warning-glow: rgba(var(--secondary-rgb), 0.35);

    --info: var(--primary);
    --info-dark: #0284c7;
    --info-glow: rgba(var(--primary-rgb), 0.4);

    --indigo: #6366f1;
    --indigo-dark: #4f46e5;
    --indigo-glow: rgba(99, 102, 241, 0.4);

    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --cyan-glow: rgba(6, 182, 212, 0.4);

    /* Exact Match Neutrals */
    --background: #f8fbff;
    --surface: #ffffff;
    --text: #334155;
    --muted: #64748b;
    --border: #e6f0fb;
    --soft-blue: #eef6ff;
    --soft-accent: #fff4e7;

    --text-main: var(--text);
    --text-muted: var(--muted);

    /* Gradients - EXACT Matches */
    --premium-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --primary-gradient: var(--premium-gradient);
    --secondary-gradient: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    --success-gradient: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    --danger-gradient: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    --warning-gradient: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
    --info-gradient: linear-gradient(135deg, var(--info) 0%, var(--info-dark) 100%);
    --indigo-gradient: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-dark) 100%);
    --cyan-gradient: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-dark) 100%);
    --bg-gradient: linear-gradient(135deg, #f8fbff 0%, #f1f5f9 100%);

    /* Border & Corner Values */
    --r-xl: 30px;
    --r-lg: 20px;
    --r-md: 12px;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);

    /* Legacy compatibility */
    --brand-blue: var(--primary);
    --brand-yellow: var(--accent);
    --brand-navy: var(--text-dark);

    --sidebar-width: 280px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, 
.display-font, 
.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
}

/* Abstract Background Elements */

.bg-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(79, 172, 254, 0.3);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(253, 160, 133, 0.2);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(30px, -50px) scale(1.1);
    }
}

/* --- SIDEBAR --- */

.sidebar {
    width: var(--sidebar-width);
    width: 280px;
    position: fixed;
    top: 0;
    left: 0;
    /*height: calc(100vh - 40px);*/
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    /*var(--r-xl);*/
    border-top-right-radius: 24px;
    border-bottom-right-radius: 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.sidebar.collapsed {
    width: 90px;
}

.sidebar-brand {
    padding: 20px 25px 85px;
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    transition: var(--transition);
    border-bottom: 2px dashed rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.sidebar.collapsed .sidebar-brand {
    padding: 20px 10px;
}

.sidebar.collapsed .sidebar-brand img {
    max-width: 45px;
    height: auto;
}

.sidebar.collapsed .logout-icon {
    display: none !important;
}


.logo-text {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    transition: var(--transition);
}

.sidebar.collapsed .logo-text {
    font-size: 24px;
}

.logo-sub {
    color: var(--secondary-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 5px;
    transition: var(--transition);
}

.sidebar.collapsed .logo-sub {
    display: none;
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px 10px;
}

.sidebar.collapsed .sidebar-nav {
    padding: 10px;
}

/* Stylish Scrollbar for Sidebar */

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.sidebar-nav:hover::-webkit-scrollbar-thumb {
    background: var(--secondary);
}

.nav-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 25px 0 10px 15px;
    opacity: 0.7;
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-quick-hub {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

.sidebar.collapsed .sidebar-quick-hub .quick-hub-toggle span,
.sidebar.collapsed .sidebar-quick-hub .fa-chevron-down {
    display: none !important;
}

.sidebar.collapsed .sidebar-quick-hub .quick-hub-toggle {
    padding: 10px !important;
    justify-content: center !important;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: var(--r-lg);
    margin-bottom: 8px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    white-space: nowrap;
}

.sidebar.collapsed .nav-link {
    padding: 14px;
    justify-content: center;
}

.nav-link i {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
    transition: var(--transition);
}

.nav-link-text {
    transition: var(--transition);
    opacity: 1;
}

.sidebar.collapsed .nav-link-text,
.sidebar.collapsed .nav-link span:not(.badge),
.sidebar.collapsed .nav-link i.fa-chevron-down,
.sidebar.collapsed .nav-link i.transition-icon {
    opacity: 0;
    display: none !important;
}

.nav-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar.collapsed .nav-link:hover {
    transform: translateY(-3px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 10px 20px var(--primary-glow);
    border: none;
}

.nav-link.active i {
    color: white;
}

/* Sidebar Footer */

.sidebar-footer {
    padding: 30px 15px;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.4);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-footer {
    padding: 15px 5px !important;
    justify-content: center !important;
}

.sidebar.collapsed .sidebar-user-panel {
    flex-direction: column !important;
    padding: 12px 5px !important;
    width: auto !important;
    gap: 12px !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
}

.sidebar.collapsed .sidebar-user-panel .user-info-sm {
    display: none !important;
}

.sidebar.collapsed .sidebar-user-panel img {
    margin: 0 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed .sidebar-user-panel .d-flex.gap-2 {
    gap: 10px !important;
    justify-content: center !important;
}

.sidebar.collapsed .sidebar-user-panel .d-flex.gap-2 a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-user-panel .d-flex.gap-2 a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sidebar.collapsed .sidebar-user-panel .d-flex.gap-2 a[title="Switch Portal"] {
    display: flex !important; /* Keep switch portal visible if needed */
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 5px 15px var(--primary-glow);
    flex-shrink: 0;
}

.user-info-sm {
    transition: var(--transition);
    opacity: 1;
}

.sidebar.collapsed .user-info-sm {
    opacity: 0;
    display: none;
}

.user-info-sm h6 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.user-info-sm small {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-footer .icon-btn {
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-footer .icon-btn {
    display: none;
}

/* --- MAIN CONTENT --- */

.main-content {
    /* margin-left: calc(var(--sidebar-width) + 30px); */
    margin-left: 280px;
    padding-right: 5px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.main-content.collapsed {
    margin-left: 90px;
}

/* --- HEADER --- */
.top-header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 10px;
    z-index: 900;
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px; /* Centered with 20px side margins */
    transition: var(--transition);
}

.header-bg {
    position: absolute;
    inset: 0 -20px 0 -10px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--r-xl);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    z-index: -1;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.student-header {
    gap: 1.5rem;
    
}

.back-circle {
    width: 36px;
    height: 36px;
    background: white;
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.back-circle:hover {
    transform: scale(1.1);
    color: var(--primary);
}

.header-title h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 24px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-right: 10px;
}

/* Glow Pills */

.status-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--glass-border);
    padding: 8px 18px 8px 8px;
    border-radius: 40px;
    transition: var(--transition);
    cursor: pointer;
}

.status-pill:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.status-pill-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.spi-blue {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 10px var(--primary-glow);
}

.spi-yellow {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    box-shadow: 0 4px 10px var(--secondary-glow);
}

.status-pill-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.status-pill-text small {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pill-text span {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.header-icons {
    display: flex;
    gap: 15px;
    margin: 0 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.icon-btn:hover {
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.notif-dot {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* --- PAGE CONTENT --- */

.page-content {
    padding: 30px 0 40px;
    flex-grow: 1;
}

/* Glass Cards */

.card-custom {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    box-shadow: var(--glass-shadow);
    margin-bottom: 25px;
    transition: var(--transition);
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Welcome Banner */

.welcome-banner {
    background: linear-gradient(247deg, var(--primary), var(--primary-dark));
    /*linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);*/
    padding: 40px;
    position: relative;
    /*background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.4) 100%);*/
}

.welcome-banner h2 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    color: white;
    margin: 0;
    position: relative;
    z-index: 2;
}

.welcome-banner span.emoji {
    display: inline-block;
    animation: wave 2s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0% {
        transform: rotate(0deg);
    }
    10% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    30% {
        transform: rotate(14deg);
    }
    40% {
        transform: rotate(-4deg);
    }
    50% {
        transform: rotate(10deg);
    }
    60% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.welcome-banner p {
    color: rgba(255, 255, 255, 0.8);
}

/* Stat Cards */

.stat-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    position: relative;
    z-index: 1;
    justify-content: space-between;
}

/* Enhanced Hover Animation setup */

.card-custom.stat-wrapper {
    position: relative;
    z-index: 1;
    /* Remove standard glass background to use tinted ones */
    background: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-xl);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

/* Default tinted backgrounds */

.sw-blue {
    background-color: var(--primary-light);
}

.sw-green {
    background-color: rgba(52, 211, 153, 0.08);
}

.sw-yellow {
    background-color: var(--soft-accent);
}

.sw-cyan {
    background-color: rgba(var(--primary-rgb), 0.08);
}

.card-custom.stat-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    border-radius: var(--r-xl);
    z-index: -1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Specific hover fill colors for each card type */

.sw-blue::before {
    background: linear-gradient(0deg, var(--primary-glow) 0%, var(--primary-light) 100%);
}

.sw-green::before {
    background: linear-gradient(0deg, var(--success-glow) 0%, rgba(52, 211, 153, 0.1) 100%);
}

.sw-yellow::before {
    background: linear-gradient(0deg, var(--accent-glow) 0%, var(--soft-accent) 100%);
}

.sw-cyan::before {
    background: linear-gradient(0deg, rgba(var(--primary-rgb), 0.3) 0%, rgba(var(--primary-rgb), 0.1) 100%);
}

.card-custom.stat-wrapper:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-custom.stat-wrapper:hover::before {
    height: 100%;
}

.card-custom.stat-wrapper:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 30%;
    /* Squircle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    position: relative;
    transition: var(--transition);
}

.stat-icon::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 30%;
    background: inherit;
    filter: blur(10px);
    z-index: -1;
    opacity: 0.6;
}

.si-blue {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.si-green {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
}

.si-yellow {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
}

.primary-gradient-bg {
    background: var(--primary-gradient);
}

.si-cyan {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
}

.stat-content h3 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    line-height: 1;
}

.stat-content p {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Headers */

.card-header-styled {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.4);
}

.card-header-styled h5 {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.btn-custom-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: var(--transition);
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: white;
}

.empty-state {
    padding: 60px 40px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.3);
}

/* Performance Overview */

.perf-stats-row {
    display: flex;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid var(--border-color);
}

.perf-stat {
    flex: 1;
    text-align: center;
    border-right: 1px dashed rgba(0, 0, 0, 0.1);
}

.perf-stat:last-child {
    border-right: none;
}

.perf-stat h4 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 5px;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.perf-stat:nth-child(1) h4 {
    -webkit-text-fill-color: var(--success);
}

.perf-stat:nth-child(2) h4 {
    -webkit-text-fill-color: var(--primary);
}

.perf-stat:nth-child(3) h4 {
    -webkit-text-fill-color: var(--danger);
}

.perf-stat p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Nice Styled Bar Chart */

.bar-chart-container {
    padding: 40px 50px 50px;
    height: 250px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    position: relative;
}

.bar {
    flex: 1;
    background: #e2e8f0;
    border-radius: 10px 10px 0 0;
    position: relative;
    transition: var(--transition);
}

.bar:hover {
    background: #cbd5e1;
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.bar.active {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 0 20px var(--primary-glow);
}

.bar.active:hover {
    transform: scaleY(1.05);
}

.bar-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 700;
}

.bar-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header Profile Dropdown */

.header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    margin-left: 10px;
}

.header-profile:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
}

.hp-info h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.hp-info small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.profile-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 25px;
    width: 12px;
    height: 12px;
    background: var(--glass-bg);
    border-left: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    transform: rotate(45deg);
}

.dropdown-item-custom {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--r-sm);
    transition: var(--transition);
}

.dropdown-item-custom i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.dropdown-item-custom:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
    transform: translateX(5px);
}

.dropdown-item-custom:hover i {
    color: var(--primary);
}

.dropdown-divider-custom {
    height: 1px;
    background: var(--glass-border);
    margin: 8px 0;
}

.dropdown-item-danger:hover {
    color: var(--danger);
}

.dropdown-item-danger:hover i {
    color: var(--danger);
}

/* Right Column Widgets */

.quick-actions-card {
    padding: 30px;
}

.quick-actions-card h5 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
}

.qa-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--r-md);
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.qa-btn i {
    font-size: 18px;
    color: var(--primary);
    transition: var(--transition);
}

.qa-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 15px var(--primary-glow);
    transform: translateY(-2px);
    color: var(--primary);
}

.qa-btn:hover i {
    transform: scale(1.2);
}

/* List Items */

.list-group-custom .list-item {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.4);
    transition: var(--transition);
}

.list-group-custom .list-item:hover {
    background: white;
    padding-left: 35px;
}

.list-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.li-yellow {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    box-shadow: 0 4px 10px var(--secondary-glow);
}

.li-red {
    background: linear-gradient(135deg, var(--danger), var(--danger-dark));
    box-shadow: 0 4px 10px var(--danger-glow);
}

.list-content {
    flex-grow: 1;
}

.list-content h6 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
}

.list-content p {
    margin: 5px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.list-arrow {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}

.list-item:hover .list-arrow {
    color: var(--primary);
    transform: translateX(5px);
}

/* Activity items */

.activity-item {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.activity-item:hover {
    background: white;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.activity-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-user .avatar-circle {
    width: 30px;
    height: 30px;
    font-size: 12px;
    box-shadow: none;
    font-weight: 800;
}

.activity-user span {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.activity-text {
    font-size: 14px;
    color: var(--text-muted);
    padding-left: 42px;
    margin: 0;
    line-height: 1.5;
}

/* PREMIUM TABLES */

.table-custom {
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
}

.table-custom thead th {
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border: none;
    padding: 12px 20px;
}

.table-custom tbody tr {
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    border-radius: 12px;
}

.table-custom tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
    z-index: 10;
    position: relative;
}

.table-custom td {
    border: none;
    padding: 16px 20px;
    vertical-align: middle;
}

.table-custom td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-custom td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* PREMIUM FORMS */

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    background: #f8fafc;
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* GLOBAL ANIMATIONS */

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* PREMIUM BACKGROUND */

body {
    background-color: #f1f5f9;
    background-image: radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(var(--secondary-rgb), 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Dropdown hover fixes */

/* --- Dropdown Hover Fixes --- */

.profile-dropdown-menu {
    display: block !important;
    /* Override bootstrap */
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Ignore pointer events when hidden */
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

/* The invisible bridge bridging the 15px gap so hover doesn't drop */

.profile-dropdown-menu::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.dropdown:hover .profile-dropdown-menu,
.header-profile:hover .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    /* Re-enable pointer events */
    transform: translateY(0);
}

/* REFINED BADGE STYLING */

.badge.rounded-pill {
    padding: 0.4em 0.6em;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
}

/* Specific fix for condensed circles */

.sidebar-msg-badge,
.notification-badge,
#header-msg-badge {
    aspect-ratio: 1 / 1;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    min-width: 18px !important;
    min-height: 18px !important;
    font-size: 10px !important;
    line-height: 0 !important;
}

/* Header specific tweaks for alignment */

.notification-badge,
#header-msg-badge {
    top: -2px !important;
    right: -2px !important;
    border: 1.5px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-danger {
    background-color: var(--danger) !important;
}

/* GLOBAL PRINT STYLES */


/* --- UNIVERSAL ASSET SELECTION TOGGLE --- */

.asset-toggle-container {
    background: #f1f5f9;
    border-radius: 30px;
    padding: 5px;
    display: flex;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.asset-toggle-item {
    flex: 1;
    text-align: center;
}

.asset-toggle-item input[type="radio"] {
    display: none;
}

.asset-toggle-label {
    display: block;
    padding: 10px 15px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.asset-toggle-item input[type="radio"]:checked+.asset-toggle-label {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.asset-zone {
    display: none;
    animation: fadeIn 0.3s ease;
}

.asset-zone.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Input Styling for URLs */

.url-input-group {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 5px 5px 5px 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.url-input-group:focus-within {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1);
}

.url-input-group input {
    border: none;
    background: transparent;
    padding: 10px 0;
    flex-grow: 1;
    font-weight: 600;
    outline: none;
    color: var(--text-main);
}

.url-preview-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 15px;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.2s;
}

.url-preview-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Global Loading Spinner for Buttons */

.loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.loading i {
    display: none !important;
}

.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: calc(50% - 10px);
    left: calc(50% - 10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Specific for darker buttons if needed */

.btn-light.loading::after,
.btn-link.loading::after {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}






.filter-card {

    background: white;

    border-radius: var(--r-lg);

    padding: 15px 25px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);

    border: 1px solid rgba(255, 255, 255, 0.8);

}



.search-wrapper {

    position: relative;

}



.search-wrapper i {

    position: absolute;

    left: 20px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-muted);

}



.search-input {

    width: 100%;

    background: #f8fafc;

    border: 2px solid transparent;

    padding: 16px 20px 16px 50px;

    border-radius: 30px;

    transition: var(--transition);

    font-weight: 500;

    color: var(--text-main);

}



.search-input:focus {

    border-color: var(--primary);

    background: white;

    outline: none;

    box-shadow: 0 10px 25px var(--primary-glow);

}



.custom-select {

    background: #f8fafc;

    border: 2px solid transparent;

    padding: 16px 20px;

    border-radius: 30px;

    font-weight: 500;

    color: var(--text-main);

    transition: var(--transition);

    width: 100%;

}



.custom-select:focus {

    border-color: var(--primary);

    outline: none;

    box-shadow: 0 10px 25px var(--primary-glow);

    background: white;

}

/* Course Cards */


.course-card-premium {

    background: white;

    border-radius: var(--r-xl);

    overflow: hidden;

    border: 1px solid var(--glass-border);

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);

    transition: var(--transition);

    height: 100%;

    display: flex;

    flex-direction: column;

    position: relative;

}



.course-card-premium:hover {

    transform: translateY(-10px);

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);

}



.cc-img-wrapper {

    position: relative;

    height: 220px;

    overflow: hidden;

}



.cc-img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    transition: transform 0.8s ease;

}



.course-card-premium:hover .cc-img {

    transform: scale(1.08);

}



.cc-overlay {

    position: absolute;

    bottom: 0;

    left: 0;

    right: 0;

    height: 80px;

    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);

    z-index: 1;

}



.cc-live-badge {

    position: absolute;

    top: 20px;

    left: 20px;

    background: var(--primary);

    color: white;

    padding: 6px 14px;

    border-radius: 30px;

    font-weight: 800;

    font-size: 11px;

    letter-spacing: 0.5px;

    z-index: 2;

    text-transform: uppercase;

    box-shadow: 0 4px 12px var(--primary-glow);

}



.cc-progress-badge {

    position: absolute;

    top: 20px;

    right: 20px;

    background: rgba(255, 255, 255, 0.9);

    padding: 8px 16px;

    border-radius: 30px;

    font-weight: 800;

    font-size: 14px;

    z-index: 2;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    display: flex;

    align-items: center;

    gap: 6px;

    color: #1e293b;

}



.cc-progress-badge i { color: var(--primary); }



.cc-gender-badge {

    position: absolute;

    bottom: 20px;

    left: 20px;

    background: rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(10px);

    padding: 6px 14px;

    border-radius: 30px;

    font-weight: 700;

    font-size: 12px;

    color: #1e293b;

    z-index: 2;

    display: flex;

    align-items: center;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    border: 1px solid rgba(255, 255, 255, 0.5);

}



.cc-gender-badge i.fa-mars { color: #3b82f6; } /* Blue for Boys */

.cc-gender-badge i.fa-venus { color: #ec4899; } /* Pink for Girls */

.cc-gender-badge i.fa-venus-mars { color: #8b5cf6; } /* Purple for Co-Ed */



.cc-body {

    padding: 24px 30px 30px;

    flex-grow: 1;

    display: flex;

    flex-direction: column;

}



.cc-category {

    font-size: 13px;

    font-weight: 800;

    color: #4b5563;

    letter-spacing: 1px;

    text-transform: uppercase;

    margin-bottom: 8px;

    opacity: 0.8;

}



.cc-title {

    font-family: var(--font-display);

    font-size: 24px;

    font-weight: 800;

    color: #1a202c;

    margin-bottom: 12px;

    line-height: 1.2;

}



.cc-desc {

    color: var(--text-muted);

    font-size: 15px;

    line-height: 1.5;

    margin-bottom: 20px;

    opacity: 0.9;

}



/* Schedule List */

.cc-schedule-list {

    display: flex;

    flex-direction: column;

    gap: 10px;

    margin-bottom: 24px;

}



.cc-schedule-item {

    display: flex;

    flex-direction: row;

    justify-content: space-between;

    align-items: baseline;

    gap: 12px;

    width: 100%;

}

.cc-schedule-days {

    font-weight: 700;

    font-size: 13px;

    color: #1e293b;

    text-transform: lowercase;

}

.cc-schedule-times {

    font-size: 13px;

    font-weight: 500;

    color: #64748b;

    white-space: nowrap;

}



.cc-day-badge {

    background: #f8fafc;

    color: #1e293b;

    padding: 4px 12px;

    border-radius: 8px;

    font-weight: 700;

    font-size: 13px;

    min-width: 45px;

    text-align: center;

}



.cc-time-range {

    color: #64748b;

    font-size: 14px;

    font-weight: 500;

    letter-spacing: 0.2px;

}



.cc-day-range-text {

    background: #f1f5f9;

    color: #1e293b;

    padding: 6px 12px;

    border-radius: 8px;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: -0.2px;

}



.cc-divider {

    height: 1px;

    background: #f1f5f9;

    margin-bottom: 20px;

}



/* Teacher Info */

.cc-teacher-box {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 30px;

}



.cc-avatar-wrap {

    width: 48px;

    height: 48px;

    border-radius: 12px;

    background: var(--primary);

    display: flex;

    align-items: center;

    justify-content: center;

    color: white;

    font-weight: 800;

    font-size: 18px;

    overflow: hidden;

}



.cc-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }



.cc-teacher-name {

    font-weight: 700;

    color: #1e293b;

    font-size: 16px;

    margin-bottom: 2px;

}



.cc-teacher-role {

    font-size: 14px;

    color: #64748b;

}



/* Progress Section */

.cc-footer {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: auto;

}



.cc-progress-section {

    flex-grow: 1;

    margin-right: 20px;

}



.cc-progress-label {

    font-size: 11px;

    font-weight: 800;

    color: #64748b;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    margin-bottom: 8px;

}



.progress-thin {

    height: 6px;

    border-radius: 10px;

    background: #eff6ff;

}



.progress-thin .progress-bar {

    background: var(--primary-gradient);

    border-radius: 10px;

}



.progress-thin .progress-bar.bg-warning {

    background: linear-gradient(90deg, #f6d365, #fda085) !important;

}



.progress-thin .progress-bar.bg-danger {

    background: linear-gradient(90deg, #ff0844, #ffb199) !important;

}



.cc-btn-enter {

    background: var(--primary-gradient);

    color: white;

    border: none;

    padding: 12px 24px;

    border-radius: 30px;

    font-weight: 700;

    display: flex;

    align-items: center;

    gap: 10px;

    transition: all 0.3s ease;

    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);

}



.cc-btn-enter:hover {

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);

    color: white;

}



.cc-meta-item {

    display: flex;

    align-items: center;

    gap: 8px;

    color: var(--text-muted);

    font-weight: 600;

    font-size: 14px;

}



.cc-meta-item i {

    color: var(--primary);

    font-size: 16px;

    width: 20px;

    text-align: center;

}



.btn-premium {

    /*width: 100%;*/

    padding: 14px;

    border-radius: 25px;

    font-weight: 700;

    font-size: 15px;

    font-family: var(--font-display);

    transition: var(--transition);

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    border: 2px solid transparent;

}



.bp-outline {

    background: transparent;

    border-color: var(--primary);

    color: var(--primary);

}



.course-card-premium:hover .bp-outline {

    background: linear-gradient(135deg, var(--primary), var(--primary-dark));

    color: white;

    box-shadow: 0 10px 25px var(--primary-glow);

    border-color: transparent;

}



.bp-disabled {

    background: #f1f5f9;

    color: #94a3b8;

    cursor: not-allowed;

    border-color: #e2e8f0;

}



.card-disabled .cc-img {

    filter: grayscale(100%);

    opacity: 0.7;

}


/* --- RESPONSIVE OVERRIDES (Sorted Bottom) --- */

@media print {
    .sidebar, .staff-sidebar, .top-header, .header-bg, .btn, .icon-btn { display: none !important; }
    .main-content { margin-left: 0 !important; width: 100% !important; }
    body { background: white !important; -webkit-print-color-adjust: exact; }
}

@media (max-width: 1399px) {
    .student-header { gap: 15px; }
    .header-profile { margin-left: 0; }
}

@media (max-width: 1314px) {
    .course-card-premium .cc-body { padding: 24px 20px 30px !important; }
    .course-card-premium .cc-footer { flex-direction: column !important; gap: 20px 0 !important; align-items: flex-start !important; }
    .course-card-premium .cc-progress-section { width: 100% !important; margin-right: 0 !important; margin-bottom: 15px !important; }
    .course-card-premium .cc-btn-enter { justify-content: center !important; width: 100% !important; }
}

@media (max-width: 1199px) {
    .main-content { margin-left: 280px; }
    .stat-card { flex-direction: column; text-align: center; }
}

@media (max-width: 991.98px) {
    .sidebar { left: -285px; height: 100vh; position: fixed; box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1); border-radius: 0; }
    .sidebar.show { left: 0; }
    .main-content { margin-left: 0 !important; }
    .top-header { width: 100%; margin: 0 0 20px 0; padding: 0 15px; height: auto; min-height: 80px; top: 0; }
    .header-bg { inset: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
    .header-title h4 { font-size: 18px; }
    .mobile-toggle-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: white; border-radius: 12px; cursor: pointer; z-index: 1100; margin-right: 15px; }
}

@media (max-width: 575px) {
    .header-profile { padding: 6px 0 6px 6px; }
}

/* --- PORTAL SYNC OVERLAY (Premium Glass Modal) --- */
#portalSyncOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    z-index: 10000;
    display: none; /* Controlled by JS fadeIn/fadeOut */
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.sync-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    text-align: center;
    border: 1px solid white;
    max-width: 400px;
    width: 90%;
    transform: scale(1);
    animation: syncPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes syncPop {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.sync-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f1f5f9;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Refinement for Dashboard */
.alert-warning.premium-alert {
    background: #fff8eb !important;
    border: 1px solid rgba(var(--secondary-rgb), 0.1) !important;
    border-radius: 24px !important;
}

.alert-warning.premium-alert .icon-circle {
    background: #fef3c7 !important;
    color: var(--secondary) !important;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(var(--secondary-rgb), 0.15);
}

/* Login / auth flash messages (login.php — shared with portal token fallbacks) */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    line-height: 1.45;
}

.login-alert i {
    flex-shrink: 0;
    margin-top: 0.12rem;
}

.login-alert-success {
    background: var(--status-success-bg, #d1fae5);
    color: var(--status-success-text, #059669);
    border-color: rgba(5, 150, 105, 0.22);
}

.login-alert-success i {
    color: var(--emerald-600, #059669);
}

.login-alert-error {
    background: var(--status-danger-bg, #fee2e2);
    color: var(--status-danger-text, #dc2626);
    border-color: rgba(220, 38, 38, 0.2);
}

.login-alert-error i {
    color: var(--red-600, #dc2626);
}

@media (max-width: 400px){
    .childSwitcher {
        display: none;
    }
}


