﻿:root {

    /* Ocean Blue - Default Theme */

    --color-primary: #0ea5e9;

    --color-primary-50: #eff6ff;

    --color-primary-100: #dbeafe;

    --color-primary-200: #bfdbfe;

    --color-primary-300: #93c5fd;

    --color-primary-400: #60a5fa;

    --color-primary-500: #0ea5e9;

    --color-primary-600: #0284c7;

    --color-primary-700: #0369a1;

    --color-primary-800: #075985;

    --color-primary-900: #0c4a6e;

    --color-sidebar: #0f172a;

    --color-sidebar-hover: #1e293b;

    --color-sidebar-active: rgba(14, 165, 233, 0.15);

    --color-sidebar-text: #94a3b8;

    --color-header: #ffffff;

    --color-header-text: #1e293b;

}



[data-theme="emerald"] {

    --color-primary: #10b981;

    --color-primary-50: #ecfdf5;

    --color-primary-100: #d1fae5;

    --color-primary-200: #a7f3d0;

    --color-primary-300: #6ee7b7;

    --color-primary-400: #34d399;

    --color-primary-500: #10b981;

    --color-primary-600: #059669;

    --color-primary-700: #047857;

    --color-primary-800: #065f46;

    --color-primary-900: #064e3b;

    --color-sidebar: #064e3b;

    --color-sidebar-hover: #065f46;

    --color-sidebar-active: rgba(16, 185, 129, 0.15);

    --color-sidebar-text: #a7f3d0;

    --color-header: #ffffff;

    --color-header-text: #064e3b;

}



[data-theme="purple"] {

    --color-primary: #8b5cf6;

    --color-primary-50: #f5f3ff;

    --color-primary-100: #ede9fe;

    --color-primary-200: #ddd6fe;

    --color-primary-300: #c4b5fd;

    --color-primary-400: #a78bfa;

    --color-primary-500: #8b5cf6;

    --color-primary-600: #7c3aed;

    --color-primary-700: #6d28d9;

    --color-primary-800: #5b21b6;

    --color-primary-900: #4c1d95;

    --color-sidebar: #2e1065;

    --color-sidebar-hover: #3b0764;

    --color-sidebar-active: rgba(139, 92, 246, 0.15);

    --color-sidebar-text: #c4b5fd;

    --color-header: #ffffff;

    --color-header-text: #2e1065;

}



[data-theme="sunset"] {

    --color-primary: #f97316;

    --color-primary-50: #fff7ed;

    --color-primary-100: #ffedd5;

    --color-primary-200: #fed7aa;

    --color-primary-300: #fdba74;

    --color-primary-400: #fb923c;

    --color-primary-500: #f97316;

    --color-primary-600: #ea580c;

    --color-primary-700: #c2410c;

    --color-primary-800: #9a3412;

    --color-primary-900: #7c2d12;

    --color-sidebar: #431407;

    --color-sidebar-hover: #581c0c;

    --color-sidebar-active: rgba(249, 115, 22, 0.15);

    --color-sidebar-text: #fdba74;

    --color-header: #ffffff;

    --color-header-text: #431407;

}



[data-theme="ruby"] {

    --color-primary: #ef4444;

    --color-primary-50: #fef2f2;

    --color-primary-100: #fee2e2;

    --color-primary-200: #fecaca;

    --color-primary-300: #fca5a5;

    --color-primary-400: #f87171;

    --color-primary-500: #ef4444;

    --color-primary-600: #dc2626;

    --color-primary-700: #b91c1c;

    --color-primary-800: #991b1b;

    --color-primary-900: #7f1d1d;

    --color-sidebar: #450a0a;

    --color-sidebar-hover: #581c1c;

    --color-sidebar-active: rgba(239, 68, 68, 0.15);

    --color-sidebar-text: #fca5a5;

    --color-header: #ffffff;

    --color-header-text: #450a0a;

}



[data-theme="teal"] {

    --color-primary: #14b8a6;

    --color-primary-50: #f0fdfa;

    --color-primary-100: #ccfbf1;

    --color-primary-200: #99f6e4;

    --color-primary-300: #5eead4;

    --color-primary-400: #2dd4bf;

    --color-primary-500: #14b8a6;

    --color-primary-600: #0d9488;

    --color-primary-700: #0f766e;

    --color-primary-800: #115e59;

    --color-primary-900: #134e4a;

    --color-sidebar: #042f2e;

    --color-sidebar-hover: #074a44;

    --color-sidebar-active: rgba(20, 184, 166, 0.15);

    --color-sidebar-text: #5eead4;

    --color-header: #ffffff;

    --color-header-text: #042f2e;

}



[data-theme="indigo"] {

    --color-primary: #4f46e5;

    --color-primary-50: #eef2ff;

    --color-primary-100: #e0e7ff;

    --color-primary-200: #c7d2fe;

    --color-primary-300: #a5b4fc;

    --color-primary-400: #818cf8;

    --color-primary-500: #4f46e5;

    --color-primary-600: #4338ca;

    --color-primary-700: #3730a3;

    --color-primary-800: #312e81;

    --color-primary-900: #1e1b4b;

    --color-sidebar: #1e1b4b;

    --color-sidebar-hover: #28255c;

    --color-sidebar-active: rgba(79, 70, 229, 0.15);

    --color-sidebar-text: #a5b4fc;

    --color-header: #ffffff;

    --color-header-text: #1e1b4b;

}



[data-theme="rose"] {

    --color-primary: #f43f5e;

    --color-primary-50: #fff1f2;

    --color-primary-100: #ffe4e6;

    --color-primary-200: #fecdd3;

    --color-primary-300: #fda4af;

    --color-primary-400: #fb7185;

    --color-primary-500: #f43f5e;

    --color-primary-600: #e11d48;

    --color-primary-700: #be123c;

    --color-primary-800: #9f1239;

    --color-primary-900: #881337;

    --color-sidebar: #4c0519;

    --color-sidebar-hover: #5f1125;

    --color-sidebar-active: rgba(244, 63, 94, 0.15);

    --color-sidebar-text: #fda4af;

    --color-header: #ffffff;

    --color-header-text: #4c0519;

}



[data-theme="amber"] {

    --color-primary: #f59e0b;

    --color-primary-50: #fffbeb;

    --color-primary-100: #fef3c7;

    --color-primary-200: #fde68a;

    --color-primary-300: #fcd34d;

    --color-primary-400: #fbbf24;

    --color-primary-500: #f59e0b;

    --color-primary-600: #d97706;

    --color-primary-700: #b45309;

    --color-primary-800: #92400e;

    --color-primary-900: #78350f;

    --color-sidebar: #422006;

    --color-sidebar-hover: #542e08;

    --color-sidebar-active: rgba(245, 158, 11, 0.15);

    --color-sidebar-text: #fcd34d;

    --color-header: #ffffff;

    --color-header-text: #422006;

}



[data-theme="slate"] {

    --color-primary: #64748b;

    --color-primary-50: #f8fafc;

    --color-primary-100: #f1f5f9;

    --color-primary-200: #e2e8f0;

    --color-primary-300: #cbd5e1;

    --color-primary-400: #94a3b8;

    --color-primary-500: #64748b;

    --color-primary-600: #475569;

    --color-primary-700: #334155;

    --color-primary-800: #1e293b;

    --color-primary-900: #0f172a;

    --color-sidebar: #0f172a;

    --color-sidebar-hover: #1e293b;

    --color-sidebar-active: rgba(100, 116, 139, 0.15);

    --color-sidebar-text: #94a3b8;

    --color-header: #ffffff;

    --color-header-text: #0f172a;

}



/* Base Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Inter', sans-serif; background: #f8fafc; }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table-responsive .data-table { min-width: 700px; }

body.app-authenticated { background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 120px); }



/* Sidebar */

.app-sidebar { box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12); }

#sidebar { transition: all 0.3s ease; }

#sidebar.sidebar-collapsed { transform: translateX(-100%); }

/* Main Content (base rules — moved here so they come BEFORE the mobile
   media query below; otherwise the unconditional rule further down the
   file would win the cascade tie-break and cancel the mobile override) */

.main-content { margin-left: 256px; transition: all 0.3s ease; }

.main-content.expanded { margin-left: 0; }

@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); z-index: 40; }
  #sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .sidebar-toggle-btn { background: var(--color-primary) !important; color: #fff !important; border-color: var(--color-primary) !important; }
  .top-header, .app-header { display: flex !important; }
}

.sidebar-brand {

    display: flex; align-items: center; gap: 12px;

    padding: 0 24px; height: 64px;

    border-bottom: 1px solid rgba(255,255,255,0.08);

}

.sidebar-brand-logo {

    width: 40px; height: 40px; border-radius: 12px;

    background: var(--color-primary);

    display: flex; align-items: center; justify-content: center;

    color: #fff; font-size: 18px;

    box-shadow: 0 4px 12px rgba(0,0,0,0.2);

}

.nav-item { transition: all 0.2s ease; position: relative; }

.nav-item:hover { background: var(--color-sidebar-hover); color: #fff !important; }

.nav-item.nav-active { background: var(--color-sidebar-active); color: var(--color-primary) !important; }

.nav-item.nav-active::before {

    content: ''; position: absolute; left: -4px; top: 50%; transform: translateY(-50%);

    width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--color-primary);

}

.nav-item i { width: 20px; text-align: center; }



/* Top Header */

.top-header, .app-header {

    background: rgba(255,255,255,0.92);

    backdrop-filter: blur(12px);

    border-bottom: 1px solid #e2e8f0;

    position: sticky; top: 0; z-index: 20;

    padding: 0 24px; height: 64px;

    display: flex; align-items: center; justify-content: space-between;

}

.breadcrumb-nav #breadcrumb { color: var(--color-primary); font-weight: 600; }

.sidebar-toggle-btn { padding: 8px 10px !important; border-radius: 10px !important; color: var(--color-primary) !important; border-color: var(--color-primary) !important; background: #fff; }

.notif-btn { position: relative; padding: 8px 10px !important; border-radius: 10px !important; }

.notif-badge {

    position: absolute; top: 2px; right: 2px; width: 16px; height: 16px;

    border-radius: 50%; background: #ef4444; color: #fff; font-size: 10px;

    display: flex; align-items: center; justify-content: center; font-weight: 600;

}

.header-user {

    display: flex; align-items: center; gap: 12px;

    padding-left: 16px; border-left: 1px solid #e2e8f0;

}

.header-avatar-wrap { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--color-primary-200); }

.header-user-name { font-size: 14px; font-weight: 600; color: #0f172a; }

.header-user-role { font-size: 12px; color: #94a3b8; text-transform: capitalize; }

.page-main { padding: 28px 32px; max-width: 1400px; }



/* Cards */

.stat-card {

    background: white;

    border-radius: 16px;

    padding: 24px;

    transition: all 0.3s ease;

    border: 1px solid #e2e8f0;

}

.stat-card:hover {

    transform: translateY(-4px);

    box-shadow: 0 12px 24px rgba(0,0,0,0.08);

}

.stat-icon {

    width: 48px; height: 48px;

    border-radius: 12px;

    display: flex; align-items: center; justify-content: center;

    font-size: 20px;

}



/* Tables */

.data-table { width: 100%; border-collapse: collapse; }

.data-table th {

    padding: 12px 16px; text-align: left; font-size: 12px;

    font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;

    color: #64748b; background: #f8fafc; border-bottom: 2px solid #e2e8f0;

}

.data-table td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }

.data-table tr:hover td { background: #f8fafc; }



/* Buttons */

.btn {

    display: inline-flex; align-items: center; gap: 8px;

    padding: 10px 20px; border-radius: 10px; font-size: 14px;

    font-weight: 500; transition: all 0.2s ease; cursor: pointer;

    border: none; text-decoration: none;

}

.btn-primary { background: var(--color-primary); color: #fff; }

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--color-primary-rgb, 14 165 233) / 0.3); }

.btn-outline { border: 1px solid #e2e8f0; background: white; color: #475569; }

.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

.btn-danger { background: #ef4444; color: #fff; }

.btn-danger:hover { background: #dc2626; }

.btn-success { background: #10b981; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

.btn-lg { padding: 14px 28px; font-size: 16px; }



/* Forms */

.form-input {

    width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0;

    border-radius: 10px; font-size: 14px; transition: all 0.2s ease;

    background: #fff; outline: none;

}

.form-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 10%, transparent); }

.form-label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px; }

.form-group { margin-bottom: 20px; }

select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }



/* Badges */

.badge {

    display: inline-flex; align-items: center; padding: 4px 12px;

    border-radius: 20px; font-size: 12px; font-weight: 500;

}

.badge-success { background: #d1fae5; color: #065f46; }

.badge-warning { background: #fef3c7; color: #92400e; }

.badge-danger { background: #fee2e2; color: #991b1b; }

.badge-info { background: #dbeafe; color: #1e40af; }

.badge-gray { background: #f1f5f9; color: #475569; }



/* Modal */

.modal-overlay {

    position: fixed; inset: 0; background: rgba(0,0,0,0.5);

    backdrop-filter: blur(4px); z-index: 50;

    display: flex; align-items: center; justify-content: center;

    opacity: 0; visibility: hidden; transition: all 0.3s ease;

}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {

    background: white; border-radius: 16px; padding: 0;

    width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto;

    transform: scale(0.9); transition: all 0.3s ease;

}

.modal-overlay.active .modal-content { transform: scale(1); }

.modal-content.modal-wide { max-width: 900px; }

.modal-header { padding: 20px 24px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; }

.modal-body { padding: 24px; }

.modal-footer { padding: 16px 24px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 12px; }



/* Alerts */

.alert {

    padding: 14px 18px; border-radius: 12px; display: flex; align-items: center; gap: 12px;

    font-size: 14px; margin-bottom: 16px;

}

.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }



/* Progress Bar */

.progress-bar {

    height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden;

}

.progress-fill {

    height: 100%; border-radius: 4px; transition: width 0.5s ease;

    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-400));

}



/* Scrollbar */

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

::-webkit-scrollbar-thumb:hover { background: #94a3b8; }



/* Page Header */

.page-header { margin-bottom: 24px; }

.page-header h1 { font-size: 24px; font-weight: 700; color: #0f172a; }

.page-header p { color: #64748b; font-size: 14px; margin-top: 4px; }



/* Stats Grid */

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }



/* Section Card */

.section-card {

    background: white; border-radius: 16px; border: 1px solid #e2e8f0;

    margin-bottom: 24px;

}

.section-card .card-header {

    padding: 16px 24px; border-bottom: 1px solid #e2e8f0;

    display: flex; align-items: center; justify-content: space-between;

}

.section-card .card-header h3 { font-size: 16px; font-weight: 600; color: #0f172a; }

.section-card .card-body { padding: 24px; }



/* Tabs */

.tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 24px; gap: 0; }

.tab {

    padding: 12px 24px; font-size: 14px; font-weight: 500; color: #64748b;

    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;

    transition: all 0.2s ease; background: none; border-top: 0; border-left: 0; border-right: 0;

}

.tab:hover { color: #334155; }

.tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }



/* Empty State */

.empty-state { text-align: center; padding: 60px 20px; }

.empty-state i { font-size: 64px; color: #cbd5e1; margin-bottom: 16px; }

.empty-state h3 { font-size: 20px; color: #334155; margin-bottom: 8px; }

.empty-state p { color: #64748b; max-width: 400px; margin: 0 auto 20px; }



/* Animations */

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.animate-slide-up { animation: slideUp 0.4s ease forwards; }



/* Toast Notifications */

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }

.toast {

    padding: 14px 20px; border-radius: 12px; display: flex; align-items: center; gap: 12px;

    font-size: 14px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.12);

    animation: slideInRight 0.3s ease; max-width: 400px;

}

.toast-success { background: #10b981; color: #fff; }

.toast-error { background: #ef4444; color: #fff; }

.toast-info { background: var(--color-primary); color: #fff; }

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }



/* Loading */

.loading-spinner {

    width: 40px; height: 40px; border: 3px solid #e2e8f0;

    border-top-color: var(--color-primary); border-radius: 50%;

    animation: spin 0.6s linear infinite; margin: 40px auto;

}

@keyframes spin { to { transform: rotate(360deg); } }



/* Theme selector */

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }

.theme-option {

    padding: 16px; border-radius: 12px; cursor: pointer; transition: all 0.2s;

    text-align: center; border: 3px solid transparent; font-size: 12px; color: #fff; font-weight: 500;

}

.theme-option:hover { transform: scale(1.05); }

.theme-option.active { border-color: #fff; box-shadow: 0 0 0 3px var(--color-primary); }



.color-swatch { display:inline-block; width:24px; height:24px; border-radius:4px; vertical-align:middle; margin:0 2px; border:2px solid rgba(0,0,0,0.1); }



/* Tooltip */

[data-tooltip] { position: relative; }

[data-tooltip]::after {

    content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%;

    transform: translateX(-50%); background: #0f172a; color: #fff;

    padding: 6px 12px; border-radius: 6px; font-size: 12px; white-space: nowrap;

    opacity: 0; visibility: hidden; transition: all 0.2s; margin-bottom: 6px;

}

[data-tooltip]:hover::after { opacity: 1; visibility: visible; }



/* Filter Bar */

.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }

.filter-bar .form-input { width: auto; min-width: 180px; }



/* Dropdown */

.dropdown { position: relative; display: inline-block; }

.dropdown-menu {

    position: absolute; top: 100%; right: 0; margin-top: 4px;

    background: white; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);

    border: 1px solid #e2e8f0; min-width: 200px; z-index: 30;

    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all 0.2s;

}

.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-item {

    display: flex; align-items: center; gap: 10px; padding: 10px 16px;

    font-size: 14px; color: #334155; cursor: pointer; transition: background 0.2s;

    text-decoration: none;

}

.dropdown-item:hover { background: #f8fafc; }

.dropdown-item:first-child { border-radius: 12px 12px 0 0; }

.dropdown-item:last-child { border-radius: 0 0 12px 12px; }

.dropdown-divider { height: 1px; background: #e2e8f0; margin: 4px 0; }



/* Avatars */

.avatar-img {

    width: 36px; height: 36px; border-radius: 50%;

    object-fit: cover; flex-shrink: 0;

    border: 2px solid var(--color-primary-100);

}

.avatar-header { width: 100%; height: 100%; border: none; }

.user-cell { display: flex; align-items: center; gap: 10px; }



/* Login */

.login-layout { display: flex; min-height: 100vh; }

.login-hero {

    flex: 1.2; position: relative; background-size: cover; background-position: center;

    display: none;

}

@media (min-width: 992px) { .login-hero { display: block; } }

.login-hero-overlay {

    position: absolute; inset: 0;

    background: linear-gradient(135deg, rgba(15,23,42,0.92) 0%, rgba(30,58,138,0.75) 100%);

}

.login-hero-text {

    position: relative; z-index: 1; padding: 48px; max-width: 520px;

    color: #fff; height: 100%; display: flex; flex-direction: column; justify-content: center;

}

.login-brand {

    display: inline-flex; align-items: center; gap: 10px;

    font-size: 18px; font-weight: 700; margin-bottom: 24px;

    padding: 8px 16px; border-radius: 12px;

    background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);

}

.login-hero-text h2 { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }

.login-hero-text p { font-size: 16px; color: rgba(255,255,255,0.85); line-height: 1.6; }

.login-hero-thumbs {

    display: flex; gap: 12px; margin-top: 32px;

}

.login-hero-thumbs img {

    width: 96px; height: 72px; object-fit: cover; border-radius: 10px;

    border: 2px solid rgba(255,255,255,0.35); box-shadow: 0 8px 20px rgba(0,0,0,0.25);

    background: rgba(255,255,255,0.08);

}

.login-hero-thumbs img[src=""], .hero-img:not([src]) { display: none; }

.login-panel {

    flex: 1; display: flex; align-items: center; justify-content: center;

    padding: 32px 24px;

    background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);

}

.login-card {

    background: #fff; border-radius: 24px; padding: 40px 36px;

    width: 100%; max-width: 420px;

    box-shadow: 0 24px 48px rgba(15,23,42,0.08), 0 0 0 1px rgba(15,23,42,0.04);

}

.login-card-header { text-align: center; margin-bottom: 28px; }

.login-logo {

    width: 56px; height: 56px; border-radius: 16px;

    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-700));

    color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center;

    margin: 0 auto 16px; box-shadow: 0 8px 20px color-mix(in srgb, var(--color-primary) 35%, transparent);

}

.login-card-header h1 { font-size: 26px; font-weight: 700; color: #0f172a; }

.login-card-header p { color: #64748b; font-size: 14px; margin-top: 6px; }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.input-with-icon { position: relative; }

.input-with-icon i {

    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);

    color: #94a3b8; font-size: 14px; pointer-events: none;

}

.input-with-icon .form-input { padding-left: 42px; padding-right: 14px; padding-top: 12px; padding-bottom: 12px; }

.password-toggle { pointer-events: auto !important; }

.password-field-wrap {

    display: flex;

    align-items: stretch;

    gap: 0;

}

.password-field-wrap .input-with-icon { flex: 1; }

.password-field-wrap .input-with-icon .form-input {

    border-radius: 10px 0 0 10px;

    padding-right: 14px;

}

.password-toggle-btn {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 48px;

    min-width: 48px;

    border: 1px solid #e2e8f0;

    border-left: none;

    border-radius: 0 10px 10px 0;

    background: #f8fafc;

    color: #64748b;

    cursor: pointer;

    transition: all .2s;

    font-size: 16px;

    padding: 0;

    outline: none;

}

.password-toggle-btn:hover { background: #f1f5f9; color: var(--color-primary); }

.password-toggle-btn:focus-visible { box-shadow: 0 0 0 2px var(--color-primary); }

.login-options { font-size: 14px; color: #64748b; }

.login-remember { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.btn-login { width: 100%; justify-content: center; padding: 14px; font-size: 16px; border-radius: 12px; }

.login-error { color: #dc2626; font-size: 14px; text-align: center; margin-top: 12px; padding: 10px; background: #fef2f2; border-radius: 10px; }

.login-hint { font-size: 12px; color: #94a3b8; text-align: center; margin-top: 20px; }



/* Dashboard hero */

.dashboard-hero {

    display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;

    background: linear-gradient(135deg, #fff 0%, var(--color-primary-50) 100%);

    border: 1px solid #e2e8f0; border-radius: 20px;

    padding: 28px 32px; margin-bottom: 28px;

    box-shadow: 0 4px 24px rgba(15,23,42,0.04);

    overflow: hidden;

}

.dashboard-hero-badge {

    display: inline-flex; align-items: center; gap: 8px;

    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;

    color: var(--color-primary-700); background: var(--color-primary-100);

    padding: 6px 12px; border-radius: 20px; margin-bottom: 12px;

}

.dashboard-hero-content h1 { font-size: 28px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }

.dashboard-hero-content p { color: #64748b; font-size: 15px; max-width: 480px; }

.dashboard-hero-gallery { display: flex; gap: 12px; align-items: flex-end; }

.hero-img { border-radius: 14px; object-fit: cover; box-shadow: 0 12px 28px rgba(15,23,42,0.15); }

.hero-img-main { width: 200px; height: 140px; }

.hero-img-secondary { width: 120px; height: 100px; margin-bottom: 8px; }

.dashboard-grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }

@media (max-width: 900px) {

    .dashboard-hero { grid-template-columns: 1fr; }

    .dashboard-hero-gallery { display: none; }

    .dashboard-grid-2 { grid-template-columns: 1fr; }

}





/* Stat cards modern */

.stat-card-modern { position: relative; overflow: hidden; }

.stat-card-modern::before {

    content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px;

    border-radius: 0 0 0 80px; opacity: 0.08; background: var(--color-primary);

}

.stat-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.stat-card-modern .stat-icon {

    background: var(--color-primary-50); color: var(--color-primary);

}

.stat-value { font-size: 28px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }

.stat-label { color: #64748b; font-size: 14px; }

.stat-blue .stat-icon { background: #dbeafe; color: #2563eb; }

.stat-emerald .stat-icon { background: #d1fae5; color: #059669; }

.stat-purple .stat-icon { background: #ede9fe; color: #7c3aed; }

.stat-amber .stat-icon { background: #fef3c7; color: #d97706; }

.stat-rose .stat-icon { background: #ffe4e6; color: #e11d48; }

.stat-cyan .stat-icon { background: #cffafe; color: #0891b2; }



/* Feature showcase */

.feature-showcase {

    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;

}

@media (max-width: 900px) { .feature-showcase { grid-template-columns: 1fr; } }

.feature-showcase-item {

    background: #fff; border-radius: 16px; border: 1px solid #e2e8f0;

    overflow: hidden; transition: transform 0.25s, box-shadow 0.25s;

}

.feature-showcase-item:hover {

    transform: translateY(-4px);

    box-shadow: 0 16px 32px rgba(15,23,42,0.08);

}

.feature-showcase-item img {

    width: 100%; height: 140px; object-fit: cover;

}

.feature-showcase-item div { padding: 16px 20px 20px; }

.feature-showcase-item h4 { font-size: 15px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }

.feature-showcase-item p { font-size: 13px; color: #64748b; line-height: 1.5; }



/* Teacher cards */

.teacher-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }

.profile-grid > div { padding: 12px; background: #f8fafc; border-radius: 8px; }

.profile-grid strong { display: block; font-size: 11px; text-transform: uppercase; color: #64748b; letter-spacing: 0.5px; margin-bottom: 4px; }

.profile-grid p { margin: 0; font-size: 15px; color: #0f172a; }

.teacher-card {

    padding: 24px 20px; border-radius: 16px; border: 1px solid #e2e8f0;

    background: #fff; text-align: center; transition: box-shadow 0.2s, transform 0.2s;

}

.teacher-card:hover { box-shadow: 0 12px 28px rgba(15,23,42,0.08); transform: translateY(-2px); }

.teacher-card-photo {

    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;

    margin: 0 auto 14px; border: 3px solid var(--color-primary-100);

}



/* Branding logos */

.brand-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }

.sidebar-brand-logo .brand-logo-img { max-width: 36px; max-height: 36px; }

.login-logo .brand-logo-img { max-width: 48px; max-height: 48px; margin: 0 auto; }

.login-brand { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.brand-logo-inline { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }



/* Settings & branding admin */

.settings-tabs { margin-bottom: 0; }

.settings-panel { display: none; margin-bottom: 20px; }

.settings-panel.active { display: block; animation: fadeIn 0.25s ease; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 720px; }

.settings-grid .form-group.full { grid-column: 1 / -1; }

@media (max-width: 640px) { .settings-grid { grid-template-columns: 1fr; } }

.settings-save-bar {

    position: sticky; bottom: 0; background: #fff; border: 1px solid #e2e8f0;

    border-radius: 16px; padding: 20px 24px; margin-top: 8px;

    box-shadow: 0 -4px 24px rgba(15,23,42,0.06);

}

.settings-save-hint { font-size: 13px; color: #94a3b8; margin-top: 10px; }

.branding-upload-grid {

    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;

}

.branding-upload-card {

    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px;

}

.branding-preview-wrap {

    height: 130px; border-radius: 10px; overflow: hidden; background: #e2e8f0;

    margin: 10px 0; display: flex; align-items: center; justify-content: center;

}

.branding-preview { width: 100%; height: 100%; object-fit: cover; }

.branding-preview-wrap.logo-preview { background: #fff; }

.branding-preview-wrap.logo-preview .branding-preview { object-fit: contain; padding: 8px; }

.branding-upload-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.branding-file-input { font-size: 12px; margin-bottom: 8px; width: 100%; }



/* Grading system presets */

.grading-preset-section {

    margin-top: 24px; padding: 20px; background: #f8fafc;

    border: 1px solid #e2e8f0; border-radius: 14px;

}

.grading-preset-title { font-size: 15px; font-weight: 600; color: #0f172a; margin-bottom: 6px; }

.grading-preset-desc { font-size: 13px; color: #64748b; margin-bottom: 14px; }

.grading-preset-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }

.grading-preset-btns .gs-preset-btn.active {

    border-color: var(--color-primary); background: var(--color-primary-50);

    color: var(--color-primary-700); font-weight: 600;

}

.grading-custom-row { margin-top: 8px; }

.grading-custom-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }

.grading-interval-count { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }



/* Scroll-to-top/bottom button */

.scroll-btn {

    position: fixed; bottom: 24px; right: 24px; z-index: 999;

    width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--color-primary-300, #93c5fd);

    background: linear-gradient(135deg, var(--color-primary-500, #0ea5e9), var(--color-primary-700, #0369a1));

    color: #fff;

    font-size: 18px; cursor: pointer;

    box-shadow: 0 4px 20px rgba(0,0,0,.3), 0 0 0 0 rgba(14,165,233,0);

    display: flex; align-items: center; justify-content: center;

    transition: transform .2s, box-shadow .2s;

}

.scroll-btn:hover { transform: scale(1.15); box-shadow: 0 6px 28px rgba(0,0,0,.35), 0 0 0 4px var(--color-primary-200, #bfdbfe); }



/* Sidebar scroll float button */

.sidebar-float-btn {

    position: fixed; bottom: 80px; left: 238px; z-index: 999;

    width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--color-primary-300, #93c5fd);

    background: linear-gradient(135deg, var(--color-sidebar, #0f172a), var(--color-sidebar-hover, #1e293b));

    color: #fff;

    font-size: 12px; cursor: pointer;

    box-shadow: 0 3px 14px rgba(0,0,0,.25);

    display: flex; align-items: center; justify-content: center;

    transition: transform .2s, box-shadow .2s, left .3s ease;

}

#sidebar.sidebar-collapsed ~ .main-content .sidebar-float-btn { left: 24px; }

.sidebar-float-btn:hover { transform: scale(1.15); box-shadow: 0 5px 22px rgba(0,0,0,.3), 0 0 0 4px var(--color-primary-200, #bfdbfe); }


/* Keep page navigation tabs visible on phones */
@media (max-width: 768px) {
  .tabs, .settings-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: thin;
  }
  .tabs .tab, .settings-tabs .tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
