/* ========================================
   FPT POLYTECHNIC MODERN DESIGN SYSTEM
   Complete UI Refresh - Premium Edition
   ======================================== */

/* ========================================
   CSS VARIABLES & DESIGN TOKENS
   ======================================== */

:root {
    /* Typography */
    --font-display: 'Sora', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;

    /* Brand Colors */
    --fpt-orange: #f26a21;
    --fpt-orange-dark: #c94b12;
    --fpt-orange-light: #fff0e7;
    --fpt-blue: #2346a0;
    --fpt-blue-light: #e8eefc;
    --fpt-green: #35a752;
    --edu-ink: #17324d;
    --edu-surface: #fffaf5;
    --edu-paper: #ffffff;
    --edu-line: #e7dccf;
    --edu-mint: #0f9f8c;
    --edu-mint-light: #e4f7f4;

    /* Modern Accent Colors */
    --accent-success: #10b981;
    --accent-success-light: #d1fae5;
    --accent-danger: #ef4444;
    --accent-danger-light: #fee2e2;
    --accent-warning: #f59e0b;
    --accent-warning-light: #fef3c7;
    --accent-info: #3b82f6;
    --accent-info-light: #dbeafe;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 64px;

    /* Shadows — slate-tinted, calmer */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 8px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 20px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.1), 0 8px 16px -4px rgba(15, 23, 42, 0.04);

    /* Glassmorphism */
    --glass-bg: #ffffff;
    --glass-border: var(--gray-200);
    --glass-blur: none;

    /* Border Radius — standardized ascending scale */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

:root[data-theme="dark"] {
    --fpt-orange: #ff7a2f;
    --fpt-orange-dark: #ff9a5f;
    --fpt-orange-light: rgba(255, 122, 47, 0.16);
    --fpt-blue: #8fb4ff;
    --fpt-blue-light: rgba(143, 180, 255, 0.16);
    --fpt-green: #4cc06a;
    --edu-ink: #f3f7fb;
    --edu-surface: #0f172a;
    --edu-paper: #162033;
    --edu-line: #2c3a51;
    --edu-mint: #47d5c6;
    --edu-mint-light: rgba(71, 213, 198, 0.16);
    --gray-50: #111827;
    --gray-100: #182235;
    --gray-200: #263449;
    --gray-300: #34445c;
    --gray-400: #94a3b8;
    --gray-500: #b6c2d2;
    --gray-600: #cbd5e1;
    --gray-700: #dbe6f3;
    --gray-800: #edf3fa;
    --gray-900: #ffffff;
    --accent-success-light: rgba(16, 185, 129, 0.17);
    --accent-danger-light: rgba(239, 68, 68, 0.17);
    --accent-warning-light: rgba(245, 158, 11, 0.18);
    --accent-info-light: rgba(59, 130, 246, 0.18);
    --glass-bg: #162033;
    --glass-border: #2c3a51;
}

* {
    box-sizing: border-box;
    font-family: var(--font-body);
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: var(--edu-surface);
    color: var(--gray-800);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.header-title,
.modal-title {
    font-family: var(--font-display);
}

/* Sora reads tighter at display sizes; balance avoids orphaned words in Vietnamese headings. */
h1,
h2,
h3,
.page-title,
.header-title {
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* Grade tables and stat blocks align digits in columns. */
.table,
.stat-value {
    font-variant-numeric: tabular-nums;
}

/* ========================================
   SIDEBAR - GLASSMORPHISM DESIGN
   ======================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: var(--edu-paper);
    border-right: 1px solid var(--glass-border);
    overflow-y: auto;
    overflow-x: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
}

.sidebar>* {
    position: relative;
    z-index: 2;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
    z-index: 900;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header img {
    width: 80px;
    transition: width var(--transition-normal);
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-nav-title {
    display: none;
}

.sidebar-header {
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
    position: relative;
    background: var(--edu-paper);
}

.sidebar-header .logo {
    width: 160px;
    max-width: 100%;
    height: 80px;
    object-fit: contain;
    display: inline-block;
    padding: 0.35rem 0.75rem;
}

.sidebar-header .logo:hover {
    transform: scale(1.02);
}

.sidebar-nav {
    padding: 1.25rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav-title {
    margin: 0 0.45rem 0.35rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fpt-orange-dark);
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
}

.nav-item:hover {
     color: var(--fpt-orange-dark);
     background-color: var(--gray-100);
}

.nav-item.active {
    color: var(--fpt-orange-dark);
    font-weight: 600;
    background-color: var(--fpt-orange-light);
    box-shadow: inset 3px 0 0 var(--fpt-orange);
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all var(--transition-normal);
}

.nav-item:hover i {
    color: var(--fpt-orange-dark);
}

.nav-item.active i {
    color: var(--fpt-orange-dark);
}

.nav-item span {
    transition: opacity var(--transition-normal);
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-item::before,
.sidebar.collapsed .nav-item::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .tab-content.active {
        animation: none;
    }
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-height: 100dvh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ========================================
   TOP HEADER - PREMIUM DESIGN
   ======================================== */

.top-header {
    min-height: var(--header-height);
    background: var(--edu-paper);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

/* FPT tri-color identity strip (orange / blue / green from the FPT logo). */
.top-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--fpt-orange) 0%,
            var(--fpt-orange) 46%,
            var(--fpt-blue) 46%,
            var(--fpt-blue) 73%,
            var(--fpt-green) 73%,
            var(--fpt-green) 100%);
    pointer-events: none;
}

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

.header-logo img {
    height: 30px;
    width: auto;
}

.btn-toggle-sidebar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.9) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    box-shadow: var(--shadow-xs);
}

.btn-toggle-sidebar:hover {
    background: var(--fpt-orange-light);
    color: var(--fpt-orange-dark);
    border-color: rgba(255, 108, 0, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0;
}

.header-title i {
    color: var(--fpt-orange);
}

.header-subtitle {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.theme-mode-switch {
    min-width: 116px;
    height: 40px;
    padding: 4px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    background: var(--edu-paper);
    color: var(--edu-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-xs);
}

.theme-mode-switch:hover {
    border-color: var(--fpt-orange);
    color: var(--fpt-orange-dark);
}

.theme-toggle-btn.theme-mode-option {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.theme-mode-switch i {
    font-size: 0.9rem;
}

.theme-mode-option {
    min-width: 52px;
    height: 30px;
    padding: 0 0.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--gray-500);
    transition: all var(--transition-fast);
}

.theme-mode-switch.is-light .theme-mode-light,
.theme-mode-switch.is-dark .theme-mode-dark,
.theme-mode-option.active {
    background: var(--fpt-orange);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.theme-mode-switch.is-dark .theme-mode-light,
.theme-mode-switch.is-light .theme-mode-dark {
    opacity: 0.78;
}

.header-right>.btn {
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-right>.btn:hover {
    background: var(--gray-100);
}

.header-right .badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.4rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* User Profile Button */
.user-profile-btn {
    border-radius: var(--radius-full);
    padding: 0.25rem 0.75rem 0.25rem 0.25rem !important;
    background-color: var(--edu-paper);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
}

.user-profile-btn:hover {
    background-color: var(--gray-50);
}

.user-profile-btn .user-name {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* Dropdown */
.dropdown-menu {
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 0.5rem;
    min-width: 240px;
    box-shadow: var(--shadow-md);
    background-color: var(--edu-paper);
    animation: dropdownFadeIn 0.2s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    margin-bottom: 0.25rem;
}

.dropdown-item {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--gray-100);
}

.dropdown-item i {
    width: 20px;
    transition: transform var(--transition-bounce);
}

.dropdown-item:hover i {
    transform: scale(1.15);
}

/* ========================================
   MOBILE BOTTOM NAVIGATION
   ======================================== */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    display: flex;
    justify-content: space-around;
    padding: 0.45rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.6rem 0.85rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    transition: all var(--transition-normal);
    border-radius: 14px;
    position: relative;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: all var(--transition-normal);
}

.mobile-nav-item i {
    font-size: 1.375rem;
    transition: all var(--transition-bounce);
}

.mobile-nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--fpt-orange) 0%, var(--fpt-orange-dark) 100%);
    box-shadow: 0 10px 20px rgba(255, 108, 0, 0.35);
}

.mobile-nav-item.active::before {
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.2);
}

.mobile-nav-item.active i {
    transform: scale(1.05) translateY(-2px);
    color: white;
}

.mobile-nav-item:hover {
    color: var(--fpt-orange-dark);
    background: rgba(255, 108, 0, 0.12);
}

/* ========================================
   PAGE CONTENT
   ======================================== */

.page-content {
    padding: 1.75rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: contentFadeIn 0.4s ease-out;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title i {
    color: var(--fpt-orange);
}

/* ========================================
   CARDS - MODERN DESIGN
   ======================================== */

.card {
    background: var(--edu-paper);
    border: 1px solid var(--edu-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-normal);
    /* overflow: hidden removed to allow sticky positioning in tables */
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--edu-line);
    background: var(--edu-surface);
}

.card-body {
    padding: 1.25rem;
}

/* ========================================
   UPLOAD SECTION - ENHANCED
   ======================================== */

.upload-section {
    background-color: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-section:hover {
    border-color: var(--fpt-orange);
    background-color: var(--gray-100);
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1;
}

input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 1.25rem;
    color: var(--fpt-orange);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* ========================================
   WEIGHTS GRID
   ======================================== */

.weights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.875rem;
}

.weight-item {
    background: linear-gradient(135deg, white 0%, var(--gray-50) 100%);
    padding: 1rem 1.125rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weight-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--fpt-orange-light);
}

/* ========================================
   STATISTICS CARDS - PREMIUM DESIGN
   ======================================== */

.stat-card {
    background: var(--edu-paper);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    box-shadow: var(--shadow-md), inset 0 3px 0 var(--fpt-orange);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    transition: all var(--transition-bounce);
    position: relative;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
}

.stat-card .stat-icon.bg-primary {
    background: var(--fpt-orange-light) !important;
}

.stat-card .stat-icon.bg-success {
    background: var(--accent-success-light) !important;
}

.stat-card .stat-icon.bg-danger {
    background: var(--accent-danger-light) !important;
}

.stat-card .stat-icon.bg-warning {
    background: var(--accent-warning-light) !important;
}

.stat-card .stat-icon.bg-info {
    background: var(--accent-info-light) !important;
}

.stat-card h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--fpt-orange) 0%, var(--fpt-orange-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
}

.stat-card p {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0;
    letter-spacing: 0.01em;
}

/* ========================================
   TABLE - MODERN DESIGN
   ======================================== */

.table {
    border-radius: var(--radius-lg);
    /* overflow: hidden removed to allow sticky positioning */
}

.table thead {
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    border: none;
    padding: 1rem 1.25rem;
    white-space: nowrap;
}

.table tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

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

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--gray-700);
}

.pass {
    background: linear-gradient(135deg, var(--accent-success-light) 0%, rgba(209, 250, 229, 0.5) 100%) !important;
}

.fail {
    background: linear-gradient(135deg, var(--accent-danger-light) 0%, rgba(254, 226, 226, 0.5) 100%) !important;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    letter-spacing: 0.01em;
}

.badge-pass {
    background-color: var(--accent-success-light);
    color: #047857;
}

.badge-fail {
    background-color: var(--accent-danger-light);
    color: #b91c1c;
}

/* ========================================
   BUTTONS - PREMIUM DESIGN
   ======================================== */

.btn {
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    letter-spacing: 0.01em;
}

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

.btn-primary {
    background-color: var(--fpt-orange);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--fpt-orange-dark);
}

.btn-outline-primary {
    border: 1px solid var(--fpt-orange);
    color: var(--fpt-orange);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--fpt-orange-light);
    color: var(--fpt-orange-dark);
}

.btn-success {
    background-color: var(--accent-success);
    color: white;
    border: none;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-outline-success {
    border: 1px solid var(--accent-success);
    color: var(--accent-success);
}

.btn-outline-success:hover {
    background-color: var(--accent-success-light);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* ========================================
   FORM CONTROLS - MODERN
   ======================================== */

.form-control,
.form-select {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--gray-200);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all var(--transition-normal);
    background-color: var(--edu-paper);
    color: var(--edu-ink);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fpt-orange);
    box-shadow: 0 0 0 4px rgba(255, 108, 0, 0.12);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ========================================
   MODAL - PREMIUM DESIGN
   ======================================== */

.modal-backdrop {
    backdrop-filter: var(--glass-blur);
}

.modal-content {
    border-radius: var(--radius-xl);
    border: none;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

/* FPT tri-color strip on modal top, matching the header identity. */
.modal-content::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg,
            var(--fpt-orange) 0%,
            var(--fpt-orange) 46%,
            var(--fpt-blue) 46%,
            var(--fpt-blue) 73%,
            var(--fpt-green) 73%,
            var(--fpt-green) 100%);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    border-bottom: 1px solid var(--edu-line);
    padding: 1.25rem 1.5rem;
    background-color: var(--edu-surface);
}

.modal-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    background-color: var(--gray-50);
}

.btn-close {
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
    background-color: var(--gray-100);
}

/* ========================================
   WEIGHT EDITOR - ENHANCED
   ======================================== */

.weight-editor {
    background-color: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius-lg);
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid var(--gray-200);
}

.weight-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
    background: var(--edu-paper);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
}

.weight-row:hover {
    border-color: var(--fpt-orange);
}

.weight-row:last-child {
    margin-bottom: 0;
}

.weight-row input {
    width: 100%;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    border: 1.5px solid var(--gray-200);
    padding: 0.625rem 0.875rem;
    transition: all var(--transition-fast);
}

.weight-row input:focus {
    border-color: var(--fpt-orange);
    box-shadow: 0 0 0 3px rgba(255, 108, 0, 0.1);
    outline: none;
}

.weight-row input::placeholder {
    color: var(--gray-400);
    font-size: 0.8125rem;
}

.weight-row button {
    border-radius: var(--radius-md);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background-color: var(--accent-danger);
    color: white;
    transition: all var(--transition-normal);
}

.weight-row button:hover {
    background-color: #b91c1c;
}

.weight-row button i {
    font-size: 1rem;
}

.weight-row.student-contact-row {
    grid-template-columns: minmax(120px, 1fr) minmax(170px, 1.2fr) minmax(140px, 1fr) minmax(220px, 1.2fr) auto;
}

/* ========================================
   PROFILE & CLASS CARDS - PREMIUM
   ======================================== */

.profile-card,
.class-card {
    background: var(--edu-paper);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-normal);
    height: 100%;
}

.profile-card:hover,
.class-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--fpt-orange-light);
}

/* ========================================
   ALERT ENHANCEMENTS
   ======================================== */

.alert {
    border-radius: var(--radius-md);
    border: none;
    font-weight: 500;
    padding: 1rem 1.25rem;
}

.alert-info {
    background-color: var(--accent-info-light);
    color: var(--accent-info);
}

.alert-warning {
    background-color: var(--accent-warning-light);
    color: #b45309;
}

.alert-success {
    background-color: var(--accent-success-light);
    color: #047857;
}

.alert-danger {
    background-color: var(--accent-danger-light);
    color: #b91c1c;
}

/* ========================================
   UTILITIES
   ======================================== */

.hidden {
    display: none !important;
}

.results-section {
    margin-top: 2rem;
    animation: contentFadeIn 0.4s ease-out;
}

/* Loading Spinner Enhancement */
.spinner-border {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* ========================================
   SCROLLBAR - CUSTOM DESIGN
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gray-300), var(--gray-400));
    border-radius: var(--radius-full);
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gray-400), var(--gray-500));
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        width: min(84vw, 300px);
        transform: translateX(-108%);
        background: #f3f4f6;
        border-right: 1px solid var(--gray-200);
        box-shadow: none;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .sidebar-header {
        padding: 1.1rem 1rem 0.85rem;
        background: transparent;
        border-bottom: none;
        text-align: left;
    }

    .sidebar-header .logo {
        width: 136px;
        height: 68px;
        padding: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .sidebar-nav {
        padding: 0.55rem 0.7rem 1rem;
        gap: 0.45rem;
    }

    .sidebar-nav-title {
        margin: 0 0.45rem 0.4rem;
    }

    .nav-item {
        padding: 0.9rem 0.95rem;
        border-radius: 13px;
        gap: 0.8rem;
        font-size: 1.03rem;
        font-weight: 600;
        color: #374151;
    }

    .nav-item i {
        font-size: 1.18rem;
        color: #6b7280;
    }

    .nav-item.active {
        background: #efd9c8;
        color: #d5662c;
    }

    .nav-item.active i {
        color: #d5662c;
    }

    .btn-toggle-sidebar {
        display: inline-flex !important;
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

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

    .page-content {
        padding: 1rem;
        padding-bottom: 1rem;
    }

    .top-header {
        padding: 0.75rem 1rem;
    }

    .header-title {
        font-size: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }

    .stat-card .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .table {
        font-size: 0.8125rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .page-title {
        font-size: 1.375rem;
    }

    .upload-section {
        padding: 2rem 1.5rem;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-content {
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 576px) {
    .weights-grid {
        grid-template-columns: 1fr;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .btn-group.keep-horizontal-mobile {
        flex-direction: row;
    }

    .btn-group.keep-horizontal-mobile .btn {
        width: auto;
    }

    .weight-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .weight-row button {
        justify-self: end;
    }
}

@media (max-width: 430px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-footer {
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* ========================================
   GRADES TABLE - ENHANCED
   ======================================== */

#gradesTable {
    font-size: 0.875rem;
}

#gradesTable thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    color: var(--gray-700);
    z-index: 10;
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
}

input.grade-input {
    width: 70px !important;
    padding: 0.375rem 0.5rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

#gradesTable input.grade-input:focus {
    border-color: var(--fpt-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 108, 0, 0.12);
}

input.grade-input.is-invalid,
#gradesTable input.grade-input.is-invalid {
    border-color: var(--accent-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

#gradesTable .total-score {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--fpt-orange), var(--fpt-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#gradesTable .status-pass {
    color: var(--accent-success);
    font-weight: 600;
}

#gradesTable .status-fail {
    color: var(--accent-danger);
    font-weight: 600;
}

.grade-column-header {
    min-width: 90px;
    text-align: center;
}

/* ========================================
   ADDITIONAL UTILITY ANIMATIONS
   ======================================== */

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg,
            var(--gray-100) 25%,
            var(--gray-50) 50%,
            var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--fpt-orange);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--fpt-orange-light);
    color: var(--fpt-orange-dark);
}

#gradeSearchInput {
    padding: 12px 16px;
    border-radius: 8px;
}

/* ========================================
   CLASS NOTE BOARD (AUTODRAW-LIKE)
   ======================================== */

.class-note-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.class-note-topbar .card-body {
    padding: 0.9rem 1rem;
}

.class-note-topbar-info {
    min-width: 220px;
}

.class-note-title-icon {
    color: var(--fpt-orange);
}

.class-note-topbar-actions {
    justify-content: flex-end;
}

.class-note-workspace {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 1rem;
    min-height: calc(100vh - 220px);
}

.class-note-toolbar {
    border-radius: 16px;
    background: var(--edu-surface);
    border: 1px solid var(--edu-line) !important;
}

.class-note-toolbar .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.class-note-tool-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.class-note-tool-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--fpt-orange-dark);
}

.class-note-tool-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.class-note-tool-btn {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: #ffffff;
    color: var(--gray-700);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.12rem;
    padding: 0.42rem 0.15rem;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.class-note-tool-btn span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-note-tool-btn i {
    font-size: 1.05rem;
}

.class-note-tool-btn:hover {
    border-color: var(--fpt-orange);
    color: var(--fpt-orange-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.class-note-tool-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: none;
}

.class-note-tool-btn.active {
    background: var(--fpt-orange);
    border-color: var(--fpt-orange-dark);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(242, 106, 33, 0.32);
}

.class-note-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.class-note-control-group .form-control-color {
    width: 100%;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
}

.class-note-swatches {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}

.class-note-swatch {
    width: 100%;
    height: 22px;
    padding: 0;
    border: 2px solid #ffffff;
    outline: 1px solid var(--gray-300);
    border-radius: 7px;
    background: var(--swatch-color, #1f2937);
    cursor: pointer;
    transition: transform var(--transition-fast), outline-color var(--transition-fast);
}

.class-note-swatch:hover {
    transform: scale(1.1);
}

.class-note-swatch:active {
    transform: scale(0.92);
}

.class-note-swatch.active {
    outline: 2px solid var(--fpt-orange);
    outline-offset: 1px;
}

.class-note-control-group .form-range {
    cursor: pointer;
}

.class-note-canvas-stage {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.class-note-canvas-wrap {
    background:
        radial-gradient(rgba(242, 106, 33, 0.16) 1px, transparent 1.5px) 0 0 / 22px 22px,
        linear-gradient(160deg, #24466e, #17324d);
    border-radius: 18px;
    padding: 1rem;
    min-height: 68vh;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(11, 25, 40, 0.35);
}

#noteCanvas {
    width: 100%;
    height: 100%;
    min-height: 66vh;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #d8dde3;
    box-shadow:
        inset 0 0 0 1px rgba(15, 23, 42, 0.03),
        0 10px 24px rgba(15, 23, 42, 0.22);
}

.class-note-inline-text-editor {
    position: absolute;
    z-index: 15;
    border: 1px dashed #5ea7ff;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.35rem 0.45rem;
    line-height: 1.25;
    resize: both;
    outline: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.class-note-inline-text-editor:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.class-note-status {
    border-radius: 10px;
    padding: 0.45rem 0.7rem;
    background: var(--edu-surface);
    border-left: 3px solid var(--fpt-orange);
    color: var(--gray-600);
    font-size: 0.82rem;
}

.class-note-status--success {
    color: #166534;
    background: #dcfce7;
    border-left-color: #16a34a;
}

.class-note-status--warning {
    color: #92400e;
    background: #fef3c7;
    border-left-color: #f59e0b;
}

.class-note-status--error {
    color: #b91c1c;
    background: #fee2e2;
    border-left-color: #ef4444;
}

.class-note-presenting .class-note-topbar,
.class-note-presenting .class-note-status {
    display: none !important;
}

.class-note-presenting.class-note-page {
    position: fixed;
    inset: 0;
    z-index: 2200;
    margin: 0;
    padding: 0 !important;
    background: linear-gradient(160deg, #24466e, #142c44);
}

.class-note-presenting .class-note-workspace {
    grid-template-columns: 128px minmax(0, 1fr);
    min-height: 100vh;
    gap: 0.75rem;
    padding: 0.75rem;
}

.class-note-presenting .class-note-canvas-wrap {
    border-radius: 14px;
    min-height: calc(100vh - 1.5rem);
    padding: 0.75rem;
}

.class-note-presenting #noteCanvas {
    min-height: calc(100vh - 3rem);
    border-radius: 10px;
}

@media (max-width: 992px) {
    .class-note-presenting .class-note-workspace {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 0.55rem;
    }

    .class-note-presenting .class-note-canvas-wrap {
        min-height: calc(100vh - 10rem);
        padding: 0.6rem;
    }

    .class-note-presenting #noteCanvas {
        min-height: calc(100vh - 11.2rem);
    }
}

@media (max-width: 992px) {
    .class-note-workspace {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 240px);
    }

    .class-note-toolbar .card-body {
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
        overflow-x: auto;
    }

    .class-note-tool-section {
        flex: 0 0 auto;
    }

    .class-note-tool-group {
        display: flex;
        flex-direction: row;
        gap: 0.45rem;
    }

    .class-note-tool-btn {
        min-width: 64px;
    }

    .class-note-control-group {
        min-width: 150px;
        flex: 0 0 auto;
    }

    .class-note-swatches {
        grid-template-columns: repeat(6, 24px);
    }
}

@media (max-width: 768px) {
    .class-note-topbar .card-body {
        padding: 0.75rem;
    }

    .class-note-topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .class-note-topbar-actions .btn {
        flex: 1 1 145px;
    }

    .class-note-canvas-wrap {
        min-height: 62vh;
        padding: 0.7rem;
    }

    #noteCanvas {
        min-height: 60vh;
    }
}

@media (max-width: 430px) {
    .class-note-page {
        gap: 0.7rem;
    }

    .class-note-workspace {
        min-height: calc(100vh - 260px);
    }

    .class-note-topbar-actions .btn {
        flex: 1 1 100%;
    }

    .class-note-toolbar .card-body {
        padding: 0.55rem;
    }

    .class-note-tool-btn {
        min-width: 64px;
        font-size: 0.68rem;
    }
}

/* ========================================
   BRANDING PAGE
   ======================================== */

.branding-page {
    max-width: 1320px;
}

.branding-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border: 1px solid var(--edu-line);
    border-left: 5px solid var(--fpt-orange);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 85% 12%, rgba(15, 159, 140, 0.13), transparent 28%),
        linear-gradient(135deg, rgba(255, 250, 245, 0.98), rgba(255, 255, 255, 0.92));
    box-shadow: 0 14px 34px rgba(23, 50, 77, 0.08);
}

.branding-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    color: var(--fpt-orange-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.branding-hero h1 {
    color: var(--edu-ink);
    font-family: var(--font-display);
    font-weight: 800;
}

.branding-hero-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.58rem 0.8rem;
    border: 1px solid rgba(15, 159, 140, 0.28);
    border-radius: 999px;
    background: rgba(15, 159, 140, 0.1);
    color: #0c766a;
    font-size: 0.78rem;
    font-weight: 800;
}

.branding-control-card,
.branding-preview-card {
    border: 1px solid var(--edu-line) !important;
    border-radius: var(--radius-lg) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    overflow: hidden;
}

.branding-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.branding-section-header h2 {
    margin: 0;
    color: var(--edu-ink);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
}

.branding-section-header p {
    margin: 0.18rem 0 0;
    color: var(--gray-500);
    font-size: 0.82rem;
}

.branding-upload-zone {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1.5px dashed #ffc49d;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 240, 231, 0.82), rgba(232, 238, 252, 0.5)),
        #ffffff;
    cursor: pointer;
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.branding-upload-zone:hover,
.branding-upload-zone.is-dragging {
    border-color: var(--fpt-orange);
    box-shadow: 0 18px 38px rgba(242, 106, 33, 0.13);
    transform: translateY(-1px);
}

.branding-upload-preview {
    width: 86px;
    height: 72px;
    border: 1px solid rgba(23, 50, 77, 0.08);
    border-radius: 8px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(45deg, rgba(23, 50, 77, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(23, 50, 77, 0.04) 25%, transparent 25%),
        #ffffff;
    background-size: 16px 16px;
    overflow: hidden;
}

.branding-upload-preview img {
    max-width: 74px;
    max-height: 58px;
    object-fit: contain;
}

.branding-upload-copy {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.branding-upload-copy strong {
    color: var(--edu-ink);
    font-size: 0.94rem;
}

.branding-upload-copy small {
    color: var(--gray-500);
    font-weight: 600;
}

.branding-upload-action {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--fpt-orange);
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 10px 22px rgba(242, 106, 33, 0.22);
}

.branding-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
    gap: 1rem;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    transform: translateY(-50%);
    color: var(--fpt-orange);
    pointer-events: none;
}

.input-with-icon .form-control {
    padding-left: 2.35rem;
}

.branding-color-control {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 0.65rem;
}

.branding-page .form-control-color {
    width: 100%;
    height: 44px;
    padding: 0.25rem;
    cursor: pointer;
}

.branding-live-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.branding-live-strip>div {
    min-width: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid #eadfd5;
    border-radius: 8px;
    background: #fffaf5;
}

.branding-live-strip span,
.branding-live-strip strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branding-live-strip span {
    color: var(--gray-500);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.branding-live-strip strong {
    margin-top: 0.2rem;
    color: var(--edu-ink);
    font-size: 0.88rem;
}

.branding-status {
    display: none;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    background: #f3f4f6;
    color: var(--gray-600);
}

.branding-status:not(:empty) {
    display: block;
}

.branding-status--success {
    color: #166534;
    background: #dcfce7;
}

.branding-status--warning {
    color: #92400e;
    background: #fef3c7;
}

.branding-status--error {
    color: #b91c1c;
    background: #fee2e2;
}

.branding-preview {
    --branding-preview-color: #FF6C00;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--edu-line);
    box-shadow: 0 18px 42px rgba(23, 50, 77, 0.12);
}

.branding-preview-header {
    min-height: 180px;
    padding: 1.4rem 1.1rem;
    text-align: center;
    color: #ffffff;
    display: grid;
    place-items: center;
    align-content: center;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 24%),
        linear-gradient(135deg, var(--branding-preview-color) 0%, #17324d 145%);
}

.branding-preview-logo-shell {
    min-width: 116px;
    max-width: 210px;
    min-height: 58px;
    margin-bottom: 0.85rem;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.branding-preview-header img {
    max-width: 180px;
    max-height: 72px;
    object-fit: contain;
}

.branding-preview-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.branding-preview-header p {
    margin: 0;
    opacity: 0.92;
}

.branding-preview-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem;
}

.branding-preview-body div {
    min-width: 0;
    padding: 0.7rem;
    border-radius: 8px;
    background: #f8fafc;
}

.branding-preview-body span,
.branding-preview-body strong {
    display: block;
}

.branding-preview-body span {
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.branding-preview-body strong {
    color: var(--edu-ink);
}

.branding-preview-body button {
    border: 0;
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    background: var(--branding-preview-color);
    color: #ffffff;
    font-weight: 800;
}

/* ========================================
   EDU CARE UI REFRESH
   ======================================== */

.page-content {
    position: relative;
}

.edu-page {
    max-width: 1480px;
    margin: 0 auto;
}

.edu-page>.row:first-child,
.student-care-page>.d-flex:first-child {
    background:
        linear-gradient(135deg, rgba(255, 250, 245, 0.96), rgba(255, 255, 255, 0.9)),
        linear-gradient(90deg, rgba(242, 106, 33, 0.14), rgba(35, 70, 160, 0.12));
    border: 1px solid var(--edu-line);
    border-left: 5px solid var(--fpt-orange);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.2rem;
    box-shadow: 0 14px 34px rgba(23, 50, 77, 0.08);
}

.edu-page>.row:first-child {
    margin-left: 0;
    margin-right: 0;
}

.edu-page h1,
.edu-page .h3 {
    color: var(--edu-ink);
    font-weight: 800;
}

.edu-page h1 i,
.edu-page .h3 i {
    color: var(--fpt-orange) !important;
}

.top-header {
    background: rgba(255, 250, 245, 0.96);
    box-shadow: 0 10px 26px rgba(23, 50, 77, 0.07);
}

.header-title {
    color: var(--edu-ink);
}

.sidebar {
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 46%, #f5f8fb 100%);
}

.sidebar-header {
    background: transparent;
}

.nav-item {
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(242, 106, 33, 0.08);
    border-color: rgba(242, 106, 33, 0.18);
}

.nav-item.active {
    background: #fff0e7;
    border-color: #ffd6bd;
    box-shadow: inset 3px 0 0 var(--fpt-orange);
}

.card,
.profile-card,
.class-card {
    border-color: var(--edu-line) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 12px 30px rgba(23, 50, 77, 0.07) !important;
}

.card:hover,
.profile-card:hover,
.class-card:hover {
    border-color: #ffc49d !important;
    box-shadow: 0 18px 42px rgba(23, 50, 77, 0.1) !important;
}

.stat-card,
.care-stat-card {
    text-align: left;
    border-left: 4px solid var(--fpt-orange);
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

.stat-card .stat-icon {
    margin: 0 0 1rem;
    border-radius: 8px;
}

.stat-card h3,
.care-stat-card .fs-3 {
    color: var(--edu-ink);
    background: none;
    -webkit-text-fill-color: currentColor;
}

.care-stat-card-primary {
    border-left-color: var(--fpt-blue);
}

.care-stat-card-warning {
    border-left-color: var(--accent-warning);
}

.care-stat-card-danger {
    border-left-color: var(--accent-danger);
}

.table-responsive {
    border-radius: var(--radius-lg);
}

.table thead {
    background: #fff6ef;
    border-bottom: 2px solid #f6d9c4;
}

.table thead th {
    color: var(--edu-ink);
    border-bottom: 1px solid var(--edu-line);
}

.table tbody tr:hover {
    background-color: #fffaf5;
}

.badge-pass {
    background: var(--edu-mint-light);
    color: #0c766a;
}

.badge-fail {
    background: #ffe8e5;
    color: #b42318;
}

.btn {
    min-height: 38px;
}

.btn-primary,
.btn-success {
    box-shadow: 0 8px 18px rgba(242, 106, 33, 0.18);
}

.btn-primary {
    background: var(--fpt-orange);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--fpt-orange-dark);
}

.btn-outline-primary {
    border-color: #f7a270;
    color: var(--fpt-orange-dark);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: #fff0e7;
    border-color: var(--fpt-orange);
    color: var(--fpt-orange-dark);
}

.form-control,
.form-select {
    border-color: #dfd5ca;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--fpt-orange);
    box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.12);
}

.class-tabs-container {
    background: #fff8f2 !important;
    border: 1px solid var(--edu-line);
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 24px rgba(23, 50, 77, 0.06) !important;
}

.class-tab {
    border-radius: 6px !important;
    color: #6b5d50 !important;
}

.class-tab:hover {
    background: #ffeadb !important;
}

.class-tab.active {
    color: var(--fpt-orange-dark) !important;
    box-shadow: 0 8px 18px rgba(242, 106, 33, 0.12) !important;
}

.tab-count,
.class-tab.active .tab-count {
    background: var(--fpt-orange) !important;
}

.tab-count.archived,
.class-tab.active .tab-count.archived {
    background: #718096 !important;
}

.classes-grid {
    gap: 18px !important;
}

.classes-grid .class-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%) !important;
    overflow: hidden;
    position: relative;
}

.classes-grid .class-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--fpt-orange), var(--edu-mint), var(--fpt-blue));
}

.class-card [data-role="card-header"] {
    padding-top: 1.35rem !important;
}

.class-card [data-role="student-count"] {
    background:
        linear-gradient(135deg, rgba(242, 106, 33, 0.08), rgba(15, 159, 140, 0.08)) !important;
    border: 1px solid #f4dfcd;
    border-radius: 8px !important;
}

.class-card [data-role="student-count"]>div:first-child {
    color: var(--fpt-orange-dark) !important;
}

.class-card [data-role="student-preview"] {
    min-height: 136px !important;
}

.class-card [data-role="student-preview"]>div {
    color: #334155 !important;
}

.class-card [data-role="card-actions"] {
    background: rgba(255, 250, 245, 0.7) !important;
}

.class-card button[onclick^="viewClassDetails"],
.profile-card button[onclick^="editProfile"] {
    background: var(--fpt-orange) !important;
    box-shadow: 0 8px 18px rgba(242, 106, 33, 0.18) !important;
}

.class-card button[onclick^="viewClassDetails"]:hover,
.profile-card button[onclick^="editProfile"]:hover {
    background: var(--fpt-orange-dark) !important;
}

.profile-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    position: relative;
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--fpt-blue), var(--edu-mint), var(--fpt-orange));
}

.profile-card>div:first-child {
    background: transparent !important;
    padding-top: 1.35rem !important;
}

.profile-card>div:nth-child(2) {
    background: #f2f7fb !important;
}

.profile-card span[style*="background: #2563EB"] {
    background: var(--fpt-blue) !important;
}

.profile-card button[onclick^="duplicateProfile"] {
    background: #ffffff !important;
    border-color: #d8e2ea !important;
}

.dashboard-page .btn-group,
.care-table-card .card-header,
.class-detail-filter-row {
    background: #fffaf5;
    border-radius: var(--radius-lg);
}

.dashboard-page .btn-group {
    border: 1px solid var(--edu-line);
    padding: 0.25rem;
}

.dashboard-page .btn-group .btn {
    border-radius: 6px !important;
    border-width: 0;
}

.dashboard-page .btn-check:checked+.btn {
    box-shadow: 0 6px 14px rgba(23, 50, 77, 0.1);
}

.dashboard-page {
    font-size: 0.9rem;
}

.dashboard-hero {
    align-items: stretch !important;
    background: rgba(255, 253, 249, 0.8);
    border: 1px solid var(--edu-line);
    border-left: 4px solid var(--fpt-orange);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.dashboard-hero h1 {
    font-size: 1.25rem;
    line-height: 1.2;
}

.dashboard-hero p {
    font-size: 0.82rem;
}

.dashboard-hero .form-label {
    font-size: 0.72rem;
}

.dashboard-hero .form-select {
    min-height: 38px;
    padding-bottom: 0.45rem;
    padding-top: 0.45rem;
}

.dashboard-stats-row .stat-card {
    align-items: center;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 86px;
    padding: 0.8rem 1rem;
    text-align: left;
}

.dashboard-stats-row .stat-card .stat-icon {
    border-radius: 8px;
    font-size: 1rem;
    height: 42px;
    margin: 0;
    width: 42px;
}

.dashboard-stats-row .stat-card h3 {
    font-size: 1.35rem;
    line-height: 1.1;
    margin: 0 0 0.15rem;
}

.dashboard-stats-row .stat-card p {
    font-size: 0.76rem;
    grid-column: 2;
    line-height: 1.25;
}

.dashboard-toolbar-card .card-body {
    padding: 0.75rem 1rem;
}

.dashboard-toolbar-card .small {
    font-size: 0.72rem;
}

#dashboardClassName {
    font-size: 1rem;
    line-height: 1.2;
}

.dashboard-page .btn-group {
    padding: 0.18rem;
}

.dashboard-page .btn-group .btn {
    font-size: 0.8rem;
    min-height: 32px;
    padding: 0.32rem 0.65rem;
}

#dashboardTableContainer .table {
    font-size: 0.82rem;
}

.student-care-page .bi-star-fill {
    color: #f6a21a !important;
}

.care-table-card .card-header {
    border-bottom: 1px solid var(--edu-line);
}

.template-step-card {
    border-left: 4px solid var(--fpt-blue) !important;
}

.template-step-card:nth-of-type(2) {
    border-left-color: var(--fpt-orange) !important;
}

.template-generate-panel {
    background: linear-gradient(135deg, #17324d, #2346a0);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 18px 42px rgba(23, 50, 77, 0.16);
}

.template-generate-panel .btn {
    box-shadow: none;
}

.class-detail-tools-row .card {
    min-height: 86px;
    background: linear-gradient(135deg, #ffffff 0%, #fff7ef 100%);
}

.class-detail-tools-row .card h5 {
    color: var(--edu-ink);
    font-weight: 800;
}

.class-detail-page {
    --class-compact-gap: 0.65rem;
}

.class-detail-page > .row:first-child {
    align-items: stretch !important;
    background: rgba(255, 253, 249, 0.74);
    border: 1px solid var(--edu-line);
    border-radius: 8px;
    margin-bottom: 1rem !important;
    padding: 0.75rem 0.85rem;
}

.class-detail-page > .row:first-child h1 {
    font-size: 1.35rem;
    line-height: 1.15;
}

.class-detail-page > .row:first-child .card {
    border: 1px solid rgba(23, 50, 77, 0.08) !important;
    box-shadow: none !important;
    height: 100%;
}

.class-detail-page > .row:first-child .card-body {
    padding: 0.7rem 0.9rem !important;
}

.class-detail-stats-row {
    gap: var(--class-compact-gap) 0;
    margin-bottom: 1rem !important;
}

.class-detail-stats-row .stat-card {
    align-items: center;
    display: grid;
    grid-template-columns: 2.45rem minmax(0, 1fr);
    min-height: 84px;
    padding: 0.85rem 1rem;
    text-align: left;
}

.class-detail-stats-row .stat-card .stat-icon {
    border-radius: 8px;
    font-size: 1.05rem;
    height: 2.45rem;
    margin: 0;
    width: 2.45rem;
}

.class-detail-stats-row .stat-card h3 {
    font-size: 1.25rem;
    line-height: 1.15;
    margin: 0 0 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-detail-stats-row .stat-card p {
    font-size: 0.76rem;
    grid-column: 2;
    line-height: 1.25;
}

.class-detail-tools-row {
    gap: var(--class-compact-gap) 0;
    margin-bottom: 1rem !important;
}

.class-detail-tools-row .card {
    min-height: 54px;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.class-detail-tools-row .card:hover {
    border-color: rgba(242, 106, 33, 0.36) !important;
    transform: translateY(-1px);
}

.class-detail-tool-body {
    min-height: 54px;
    padding: 0.7rem 0.9rem;
}

.class-detail-tool-body h5 {
    font-size: 0.98rem;
    line-height: 1.2;
}

@media (min-width: 992px) {
    .class-detail-tools-row > [class*="col-"] {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (max-width: 576px) {
    .class-detail-stats-row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }
}

.branding-preview {
    border-color: var(--edu-line);
}

@media (max-width: 768px) {
    .branding-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 0.95rem;
    }

    .branding-hero-chip {
        justify-content: center;
        width: 100%;
    }

    .branding-upload-zone {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .branding-upload-action {
        display: none;
    }

    .branding-form-grid,
    .branding-live-strip,
    .branding-preview-body {
        grid-template-columns: 1fr;
    }

    .branding-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .edu-page>.row:first-child,
    .student-care-page>.d-flex:first-child {
        padding: 0.9rem;
    }

    .page-content {
        padding: 0.85rem;
    }

    .edu-page h1,
    .edu-page .h3 {
        font-size: 1.22rem;
        line-height: 1.35;
    }

    .stat-card,
    .care-stat-card {
        padding: 1rem;
    }

    .care-table-card .card-header>div:first-child {
        width: 100%;
    }

    .care-table-card .form-control,
    .care-table-card .form-select {
        min-width: 100% !important;
    }
}

@media (max-width: 576px) {
    .classes-page {
        max-width: 100%;
        overflow-x: hidden;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .classes-page-header {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .classes-page-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        width: 100%;
        align-items: stretch !important;
    }

    .classes-page-actions #viewModeToggle {
        width: 100%;
    }

    .classes-page-actions>button.btn-primary {
        width: 100%;
        min-width: 0;
        white-space: nowrap;
    }

    .classes-page .class-tabs-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .classes-page .class-tabs {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
    }

    .classes-page .class-tab {
        min-width: 0;
    }
}

@media (max-width: 390px) {
    .classes-page-actions #viewModeToggle,
    .classes-page-actions>button.btn-primary {
        width: 100%;
    }

    .classes-page-actions {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   CLASS ROSTER CARD REDESIGN
   ======================================== */

.class-roster-grid {
    align-items: stretch;
    min-width: 0;
}

.class-roster-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 360px;
    padding: 0 !important;
    background:
        radial-gradient(circle at 92% 8%, rgba(15, 159, 140, 0.12), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #fffaf5 100%) !important;
    overflow: hidden;
    position: relative;
}

.class-roster-card::before {
    display: none;
}

.class-roster-accent {
    height: 5px;
    background: linear-gradient(90deg, var(--fpt-orange), var(--edu-mint), var(--fpt-blue));
}

.class-roster-header,
.class-card .class-roster-header[data-role="card-header"] {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.1rem 0.9rem !important;
}

.class-roster-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #eef7ff;
    color: var(--fpt-blue);
    font-size: 1.25rem;
}

.class-roster-title {
    min-width: 0;
}

.class-roster-title h3 {
    margin: 0 0 0.2rem;
    color: var(--edu-ink);
    font-family: var(--font-display);
    font-size: 1.03rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-roster-title p {
    margin: 0;
    color: #6b7280;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.class-roster-count,
.class-card .class-roster-count[data-role="student-count"] {
    min-width: 64px;
    margin: 0 !important;
    padding: 0.55rem 0.65rem !important;
    border: 1px solid #f3d6c3;
    border-radius: 8px !important;
    background: #fff4ec !important;
    text-align: center;
}

.class-roster-count strong {
    display: block;
    color: var(--fpt-orange-dark);
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1;
}

.class-roster-count span {
    display: block;
    margin-top: 0.15rem;
    color: #7a5b48;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.class-roster-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0 1.1rem 1rem;
}

.class-roster-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.class-roster-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.5rem;
    border-radius: 999px;
    background: rgba(23, 50, 77, 0.06);
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.class-roster-students,
.class-card .class-roster-students[data-role="student-preview"] {
    display: grid;
    gap: 0.55rem;
    min-height: 0 !important;
    padding: 0 !important;
    border-bottom: 0 !important;
}

.class-roster-student {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(231, 220, 207, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.student-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #e8f3ff;
    color: var(--fpt-blue);
    font-weight: 800;
    font-size: 0.84rem;
}

.student-info {
    min-width: 0;
}

.student-info strong,
.student-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-info strong {
    color: #52647a;
    font-size: 0.75rem;
}

.student-info span {
    color: var(--edu-ink);
    font-size: 0.83rem;
    font-weight: 700;
}

.class-roster-more {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--fpt-orange-dark);
    font-size: 0.82rem;
    font-weight: 800;
}

.class-roster-empty,
.class-card .class-roster-empty[data-role="student-preview"] {
    min-height: 132px !important;
    padding: 1rem !important;
    border: 1px dashed #dfd5ca;
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.45rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.55);
}

.class-roster-empty i {
    font-size: 1.7rem;
}

.class-roster-actions,
.class-card .class-roster-actions[data-role="card-actions"] {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) 48px 48px;
    gap: 0.55rem !important;
    padding: 0.95rem 1.1rem 1.1rem !important;
    border-top: 1px solid rgba(231, 220, 207, 0.9);
    background: rgba(255, 250, 245, 0.86) !important;
    min-width: 0;
}

.class-action {
    min-height: 44px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: #ffffff;
    color: #536276;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 800;
    transition: all var(--transition-fast);
}

.class-action:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1;
    background: #f8fafc;
}

.class-action-primary {
    border-color: transparent;
    background: var(--fpt-orange);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(242, 106, 33, 0.2);
}

.class-action-primary:hover {
    background: var(--fpt-orange-dark);
    color: #ffffff;
}

.class-action-danger {
    border-color: #fecaca;
    color: #dc2626;
}

.class-action-danger:hover {
    border-color: #fca5a5;
    background: #fff1f1;
}

.class-roster-card.is-archived .class-roster-accent {
    background: linear-gradient(90deg, #94a3b8, #cbd5e1);
}

.class-roster-card.is-archived .class-roster-icon,
.class-roster-card.is-archived .student-avatar {
    background: #f1f5f9;
    color: #64748b;
}

.class-roster-card.is-archived .class-roster-count {
    background: #f8fafc !important;
    border-color: #e2e8f0;
}

.class-roster-card.is-archived .class-roster-actions {
    grid-template-columns: minmax(0, 1fr) 48px;
}

@media (max-width: 768px) {
    .class-roster-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .class-roster-card {
        min-height: 0;
    }

    .class-roster-header,
    .class-card .class-roster-header[data-role="card-header"] {
        padding: 1rem 0.95rem 0.8rem !important;
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .class-roster-icon {
        width: 40px;
        height: 40px;
    }

    .class-roster-body {
        padding: 0 0.95rem 0.9rem;
    }

    .class-roster-actions,
    .class-card .class-roster-actions[data-role="card-actions"] {
        padding: 0.85rem 0.95rem 0.95rem !important;
        grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
        gap: 0.45rem !important;
    }

    .class-action {
        min-height: 42px;
    }
}

@media (max-width: 430px) {
    .class-roster-header,
    .class-card .class-roster-header[data-role="card-header"] {
        grid-template-columns: 38px minmax(0, 1fr) 58px;
        gap: 0.65rem;
    }

    .class-roster-icon {
        width: 38px;
        height: 38px;
    }

    .class-roster-count,
    .class-card .class-roster-count[data-role="student-count"] {
        min-width: 58px;
        padding: 0.48rem 0.52rem !important;
    }

    .class-roster-count strong {
        font-size: 1.25rem;
    }

    .class-roster-actions,
    .class-card .class-roster-actions[data-role="card-actions"] {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
    }

    .class-roster-actions .class-action {
        flex: 0 0 44px;
    }

    .class-roster-actions .class-action-primary {
        flex: 1 1 150px;
    }
}

/* ========================================
   DARK MODE SURFACES
   ======================================== */

:root[data-theme="dark"] body {
    background:
        linear-gradient(90deg, rgba(143, 180, 255, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(255, 122, 47, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #0b1020 0%, #101827 48%, #0f172a 100%);
    background-size: 40px 40px, 40px 40px, auto;
    color: var(--gray-800);
}

:root[data-theme="dark"] .top-header {
    background: rgba(15, 23, 42, 0.96);
    border-bottom-color: var(--edu-line);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
}

:root[data-theme="dark"] .top-header::after {
    opacity: 0.55;
}

:root[data-theme="dark"] .header-title,
:root[data-theme="dark"] .header-right .btn,
:root[data-theme="dark"] .header-right .dropdown-toggle {
    color: var(--edu-ink) !important;
}

:root[data-theme="dark"] .header-subtitle,
:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] small.text-muted {
    color: #aebbd0 !important;
}

:root[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #0d1424 0%, #111a2d 52%, #0f172a 100%);
    border-right-color: var(--edu-line);
}

:root[data-theme="dark"] .sidebar-header {
    border-bottom-color: var(--edu-line);
}

:root[data-theme="dark"] .sidebar-nav-title,
:root[data-theme="dark"] .nav-item i {
    color: #8ea0b8;
}

:root[data-theme="dark"] .nav-item {
    color: #dbe6f3;
}

:root[data-theme="dark"] .nav-item:hover {
    background: rgba(255, 122, 47, 0.11);
    border-color: rgba(255, 122, 47, 0.24);
    color: #ffffff;
}

:root[data-theme="dark"] .nav-item:hover i {
    color: var(--fpt-orange);
}

:root[data-theme="dark"] .nav-item.active {
    background: rgba(255, 122, 47, 0.16);
    border-color: rgba(255, 122, 47, 0.36);
    color: #ffffff;
}

:root[data-theme="dark"] .nav-item.active i {
    color: var(--fpt-orange);
}

:root[data-theme="dark"] .btn-toggle-sidebar,
:root[data-theme="dark"] .theme-mode-switch {
    background: #162033;
    border-color: var(--edu-line);
    color: var(--gray-800);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

:root[data-theme="dark"] .edu-page>.row:first-child,
:root[data-theme="dark"] .student-care-page>.d-flex:first-child {
    background:
        linear-gradient(135deg, rgba(22, 32, 51, 0.96), rgba(17, 24, 39, 0.92)),
        linear-gradient(90deg, rgba(255, 122, 47, 0.18), rgba(143, 180, 255, 0.12));
    border-color: var(--edu-line);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .profile-card,
:root[data-theme="dark"] .class-card,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu {
    background: var(--edu-paper) !important;
    border-color: var(--edu-line) !important;
    color: var(--gray-800);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24) !important;
}

:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-footer,
:root[data-theme="dark"] .dropdown-header {
    background: #111a2d !important;
    border-color: var(--edu-line) !important;
}

:root[data-theme="dark"] .dropdown-item {
    color: var(--gray-800);
}

:root[data-theme="dark"] .dropdown-item:hover {
    background: #1f2b40;
}

:root[data-theme="dark"] .table {
    color: var(--gray-800);
}

:root[data-theme="dark"] .table thead,
:root[data-theme="dark"] .table-light {
    background: #111a2d !important;
    color: var(--gray-800) !important;
    border-bottom-color: var(--edu-line);
}

:root[data-theme="dark"] .table thead th,
:root[data-theme="dark"] .table tbody tr {
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .table tbody td {
    color: var(--gray-700);
}

:root[data-theme="dark"] .table tbody tr:hover {
    background-color: rgba(143, 180, 255, 0.08);
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .input-group-text,
:root[data-theme="dark"] textarea {
    background-color: #101827;
    border-color: var(--edu-line);
    color: var(--gray-800);
}

:root[data-theme="dark"] .form-control::placeholder {
    color: #7f8da4;
}

:root[data-theme="dark"] .form-control:disabled,
:root[data-theme="dark"] .form-select:disabled,
:root[data-theme="dark"] .btn:disabled {
    background-color: #172134;
    border-color: #29364c;
    color: #7f8da4;
}

:root[data-theme="dark"] .btn-outline-secondary,
:root[data-theme="dark"] .btn-outline-dark {
    border-color: #3a4b63;
    color: #dbe6f3;
}

:root[data-theme="dark"] .btn-outline-secondary:hover,
:root[data-theme="dark"] .btn-outline-dark:hover {
    background: #223047;
    color: #ffffff;
}

:root[data-theme="dark"] .btn-outline-primary {
    border-color: rgba(255, 122, 47, 0.56);
    color: #ffb084;
}

:root[data-theme="dark"] .btn-outline-primary:hover {
    background: rgba(255, 122, 47, 0.16);
    color: #ffffff;
}

:root[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #bfdbfe;
}

:root[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
}

:root[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
}

:root[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

:root[data-theme="dark"] .class-tabs-container {
    background: #111a2d !important;
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .class-tab {
    color: #cbd5e1 !important;
}

:root[data-theme="dark"] .class-tab:hover {
    background: rgba(255, 122, 47, 0.12) !important;
}

:root[data-theme="dark"] .class-tab.active {
    background: #1f2b40 !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .care-stat-card,
:root[data-theme="dark"] .class-roster-card,
:root[data-theme="dark"] .profile-card {
    background:
        radial-gradient(circle at 92% 8%, rgba(71, 213, 198, 0.1), transparent 26%),
        linear-gradient(180deg, #162033 0%, #111827 100%) !important;
}

:root[data-theme="dark"] .class-roster-title h3,
:root[data-theme="dark"] .student-info span,
:root[data-theme="dark"] .class-detail-tools-row .card h5,
:root[data-theme="dark"] .modal-title,
:root[data-theme="dark"] .card-title {
    color: var(--edu-ink);
}

:root[data-theme="dark"] .class-roster-title p,
:root[data-theme="dark"] .student-info strong {
    color: #aebbd0;
}

:root[data-theme="dark"] .class-roster-icon,
:root[data-theme="dark"] .student-avatar {
    background: rgba(143, 180, 255, 0.15);
    color: #a9c8ff;
}

:root[data-theme="dark"] .class-roster-count,
:root[data-theme="dark"] .class-card .class-roster-count[data-role="student-count"] {
    background: rgba(255, 122, 47, 0.13) !important;
    border-color: rgba(255, 122, 47, 0.32);
}

:root[data-theme="dark"] .class-roster-count strong,
:root[data-theme="dark"] .class-roster-more {
    color: #ff9a5f;
}

:root[data-theme="dark"] .class-roster-count span {
    color: #ffd0b5;
}

:root[data-theme="dark"] .class-roster-meta span {
    background: rgba(219, 230, 243, 0.08);
    color: #dbe6f3;
}

:root[data-theme="dark"] .class-roster-student {
    background: rgba(15, 23, 42, 0.62);
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .class-roster-actions,
:root[data-theme="dark"] .class-card .class-roster-actions[data-role="card-actions"] {
    background: rgba(15, 23, 42, 0.72) !important;
    border-top-color: var(--edu-line);
}

:root[data-theme="dark"] .class-action {
    background: #101827;
    border-color: #33435a;
    color: #dbe6f3;
}

:root[data-theme="dark"] .class-action:hover {
    background: #1f2b40;
}

:root[data-theme="dark"] .class-action-primary {
    background: var(--fpt-orange);
    color: #1b0d04;
}

:root[data-theme="dark"] .class-action-primary:hover {
    background: #ff9a5f;
    color: #1b0d04;
}

:root[data-theme="dark"] .class-action-danger {
    border-color: rgba(248, 113, 113, 0.4);
    color: #fca5a5;
}

:root[data-theme="dark"] .class-action-danger:hover {
    background: rgba(239, 68, 68, 0.14);
}

:root[data-theme="dark"] .class-roster-empty,
:root[data-theme="dark"] .class-card .class-roster-empty[data-role="student-preview"] {
    background: rgba(15, 23, 42, 0.48);
    border-color: #33435a;
    color: #aebbd0;
}

:root[data-theme="dark"] .badge-pass {
    background: rgba(16, 185, 129, 0.18);
    color: #86efac;
}

:root[data-theme="dark"] .badge-fail {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

:root[data-theme="dark"] .dashboard-page .btn-group,
:root[data-theme="dark"] .care-table-card .card-header,
:root[data-theme="dark"] .class-detail-filter-row,
:root[data-theme="dark"] .template-generate-panel {
    background: #111a2d;
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .branding-preview {
    background: #101827;
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .branding-hero,
:root[data-theme="dark"] .branding-control-card,
:root[data-theme="dark"] .branding-preview-card {
    background:
        radial-gradient(circle at 86% 8%, rgba(71, 213, 198, 0.11), transparent 28%),
        linear-gradient(135deg, rgba(22, 32, 51, 0.96), rgba(17, 24, 39, 0.92)) !important;
    border-color: var(--edu-line) !important;
}

:root[data-theme="dark"] .branding-kicker,
:root[data-theme="dark"] .branding-upload-copy strong,
:root[data-theme="dark"] .branding-section-header h2,
:root[data-theme="dark"] .branding-hero h1,
:root[data-theme="dark"] .branding-live-strip strong,
:root[data-theme="dark"] .branding-preview-body strong {
    color: #f3f7fb;
}

:root[data-theme="dark"] .branding-hero-chip {
    background: rgba(71, 213, 198, 0.13);
    border-color: rgba(71, 213, 198, 0.28);
    color: #9cf0e6;
}

:root[data-theme="dark"] .branding-upload-zone {
    background:
        linear-gradient(135deg, rgba(255, 122, 47, 0.12), rgba(143, 180, 255, 0.08)),
        #101827;
    border-color: #4b5f7a;
}

:root[data-theme="dark"] .branding-upload-preview,
:root[data-theme="dark"] .branding-live-strip>div,
:root[data-theme="dark"] .branding-preview-body div {
    background: #101827;
    border-color: #33435a;
}

:root[data-theme="dark"] .branding-upload-copy small,
:root[data-theme="dark"] .branding-section-header p,
:root[data-theme="dark"] .branding-live-strip span,
:root[data-theme="dark"] .branding-preview-body span {
    color: #aebbd0;
}

:root[data-theme="dark"] .branding-status--success {
    background: rgba(16, 185, 129, 0.16);
    color: #a7f3d0;
}

:root[data-theme="dark"] .branding-status--warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
}

:root[data-theme="dark"] .branding-status--error {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

/* ========================================
   DARK MODE DATA TABLE CONTRAST
   ======================================== */

:root[data-theme="dark"] .theme-mode-switch {
    background: #0f172a;
    border-color: #3a4b63;
    color: #dbe6f3;
}

:root[data-theme="dark"] .theme-mode-option {
    color: #b8c6d9;
}

:root[data-theme="dark"] .theme-mode-switch.is-light .theme-mode-light,
:root[data-theme="dark"] .theme-mode-switch.is-dark .theme-mode-dark,
:root[data-theme="dark"] .theme-mode-option.active {
    background: linear-gradient(135deg, #ff7a2f, #ff9a5f);
    color: #101827;
    box-shadow: 0 10px 22px rgba(255, 122, 47, 0.3);
}

:root[data-theme="dark"] #classDetailTableWrapper,
:root[data-theme="dark"] #dashboardTableContainer,
:root[data-theme="dark"] .care-table-card .table-responsive {
    background: #0f172a !important;
    border: 1px solid #33435a;
    border-radius: var(--radius-md);
}

:root[data-theme="dark"] #classDetailTableWrapper table,
:root[data-theme="dark"] #dashboardStudentTable,
:root[data-theme="dark"] .care-table-card table,
:root[data-theme="dark"] .student-care-page table {
    background: #0f172a !important;
    color: #e8f1ff !important;
}

:root[data-theme="dark"] #classDetailTableHeader th,
:root[data-theme="dark"] #classDetailTableHeader th[style],
:root[data-theme="dark"] #dashboardStudentTable thead th,
:root[data-theme="dark"] .care-table-card thead th,
:root[data-theme="dark"] .student-care-page thead th {
    background: #172033 !important;
    color: #f8fafc !important;
    border-color: #42536d !important;
    box-shadow: inset 0 -1px 0 #42536d !important;
}

:root[data-theme="dark"] #classDetailTableHeader th *,
:root[data-theme="dark"] #dashboardStudentTable thead th *,
:root[data-theme="dark"] .care-table-card thead th *,
:root[data-theme="dark"] .student-care-page thead th * {
    color: #f8fafc !important;
}

:root[data-theme="dark"] #classDetailTableHeader th small,
:root[data-theme="dark"] #dashboardStudentTable thead th small,
:root[data-theme="dark"] .care-table-card thead th small {
    color: #b8c6d9 !important;
}

:root[data-theme="dark"] #classDetailTableBody tr,
:root[data-theme="dark"] #dashboardStudentTable tbody tr,
:root[data-theme="dark"] .care-table-card tbody tr,
:root[data-theme="dark"] .student-care-page tbody tr {
    background: #0f172a !important;
}

:root[data-theme="dark"] #classDetailTableBody tr:nth-child(even),
:root[data-theme="dark"] #dashboardStudentTable tbody tr:nth-child(even),
:root[data-theme="dark"] .care-table-card tbody tr:nth-child(even),
:root[data-theme="dark"] .student-care-page tbody tr:nth-child(even) {
    background: #121c2f !important;
}

:root[data-theme="dark"] #classDetailTableBody td,
:root[data-theme="dark"] #classDetailTableBody td[style],
:root[data-theme="dark"] #dashboardStudentTable tbody td,
:root[data-theme="dark"] .care-table-card tbody td,
:root[data-theme="dark"] .student-care-page tbody td,
:root[data-theme="dark"] .student-care-row td {
    background: transparent !important;
    color: #e8f1ff !important;
    border-color: #42536d !important;
}

:root[data-theme="dark"] #classDetailTableBody td *,
:root[data-theme="dark"] #dashboardStudentTable tbody td *,
:root[data-theme="dark"] .care-table-card tbody td *,
:root[data-theme="dark"] .student-care-page tbody td * {
    color: inherit;
}

:root[data-theme="dark"] #classDetailTableBody td:nth-child(1),
:root[data-theme="dark"] #classDetailTableBody td:nth-child(2),
:root[data-theme="dark"] #classDetailTableBody td:nth-child(3) {
    background: #13203a !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] #classDetailTableBody tr:nth-child(even) td:nth-child(1),
:root[data-theme="dark"] #classDetailTableBody tr:nth-child(even) td:nth-child(2),
:root[data-theme="dark"] #classDetailTableBody tr:nth-child(even) td:nth-child(3) {
    background: #162640 !important;
}

:root[data-theme="dark"] #classDetailTableBody tr.pass td:nth-child(1),
:root[data-theme="dark"] #classDetailTableBody tr.pass td:nth-child(2),
:root[data-theme="dark"] #classDetailTableBody tr.pass td:nth-child(3) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), #13203a 72%) !important;
}

:root[data-theme="dark"] #classDetailTableBody tr.fail td:nth-child(1),
:root[data-theme="dark"] #classDetailTableBody tr.fail td:nth-child(2),
:root[data-theme="dark"] #classDetailTableBody tr.fail td:nth-child(3) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.26), #13203a 72%) !important;
}

:root[data-theme="dark"] #classDetailTableBody td:nth-child(3)::after {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.28), transparent) !important;
}

:root[data-theme="dark"] #classDetailTableBody .badge,
:root[data-theme="dark"] #dashboardStudentTable .badge,
:root[data-theme="dark"] .care-table-card .badge,
:root[data-theme="dark"] .student-care-page .badge {
    color: #ffffff !important;
    opacity: 1;
}

:root[data-theme="dark"] #classDetailTableBody .badge.bg-primary,
:root[data-theme="dark"] #dashboardStudentTable .badge.bg-primary,
:root[data-theme="dark"] .student-care-page .badge.bg-primary {
    background-color: #2f6fed !important;
}

:root[data-theme="dark"] .student-care-page .badge.bg-warning,
:root[data-theme="dark"] .student-care-page .badge.text-dark,
:root[data-theme="dark"] #dashboardStudentTable .badge.bg-warning,
:root[data-theme="dark"] #dashboardStudentTable .badge.text-dark {
    background-color: #fbbf24 !important;
    color: #172033 !important;
}

:root[data-theme="dark"] #classDetailTableWrapper .grade-input,
:root[data-theme="dark"] #classDetailTableWrapper .extra-input,
:root[data-theme="dark"] #dashboardStudentTable .grade-input,
:root[data-theme="dark"] .care-note-input,
:root[data-theme="dark"] .student-care-page textarea,
:root[data-theme="dark"] .student-care-page input,
:root[data-theme="dark"] .student-care-page select {
    background: #1d2940 !important;
    border: 1px solid #5b708d !important;
    color: #f8fafc !important;
    box-shadow: inset 0 0 0 1px rgba(143, 180, 255, 0.08);
}

:root[data-theme="dark"] #classDetailTableWrapper .grade-input::placeholder,
:root[data-theme="dark"] #classDetailTableWrapper .extra-input::placeholder,
:root[data-theme="dark"] #dashboardStudentTable .grade-input::placeholder,
:root[data-theme="dark"] .care-note-input::placeholder,
:root[data-theme="dark"] .student-care-page textarea::placeholder,
:root[data-theme="dark"] .student-care-page input::placeholder {
    color: #aebbd0 !important;
}

:root[data-theme="dark"] #classDetailTableWrapper .grade-input:focus,
:root[data-theme="dark"] #classDetailTableWrapper .extra-input:focus,
:root[data-theme="dark"] #dashboardStudentTable .grade-input:focus,
:root[data-theme="dark"] .care-note-input:focus,
:root[data-theme="dark"] .student-care-page textarea:focus,
:root[data-theme="dark"] .student-care-page input:focus,
:root[data-theme="dark"] .student-care-page select:focus {
    background: #22314c !important;
    border-color: #ff9a5f !important;
    box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.22) !important;
}

:root[data-theme="dark"] .student-care-page a,
:root[data-theme="dark"] #dashboardStudentTable a,
:root[data-theme="dark"] #classDetailTableWrapper a {
    color: #7db3ff !important;
}

:root[data-theme="dark"] #classDetailTableBody .btn,
:root[data-theme="dark"] #dashboardStudentTable .btn,
:root[data-theme="dark"] .student-care-page .btn {
    opacity: 1;
}

:root[data-theme="dark"] #classDetailTableBody .btn-outline-secondary,
:root[data-theme="dark"] #classDetailTableBody .btn-outline-primary,
:root[data-theme="dark"] #classDetailTableBody .btn-outline-success,
:root[data-theme="dark"] #dashboardStudentTable .btn-outline-secondary,
:root[data-theme="dark"] #dashboardStudentTable .btn-outline-primary,
:root[data-theme="dark"] #dashboardStudentTable .btn-outline-success {
    background: #24334d;
    border-color: #536681;
    color: #e8f1ff;
}

#classDetailTableHeader .grade-meta-head,
#classDetailTableBody .grade-meta-cell {
    border-left: 1px solid rgba(23, 50, 77, 0.08);
}

#classDetailTableHeader .grade-meta-bonus,
#classDetailTableBody .grade-meta-bonus,
#classDetailTableHeader .grade-meta-rating,
#classDetailTableBody .grade-meta-rating {
    background: #fffbeb !important;
}

#classDetailTableHeader .grade-meta-final,
#classDetailTableBody .grade-meta-final {
    background: #f0fdf4 !important;
}

#classDetailTableHeader .grade-meta-note,
#classDetailTableBody .grade-meta-note {
    background: #faf5ff !important;
}

#classDetailTableHeader .grade-meta-care,
#classDetailTableBody .grade-meta-care {
    background: #fef2f2 !important;
}

#classDetailTableHeader .grade-meta-absence,
#classDetailTableBody .grade-meta-absence {
    background: #fff7ed !important;
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-head,
:root[data-theme="dark"] #classDetailTableHeader .grade-meta-head[style] {
    background: #1b2941 !important;
    color: #f8fafc !important;
    border-left-color: #4c5f7a !important;
}

:root[data-theme="dark"] #classDetailTableBody .grade-meta-cell {
    background: #111c2f !important;
    color: #e8f1ff !important;
    border-left-color: #42536d !important;
}

:root[data-theme="dark"] #classDetailTableBody tr:nth-child(even) .grade-meta-cell {
    background: #14223a !important;
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-bonus,
:root[data-theme="dark"] #classDetailTableHeader .grade-meta-rating,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-bonus,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-rating {
    box-shadow: inset 3px 0 0 rgba(251, 191, 36, 0.72);
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-final,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-final {
    box-shadow: inset 3px 0 0 rgba(16, 185, 129, 0.72);
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-note,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-note {
    box-shadow: inset 3px 0 0 rgba(168, 85, 247, 0.72);
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-care,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-care {
    box-shadow: inset 3px 0 0 rgba(248, 113, 113, 0.72);
}

:root[data-theme="dark"] #classDetailTableHeader .grade-meta-absence,
:root[data-theme="dark"] #classDetailTableBody .grade-meta-absence {
    box-shadow: inset 3px 0 0 rgba(251, 146, 60, 0.72);
}

@media (max-width: 575.98px) {
    .theme-mode-switch {
        min-width: 88px;
    }

    .theme-mode-option {
        min-width: 38px;
        padding: 0 0.35rem;
    }

    .theme-mode-option span {
        display: none;
    }
}

/* Report tool: academic command ledger */
.report-tool-modal {
    --report-ink: var(--gray-900);
    --report-muted: var(--gray-600);
    --report-panel: #fffdf9;
    --report-line: rgba(23, 50, 77, 0.12);
    --report-accent: var(--fpt-orange);
    --report-accent-dark: var(--fpt-orange-dark);
    --report-blue: var(--fpt-blue);
}

.report-tool-dialog {
    max-width: min(1120px, calc(100vw - 1.5rem));
}

.report-tool-shell {
    background: var(--report-panel);
    border-radius: 8px;
}

.report-tool-header {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(135deg, var(--report-blue) 0%, #162b63 100%);
    background-size: 22px 22px, auto;
    box-shadow: inset 8px 0 0 var(--report-accent);
    padding: 1rem 1.25rem 1rem 1.5rem;
}

.report-tool-header .report-tool-title {
    color: #fff;
}

.report-tool-body {
    background: linear-gradient(180deg, #fffaf5 0%, #f4f6f9 100%);
}

.report-tool-layout {
    min-height: min(650px, calc(100vh - 8rem));
}

.report-tool-nav-pane {
    background:
        linear-gradient(180deg, rgba(242, 106, 33, 0.08), transparent 42%),
        var(--edu-paper);
    border-right: 1px solid var(--report-line);
    padding: 1.25rem 1rem;
}

.report-tool-tabs {
    gap: 0.65rem;
    position: sticky;
    top: 1rem;
}

.report-tool-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--report-muted);
    padding: 0.9rem 1rem;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.report-tool-tabs .nav-link:hover {
    background: var(--fpt-orange-light);
    color: var(--report-accent-dark);
}

.report-tool-tabs .nav-link.active {
    background: var(--report-ink);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 4px 0 0 var(--report-accent);
    color: #fff;
}

.report-tool-main {
    min-width: 0;
    padding: clamp(1rem, 3vw, 2rem);
}

.report-tool-toolbar,
.report-config-head {
    align-items: flex-end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}

.report-tool-kicker {
    color: var(--report-accent-dark);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.report-tool-filter {
    align-items: stretch;
    display: flex;
    gap: 0.65rem;
    min-width: min(390px, 100%);
}

.report-date-input {
    background: var(--edu-paper);
    border: 1px solid var(--report-line);
    border-radius: 8px;
    flex: 1 1 auto;
    overflow: hidden;
}

.report-date-input .input-group-text,
.report-date-input .form-control {
    background: transparent;
    border: 0;
    color: var(--report-ink);
    min-height: 44px;
}

.report-filter-btn,
.report-add-field-btn,
.report-save-template-btn {
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    font-weight: 800;
    min-height: 44px;
}

.report-filter-btn,
.report-save-template-btn {
    background: var(--report-accent);
    color: #fff;
}

.report-filter-btn:hover,
.report-save-template-btn:hover {
    background: var(--report-accent-dark);
}

.report-add-field-btn {
    background: var(--edu-mint);
}

.report-table-card {
    background: var(--edu-paper);
    border: 1px solid var(--report-line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(23, 50, 77, 0.09);
    overflow: hidden;
}

.report-table-scroll {
    max-height: min(470px, calc(100vh - 18rem));
    scrollbar-color: rgba(23, 50, 77, 0.35) transparent;
}

.report-table {
    min-width: 760px;
}

.report-table thead th {
    background: #fff7ed;
    border-bottom: 1px solid var(--report-line);
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 1rem 1.25rem;
    position: sticky;
    text-transform: uppercase;
    top: 0;
    z-index: 1;
}

.report-table tbody td {
    border-bottom: 1px solid rgba(23, 50, 77, 0.07);
    color: var(--gray-800);
    padding: 1.15rem 1.25rem;
    vertical-align: middle;
}

.report-table tbody tr:nth-child(odd) td {
    background: rgba(23, 50, 77, 0.025);
}

.report-code-cell,
.report-name-cell {
    font-weight: 800;
    white-space: nowrap;
}

.report-date-cell {
    color: var(--gray-600);
    font-variant-numeric: tabular-nums;
    min-width: 7.5rem;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

.report-answer-list {
    display: grid;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.report-answer-list li {
    padding-left: 1rem;
    position: relative;
}

.report-answer-list li::before {
    background: var(--report-accent);
    border-radius: 50%;
    content: '';
    height: 0.38rem;
    left: 0;
    position: absolute;
    top: 0.56rem;
    width: 0.38rem;
}

.report-answer-list strong {
    color: var(--report-ink);
    display: block;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.report-answer-list span {
    color: var(--report-muted);
    display: block;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.report-config-container {
    max-height: min(450px, calc(100vh - 19rem));
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.45rem;
}

.report-field-card {
    align-items: flex-start;
    background: var(--edu-paper);
    border: 1px solid var(--report-line);
    border-left: 6px solid var(--report-accent);
    border-radius: 8px;
    display: grid;
    gap: 1rem;
    grid-template-columns: 7.25rem minmax(0, 1fr) auto;
    margin-bottom: 0.85rem;
    padding: 1rem;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.report-field-card:hover {
    border-color: rgba(242, 106, 33, 0.5);
    transform: translateY(-1px);
}

.report-field-index {
    color: var(--report-accent-dark);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding-top: 0.75rem;
    text-transform: uppercase;
}

.report-field-main {
    min-width: 0;
}

.report-field-main .form-label {
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
}

.report-question-input {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    min-height: 44px;
}

.report-question-input:focus {
    border-color: var(--report-accent);
    box-shadow: 0 0 0 0.2rem rgba(242, 106, 33, 0.14);
}

.report-required-control {
    align-items: center;
    display: flex;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.report-required-control .form-check-label {
    color: var(--report-muted);
    cursor: pointer;
    font-weight: 600;
}

.report-required-toggle {
    cursor: pointer;
}

.report-required-toggle:checked {
    background-color: var(--report-accent);
    border-color: var(--report-accent);
}

.report-field-actions {
    padding-top: 1.65rem;
}

.report-field-actions .btn {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.report-save-bar {
    border-top: 1px solid var(--report-line);
    margin-top: 1rem;
    padding-top: 1rem;
    text-align: right;
}

:root[data-theme="dark"] .report-tool-modal {
    --report-ink: #f8fafc;
    --report-muted: #b6c2d2;
    --report-panel: #162033;
    --report-line: rgba(203, 213, 225, 0.18);
}

:root[data-theme="dark"] .report-tool-shell,
:root[data-theme="dark"] .report-tool-nav-pane,
:root[data-theme="dark"] .report-table-card,
:root[data-theme="dark"] .report-field-card {
    background: var(--report-panel);
}

:root[data-theme="dark"] .report-tool-body {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

:root[data-theme="dark"] .report-table thead th {
    background: #24334d;
    color: #e2e8f0;
}

:root[data-theme="dark"] .report-table tbody td,
:root[data-theme="dark"] .report-answer-list strong,
:root[data-theme="dark"] .report-question-input {
    color: #f8fafc;
}

:root[data-theme="dark"] .report-table tbody tr:nth-child(odd) td,
:root[data-theme="dark"] .report-question-input {
    background: #111c2f;
}

@media (max-width: 767.98px) {
    .report-tool-dialog {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }

    .report-tool-layout {
        min-height: 0;
    }

    .report-tool-nav-pane {
        border-bottom: 1px solid var(--report-line);
        border-right: 0;
        padding: 0.75rem;
    }

    .report-tool-tabs {
        flex-direction: row !important;
        overflow-x: visible;
        position: static;
    }

    .report-tool-tabs .nav-link {
        flex: 1 1 calc(50% - 0.325rem) !important;
        max-width: calc(50% - 0.325rem);
        min-width: 0 !important;
        padding: 0.8rem 0.9rem;
        white-space: normal;
    }

    .report-tool-toolbar,
    .report-config-head {
        align-items: stretch;
        flex-direction: column;
    }

    .report-tool-filter {
        min-width: 0;
        width: 100%;
    }

    .report-table-scroll {
        max-height: none;
        overflow: visible;
    }

    .report-table {
        min-width: 0;
    }

    .report-table thead {
        display: none;
    }

    .report-table,
    .report-table tbody,
    .report-table tr,
    .report-table td {
        display: block;
        width: 100%;
    }

    .report-table tbody tr {
        background: var(--edu-paper);
        border-left: 6px solid var(--report-accent);
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(23, 50, 77, 0.08);
        margin: 0.75rem;
        overflow: hidden;
    }

    .report-table tbody td,
    .report-table tbody tr:nth-child(odd) td {
        background: transparent;
        border-bottom: 1px solid var(--report-line);
        padding: 0.75rem 0.95rem;
    }

    .report-date-cell {
        min-width: 0;
        white-space: normal;
    }

    :root[data-theme="dark"] .report-table tbody tr {
        background: var(--report-panel);
    }

    .report-table tbody td::before {
        color: var(--report-accent-dark);
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        margin-bottom: 0.18rem;
        text-transform: uppercase;
    }

    .report-field-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .report-field-index {
        grid-column: 1 / -1;
        padding-top: 0;
    }

    .report-field-actions {
        padding-top: 1.65rem;
    }
}

@media (max-width: 430px) {
    .report-tool-header {
        padding-left: 1rem;
    }

    .class-detail-stats-row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
    }

    .report-tool-title {
        font-size: 1rem;
    }

    .report-tool-main {
        padding: 0.9rem;
    }

    .report-tool-filter {
        flex-direction: column;
    }

    .report-tool-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .report-tool-tabs .nav-link {
        flex: 1 1 0;
        font-size: 0.88rem;
        min-width: 0;
        white-space: normal;
    }

    .report-filter-btn,
    .report-add-field-btn,
    .report-save-template-btn {
        width: 100%;
    }

    .report-table tbody tr {
        margin-left: 0;
        margin-right: 0;
    }

    .report-field-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-field-actions {
        padding-top: 0;
    }

    .report-field-actions .btn {
        width: 100%;
    }
}

/* ========================================
   RESPONSIVE TABLE STICKY COLUMNS
   ======================================== */
@media (max-width: 768px) {
    .table-responsive {
        position: relative;
        overflow-x: auto;
    }
    
    #dashboardStudentTable th:nth-child(2),
    #dashboardStudentTable td:nth-child(2) {
        position: sticky;
        left: 0;
        background-color: var(--edu-paper);
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }
    
    #dashboardStudentTable th:nth-child(3),
    #dashboardStudentTable td:nth-child(3) {
        position: sticky;
        left: 80px; /* Adjust according to MSSV column width */
        background-color: var(--edu-paper);
        z-index: 2;
        box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    }
}

/* ========================================
   PREFERS-REDUCED-MOTION GATE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   DARK MODE — COMPREHENSIVE OVERRIDES
   ======================================== */

:root[data-theme="dark"] body {
    background: var(--edu-surface);
}

:root[data-theme="dark"] .table {
    color: var(--edu-ink);
}

:root[data-theme="dark"] .table thead {
    background-color: var(--gray-100);
    color: var(--edu-ink);
}

:root[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--gray-100);
}

:root[data-theme="dark"] .table tbody td {
    color: var(--gray-600);
    border-bottom-color: var(--edu-line);
}

:root[data-theme="dark"] .modal-content {
    background: var(--edu-paper);
    color: var(--edu-ink);
}

:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .modal-footer {
    background-color: var(--gray-50);
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .dropdown-menu {
    background-color: var(--edu-paper);
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--gray-100);
}

:root[data-theme="dark"] .dropdown-header {
    background-color: var(--gray-50);
}

:root[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--gray-100);
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--gray-300);
}

:root[data-theme="dark"] .class-note-toolbar {
    background: var(--gray-100);
}

:root[data-theme="dark"] .class-note-tool-btn {
    background: var(--edu-paper);
    border-color: var(--edu-line);
    color: var(--edu-ink);
}

:root[data-theme="dark"] .class-note-tool-btn.active {
    background: var(--fpt-orange);
    border-color: var(--fpt-orange);
    color: #10131a;
    box-shadow: 0 4px 10px rgba(255, 122, 47, 0.28);
}

:root[data-theme="dark"] .class-note-canvas-wrap {
    background:
        radial-gradient(rgba(255, 122, 47, 0.1) 1px, transparent 1.5px) 0 0 / 22px 22px,
        linear-gradient(160deg, #16283f, #0d1a2b);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
}

:root[data-theme="dark"] .class-note-presenting.class-note-page {
    background: linear-gradient(160deg, #16283f, #0d1a2b);
}

:root[data-theme="dark"] .class-note-swatch {
    border-color: var(--edu-paper);
    outline-color: var(--edu-line);
}

:root[data-theme="dark"] .class-note-swatch.active {
    outline-color: var(--fpt-orange);
}

:root[data-theme="dark"] .sidebar {
    border-right-color: var(--edu-line);
}

:root[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(22, 32, 51, 0.92);
    border-color: var(--edu-line);
}

:root[data-theme="dark"] .alert-info {
    background-color: var(--accent-info-light);
    color: var(--accent-info);
}

:root[data-theme="dark"] .alert-warning {
    background-color: var(--accent-warning-light);
    color: var(--accent-warning);
}

:root[data-theme="dark"] .alert-success {
    background-color: var(--accent-success-light);
    color: var(--accent-success);
}

:root[data-theme="dark"] .alert-danger {
    background-color: var(--accent-danger-light);
    color: var(--accent-danger);
}

/* ========================================
   CLASS TABS (moved from classes.ejs inline)
   ======================================== */

.class-tabs-container {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 6px;
    display: inline-flex;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.class-tabs {
    display: flex;
    gap: 4px;
}

.class-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 200ms ease;
}

.class-tab:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.class-tab.active {
    background: var(--edu-paper);
    color: var(--fpt-orange);
    box-shadow: var(--shadow-xs);
}

.class-tab i {
    font-size: 1rem;
}

.tab-count {
    background: var(--fpt-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 24px;
    text-align: center;
}

.tab-count.archived {
    background: var(--gray-400);
}

.class-tab.active .tab-count {
    background: var(--fpt-orange);
}

.class-tab.active .tab-count.archived {
    background: var(--gray-500);
}

@media (max-width: 768px) {
    .classes-page {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }

    .classes-page-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: stretch !important;
    }

    .classes-page-header h1 {
        width: 100%;
        font-size: 1.35rem;
    }

    .classes-page-actions {
        width: 100%;
        justify-content: space-between;
    }

    .class-tabs-container {
        display: flex;
        width: 100%;
        padding: 4px;
    }

    .class-tabs {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    .class-tab {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
        padding: 9px 12px;
        min-height: 42px;
    }
}

@media (max-width: 430px) {
    .classes-page {
        padding-left: 0;
        padding-right: 0;
    }

    .classes-page-actions {
        gap: 0.5rem !important;
    }

    .classes-page-actions #viewModeToggle {
        flex: 0 0 auto;
    }

    .classes-page-actions>button.btn-primary {
        flex: 1 1 auto;
        min-width: 0;
        padding-left: 0.65rem;
        padding-right: 0.65rem;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .class-tab {
        flex: 1 1 100%;
        justify-content: space-between;
    }
}

/* ========================================
   BOOTSTRAP -> FPT EDU BRAND ALIGNMENT
   Recolors Bootstrap's default blue (links, utilities,
   form controls, tabs, pagination) to the FPT palette.
   ======================================== */

:root {
    --bs-primary: #f26a21;
    --bs-primary-rgb: 242, 106, 33;
    --bs-link-color: #2346a0;
    --bs-link-color-rgb: 35, 70, 160;
    --bs-link-hover-color: #1a3578;
    --bs-link-hover-color-rgb: 26, 53, 120;
}

:root[data-theme="dark"] {
    --bs-primary: #ff7a2f;
    --bs-primary-rgb: 255, 122, 47;
    --bs-link-color: #8fb4ff;
    --bs-link-color-rgb: 143, 180, 255;
    --bs-link-hover-color: #b3ccff;
    --bs-link-hover-color-rgb: 179, 204, 255;
}

.form-check-input:checked {
    background-color: var(--fpt-orange);
    border-color: var(--fpt-orange);
}

.form-check-input:focus {
    border-color: var(--fpt-orange);
    box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.15);
}

.form-range::-webkit-slider-thumb {
    background-color: var(--fpt-orange);
}

.form-range::-webkit-slider-thumb:active {
    background-color: var(--fpt-orange-dark);
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.18);
}

.form-range::-moz-range-thumb {
    background-color: var(--fpt-orange);
}

.form-range::-moz-range-thumb:active {
    background-color: var(--fpt-orange-dark);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.18);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background-color: var(--fpt-orange);
}

.nav-tabs .nav-link.active {
    color: var(--fpt-orange-dark);
}

.nav-tabs .nav-link:hover {
    color: var(--fpt-orange);
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--fpt-orange);
    color: #ffffff;
}

.page-link {
    color: var(--fpt-orange-dark);
}

.page-link:hover {
    color: var(--fpt-orange-dark);
    background-color: var(--fpt-orange-light);
}

.page-link:focus {
    color: var(--fpt-orange-dark);
    box-shadow: 0 0 0 4px rgba(242, 106, 33, 0.15);
}

.page-item.active .page-link {
    background-color: var(--fpt-orange);
    border-color: var(--fpt-orange);
    color: #ffffff;
}

.btn-link {
    color: var(--fpt-orange-dark);
}

.btn-link:hover {
    color: var(--fpt-orange);
}

.btn-primary {
    box-shadow: 0 2px 8px rgba(242, 106, 33, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(242, 106, 33, 0.3);
}

/* Soft warm ambience at the top of every page. */
.page-content {
    background: radial-gradient(1000px 320px at 12% -80px, rgba(242, 106, 33, 0.05), transparent 60%);
}
