/* ==========================================================================
   DESIGN SYSTEM v3.5 - TRUNG TÂM ĐÀO TẠO & SÁT HẠCH LÁI XE HOÀNG THÀNH
   Modern Crisp Light Theme, Sidebar Navigation & Weekly Schedule Planner
   ========================================================================== */

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

:root {
    /* Color Tokens (Crisp Modern Light Palette) */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-card: #ffffff;
    --border-subtle: #e2e8f0;
    --border-focus: #3b82f6;

    /* Accents */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-glow: rgba(37, 99, 235, 0.15);

    --secondary: #0284c7;
    --secondary-hover: #0369a1;
    --secondary-light: #f0f9ff;

    --gold: #d97706;
    --gold-light: #fffbeb;
    --gold-glow: rgba(217, 119, 6, 0.15);
    --gold-gradient: linear-gradient(135deg, #f59e0b, #d97706);

    --success: #059669;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;

    --warning: #d97706;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    --danger: #e11d48;
    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    /* Typography & Spacing */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 6px 12px -2px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 12px 28px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button, input, select, textarea {
    font-family: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   SVG ICON HELPER
   ========================================================================== */
.svg-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.18em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   AUTH / LOGIN SCREEN
   ========================================================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    position: relative;
    z-index: 10;
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 520px;
    padding: 2.5rem 2.25rem;
    position: relative;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.role-tab-selector {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-subtle);
}

.role-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.65rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.role-tab-btn:hover {
    color: var(--text-main);
}

.role-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.quick-demo-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.quick-demo-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quick-pills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.quick-pill {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.quick-pill:hover {
    background: #eff6ff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.quick-pill strong {
    color: var(--text-main);
    font-size: 0.82rem;
    margin-bottom: 0.15rem;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-right-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.brand-text h1 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.75rem 0.35rem 0.45rem;
    border-radius: var(--radius-full);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.85rem;
}

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

.user-meta .name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.user-meta .role-tag {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-logout:hover {
    color: var(--danger);
    background: #fee2e2;
}

/* ==========================================================================
   MAIN APPLICATION LAYOUT
   ========================================================================== */
.main-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;
}

.portal-view {
    display: none;
}

.portal-view.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

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

/* ==========================================================================
   ADMIN LAYOUT WITH LEFT SIDEBAR
   ========================================================================== */
.admin-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

.admin-main-content {
    flex: 1;
    min-width: 0;
    width: 0;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 0.5rem 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.6rem;
}

.admin-sidebar-header .role-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-sidebar-header .title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 0.2rem;
}

.admin-nav-section {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 0.85rem 0.25rem;
    margin-top: 0.25rem;
    border-top: 1px dashed var(--border-subtle);
}

.admin-nav-section:first-of-type {
    margin-top: 0;
    border-top: none;
    padding-top: 0.15rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.84rem;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.admin-nav-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.admin-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.admin-nav-item .icon {
    font-size: 1.15rem;
    width: 24px;
    display: inline-flex;
    justify-content: center;
}

.admin-main-content {
    flex: 1;
    min-width: 0;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* ==========================================================================
   METRICS GRID
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.metric-box {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.3rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.metric-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.metric-box:has(.metric-icon-wrap) {
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
}

.metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.metric-icon-indigo { background: #eff6ff; color: #2563eb; }
.metric-icon-cyan { background: #f0f9ff; color: #0284c7; }
.metric-icon-gold { background: #fffbeb; color: #d97706; }
.metric-icon-emerald { background: #ecfdf5; color: #059669; }

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    word-break: break-word;
}

.metric-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    line-height: 1.35;
}

.metric-sub {
    font-size: 0.76rem;
    color: var(--text-dim);
    line-height: 1.35;
    margin-top: 0.15rem;
}

/* ==========================================================================
   CARDS & CONTAINERS (CLEAN LIGHT DESIGN)
   ========================================================================== */
.glass-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.1rem 1.35rem;
    margin-bottom: 1.1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* ==========================================================================
   SUB NAVIGATION TABS (STUDENT - PREMIUM SEGMENTED PILL BAR)
   ========================================================================== */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.student-nav-tabs {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 0.45rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #e2e8f0;
}

.student-nav-tabs::-webkit-scrollbar {
    display: none;
}

.student-nav-tabs .student-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.35rem;
    border-radius: 11px;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    position: relative;
    user-select: none;
    margin-bottom: 0;
}

.student-nav-tabs .student-tab-btn .svg-icon {
    width: 1.18rem;
    height: 1.18rem;
    stroke-width: 2.2;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s ease;
    flex-shrink: 0;
}

.student-nav-tabs .student-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    transform: translateY(-1px);
}

.student-nav-tabs .student-tab-btn:hover .svg-icon {
    transform: scale(1.1);
    stroke: #2563eb;
}

.student-nav-tabs .student-tab-btn:active {
    transform: scale(0.97);
}

.student-nav-tabs .student-tab-btn.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px -1px rgba(37, 99, 235, 0.38), 0 2px 6px rgba(37, 99, 235, 0.2) !important;
    transform: translateY(0);
}

.student-nav-tabs .student-tab-btn.active .svg-icon {
    stroke: #ffffff !important;
    transform: scale(1.05);
}

.nav-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.8rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-bottom: -2px;
}

.nav-tab-btn:hover {
    color: var(--primary);
}

.nav-tab-btn.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom-color: var(--primary);
}

.student-tab-content {
    display: none;
}

.student-tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

/* ==========================================================================
   STUDENT HERO CARD & AVATAR
   ========================================================================== */
.student-hero-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 18px -2px rgba(15, 23, 42, 0.05);
}

.student-hero-avatar {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

/* ==========================================================================
   WEEKLY SCHEDULE BOARD (STUDENT SCHEDULING REDESIGN)
   ========================================================================== */
.week-planner-container {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.week-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
}

.week-nav-info {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.week-nav-btns {
    display: flex;
    gap: 0.4rem;
}

.week-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.week-day-pill {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.week-day-pill:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-2px);
}

.week-day-pill.active {
    background: #eff6ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.week-day-pill .day-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.week-day-pill.active .day-lbl {
    color: var(--primary);
}

.week-day-pill .day-date-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 0.2rem;
}

.week-day-pill.today::after {
    content: 'Hôm nay';
    display: block;
    font-size: 0.65rem;
    color: var(--success);
    font-weight: 800;
    margin-top: 0.25rem;
}

/* Slots Grid in Weekly Planner */
.slot-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.slot-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.slot-card:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.slot-card.selected {
    background: #eff6ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.slot-card .s-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text-main);
}

.slot-card.selected .s-name {
    color: var(--primary);
}

.slot-card .s-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Teachers Grid */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.selectable-item {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.selectable-item:hover:not(.disabled) {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateY(-2px);
}

.selectable-item.selected {
    background: #eff6ff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.selectable-item.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f8fafc;
    border-color: #e2e8f0;
}

/* Notice Box */
.info-callout {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==========================================================================
   DIGITAL STUDENT ID CARD
   ========================================================================= */
.digital-id-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: white;
    box-shadow: 0 15px 30px -5px rgba(30, 58, 138, 0.35);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.digital-id-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.id-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.id-chip {
    width: 38px;
    height: 28px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 5px;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.3);
}

.id-card-body {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.id-avatar {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    border: 2px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.id-info h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.id-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.id-detail-item .lbl {
    color: #cbd5e1;
}

.id-detail-item .val {
    font-weight: 700;
    color: white;
}

/* Rolling Milestones Grid */
.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.milestone-crit-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.milestone-crit-card.passed {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.milestone-crit-card.pending {
    border-color: #fed7aa;
    background: #fffaf5;
}

.crit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.crit-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.crit-val {
    font-size: 1.25rem;
    font-weight: 800;
}

/* ==========================================================================
   TABLES & PAGINATION (CLEAN LIGHT DESIGN)
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: #ffffff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.86rem;
}

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-subtle);
}

.data-table th {
    padding: 0.6rem 0.75rem;
    font-weight: 700;
    color: #475569;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.data-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
    font-size: 0.84rem;
}

.data-table tbody tr {
    transition: background 0.15s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Pagination Bar */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
    background: #fafafa;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-controls {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
}

.page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Search and Filter Row */
.table-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.search-input-wrap {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.search-input-wrap input {
    width: 100%;
    padding: 0.5rem 0.85rem 0.5rem 2rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: #ffffff;
}

.search-input-wrap .search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

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

.btn-success:hover:not(:disabled) {
    background: #047857;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #b45309;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #be123c;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:active:not(:disabled) {
    transform: scale(0.97) !important;
}

/* Small Button Utility */
.btn-sm {
    padding: 0.38rem 0.8rem !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    min-height: 32px !important;
    line-height: 1.25 !important;
}

/* ==========================================================================
   TEACHER QUICK FILTER PILLS (Modern Glassmorphic & Active Gradient)
   ========================================================================== */
.teacher-quick-filter-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.teacher-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.45rem 1.05rem;
    background: #ffffff;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.84rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    line-height: 1.25;
    min-height: 38px;
}

.teacher-filter-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.teacher-filter-pill.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
    transform: translateY(-1px);
}

.teacher-filter-pill.active:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45) !important;
}

.teacher-filter-pill:active {
    transform: scale(0.96) !important;
}

/* Session Type Selector in Booking (DAT vs Sa Hình) */
.session-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.55rem 1.15rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.session-type-btn:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
    background: #f0f7ff;
    transform: translateY(-1px);
}

.session-type-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transform: translateY(-1px);
}

.session-type-btn:active {
    transform: scale(0.97) !important;
}

/* Quick Fill Chips (Km, Duration, Route, Feedback) */
.quick-chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.38rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: #334155;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    min-height: 32px;
}

.quick-chip-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.12);
}

.quick-chip-btn:active {
    transform: scale(0.96) !important;
}

/* Student Touch Action Pills */
.student-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.student-action-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    color: #475569;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.student-action-pill:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.1);
}

.student-action-pill.active-pill {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
    transform: translateY(-1px);
}

.student-action-pill:active {
    transform: scale(0.96) !important;
}

/* Teacher Schedule Actions */
.teacher-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.btn-action-report {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.85rem !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.btn-action-report:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4) !important;
    transform: translateY(-1px) !important;
}

.btn-action-history {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 0.45rem 0.85rem !important;
    transition: all 0.2s ease !important;
}

.btn-action-history:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px) !important;
}

/* Teacher Portal Main Tabs */
.teacher-main-tab-btn {
    padding: 0.55rem 1.2rem !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.teacher-main-tab-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.teacher-main-tab-btn:active {
    transform: scale(0.97) !important;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.3;
}

.badge-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-danger { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.badge-info { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.badge-delayed { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.badge-gold { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.badge-standard { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-group {
    margin-bottom: 1.15rem;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ==========================================================================
   MODALS - PIXEL PERFECT PROFESSIONAL DIALOG SYSTEM
   ========================================================================== */
body.modal-open {
    overflow: hidden !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    overflow: hidden; /* Overlay shell never scrolls */
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-dialog {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 2.5rem);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* CRITICAL: Dialog container NEVER scrolls, preventing double scrollbar */
    padding: 0;
    border: 1px solid var(--border-subtle);
    position: relative;
    margin: auto;
}

/* Modal Header - Fixed at Top */
.modal-header,
.modal-dialog > .card-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    margin: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: #ffffff;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

/* Modal Body - The ONLY element that scrolls when content overflows */
.modal-body,
#student-pedagogical-content {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Required for proper flex scrolling */
    padding: 1.25rem 1.4rem;
    overscroll-behavior: contain;
}

/* Modal Footer - Fixed at Bottom */
.modal-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.4rem;
    border-top: 1px solid var(--border-subtle);
    background: #f8fafc;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

/* Custom Sleek Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar,
#student-pedagogical-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.modal-body::-webkit-scrollbar-track,
#student-pedagogical-content::-webkit-scrollbar-track {
    background: transparent;
}
.modal-body::-webkit-scrollbar-thumb,
#student-pedagogical-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}
.modal-body::-webkit-scrollbar-thumb:hover,
#student-pedagogical-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 420px;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.25s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--secondary); }

/* ==========================================================================
   PROGRESS TRACK
   ========================================================================== */
.progress-track {
    background: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* ==========================================================================
   SELECT2 CUSTOM MODERN THEME (PIXEL-PERFECT LUXURY STYLING)
   ========================================================================== */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

.select2-container--default {
    width: 100% !important;
    max-width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 44px !important;
    padding: 6px 14px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #94a3b8 !important;
    background-color: #f8fafc !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0f172a !important;
    line-height: normal !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    padding-left: 0 !important;
    padding-right: 28px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px !important;
    right: 10px !important;
    top: 1px !important;
    width: 20px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
    border-width: 5px 4px 0 4px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #2563eb transparent !important;
    border-width: 0 4px 5px 4px !important;
}

.select2-dropdown {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.06) !important;
    background: #ffffff !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}

.select2-search--dropdown {
    padding: 10px 12px !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.select2-search--dropdown .select2-search__field {
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.86rem !important;
    outline: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    background: #ffffff !important;
}

.select2-container--default .select2-results__options {
    max-height: 260px !important;
    padding: 6px !important;
}

.select2-container--default .select2-results__option {
    padding: 9px 12px !important;
    font-size: 0.86rem !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
    line-height: 1.35 !important;
    transition: all 0.15s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #2563eb !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-disabled=true] {
    color: #94a3b8 !important;
    background-color: #f8fafc !important;
    cursor: not-allowed !important;
    opacity: 0.85 !important;
    border-left: 3px solid #cbd5e1 !important;
}

/* ==========================================================================
   SESSION TYPE VISUAL SELECTOR CARDS
   ========================================================================== */
.session-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 0.25rem;
}

.session-type-card {
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.session-type-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.session-type-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 2.5px rgba(37, 99, 235, 0.2);
}

.session-type-card.active::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.session-type-card .st-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.session-type-card.active .st-icon {
    background: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.session-type-card .st-text {
    flex: 1;
    min-width: 0;
}

.session-type-card .st-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: #0f172a;
    margin-bottom: 2px;
}

.session-type-card.active .st-title {
    color: #1d4ed8;
}

.session-type-card .st-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
}

.assign-schedule-container {
    display: grid;
    grid-template-columns: minmax(340px, 420px) minmax(400px, 1fr);
    gap: 1.75rem;
    align-items: start;
}

@media (max-width: 960px) {
    .assign-schedule-container {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .session-type-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   LARGE SCREEN OPTIMIZATIONS (≥ 1400px)
   ========================================================================== */
@media (min-width: 1400px) {
    .main-wrapper {
        padding: 1.1rem 1.5rem;
    }

    .admin-sidebar {
        width: 215px;
    }

    .admin-nav-item {
        padding: 0.55rem 0.75rem;
        font-size: 0.82rem;
    }

    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.65rem;
        margin-bottom: 0.9rem;
    }

    .metric-box {
        padding: 0.8rem 1rem;
    }

    .glass-card {
        padding: 1rem 1.2rem;
        margin-bottom: 0.9rem;
    }

    .card-header {
        margin-bottom: 1rem;
        padding-bottom: 0.7rem;
    }

    .data-table th {
        padding: 0.5rem 0.65rem;
        font-size: 0.72rem;
    }

    .data-table td {
        padding: 0.5rem 0.65rem;
        font-size: 0.82rem;
    }

    .table-filter-bar {
        margin-bottom: 0.75rem;
        gap: 0.65rem;
    }

    .search-input-wrap {
        max-width: 260px;
    }

    .search-input-wrap input {
        padding: 0.4rem 0.75rem 0.4rem 1.8rem;
        font-size: 0.82rem;
    }

    .form-control {
        padding: 0.4rem 0.7rem;
        font-size: 0.82rem;
    }

    .btn {
        font-size: 0.82rem;
        padding: 0.45rem 1rem;
    }

    .pagination-wrapper {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   ULTRA-WIDE SCREENS (≥ 1800px)
   ========================================================================== */
@media (min-width: 1800px) {
    .main-wrapper {
        padding: 1rem 2rem;
    }

    .admin-layout {
        gap: 1.5rem;
    }

    .admin-sidebar {
        width: 230px;
    }

    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .data-table th {
        padding: 0.55rem 0.8rem;
    }

    .data-table td {
        padding: 0.55rem 0.8rem;
    }

    .glass-card {
        padding: 1.1rem 1.4rem;
    }
}

/* ==========================================================================
   TRAINING STATISTICS & PROGRESS BARS
   ========================================================================== */
.progress-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill-emerald {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 999px;
}

.progress-fill-primary {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #0284c7);
    border-radius: 999px;
}

/* ==========================================================================
   PRINT STYLES FOR TRAINING STATISTICS REPORT
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .admin-sidebar,
    .top-header,
    .app-header,
    .table-filter-bar,
    .btn,
    button,
    .no-print {
        display: none !important;
    }

    .admin-layout {
        display: block !important;
    }

    .admin-main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .glass-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .metrics-grid {
        display: flex !important;
        gap: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .metric-box {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        flex: 1 !important;
    }

    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .data-table th, .data-table td {
        border: 1px solid #ddd !important;
        padding: 6px 8px !important;
        font-size: 9pt !important;
    }
}

/* ==========================================================================
   STUDENT AVAILABILITY MATRIX & QUICK PRESETS (LỊCH RẢNH HỌC VIÊN HIỆN ĐẠI)
   ========================================================================== */
.avail-matrix-container {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.avail-presets-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 1.25rem;
}

.avail-preset-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.35rem;
}

.avail-preset-btn {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.avail-preset-btn:hover {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.12);
}

.avail-preset-btn.btn-clear:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.avail-matrix-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.avail-matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 780px;
}

.avail-matrix-table th, 
.avail-matrix-table td {
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    padding: 0.5rem;
    text-align: center;
}

.avail-matrix-table th:last-child,
.avail-matrix-table td:last-child {
    border-right: none;
}

.avail-matrix-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.75rem 0.5rem;
}

.avail-matrix-table th.time-col-header,
.avail-matrix-table td.time-col-cell {
    width: 130px;
    min-width: 130px;
    background: #f8fafc;
    text-align: left;
    padding: 0.65rem 0.85rem;
    position: sticky;
    left: 0;
    z-index: 1;
    border-right: 2px solid var(--border-subtle);
}

.avail-matrix-table thead th.time-col-header {
    z-index: 3;
}

.avail-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.avail-day-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.avail-day-date {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
}

.avail-day-header.today .avail-day-name {
    color: var(--primary);
}

.avail-day-header.today .avail-day-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    margin-top: 0.15rem;
}

/* Individual Slot Cell */
.avail-slot-cell {
    min-height: 54px;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.4rem;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    user-select: none;
    position: relative;
}

.avail-slot-cell:hover:not(.is-past):not(.is-scheduled) {
    border-color: var(--primary);
    background: #f0f7ff;
    transform: scale(1.02);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15);
    z-index: 2;
}

.avail-slot-cell .cell-status-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

/* State: Selected in draft */
.avail-slot-cell.is-selected {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 1px solid #1e40af;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transform: scale(1.02);
    z-index: 2;
}

.avail-slot-cell.is-selected .cell-status-text {
    color: #ffffff;
    font-weight: 700;
}

.avail-slot-cell.is-selected .cell-icon {
    font-size: 0.95rem;
}

/* State: Already submitted, pending */
.avail-slot-cell.is-pending {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    cursor: pointer;
}

.avail-slot-cell.is-pending:hover {
    background: #fde68a;
    border-color: #f59e0b;
}

.avail-slot-cell.is-pending .cell-status-text {
    color: #92400e;
    font-weight: 700;
}

/* State: Scheduled / Booked */
.avail-slot-cell.is-scheduled {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    cursor: default;
}

.avail-slot-cell.is-scheduled .cell-status-text {
    color: #166534;
    font-weight: 700;
}

/* State: Past Date (Disabled) */
.avail-slot-cell.is-past {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.avail-slot-cell.is-past .cell-status-text {
    color: #94a3b8;
}

/* Avail Summary & Action Box */
.avail-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.15rem 1.35rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.avail-staged-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 120px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.avail-chip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.avail-chip .btn-remove-chip {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1;
}

.avail-chip .btn-remove-chip:hover {
    color: #ef4444;
}

/* ==========================================================================
   TIMETABLE MATRIX: WEEK VIEW & SCHEDULE DETAIL MODAL
   ========================================================================== */
.timetable-mode-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
}

.timetable-mode-toggle .btn-mode {
    border: none;
    background: transparent;
    padding: 0.42rem 0.85rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.timetable-mode-toggle .btn-mode:hover {
    color: var(--text-main);
}

.timetable-mode-toggle .btn-mode.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Weekly Table Grid */
.timetable-week-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1080px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.timetable-week-table th {
    background: #f8fafc;
    padding: 0.75rem 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    border-bottom: 2px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
}

.timetable-week-table th:last-child {
    border-right: none;
}

.timetable-week-table th.col-slot-header {
    width: 130px;
    background: #f1f5f9;
    color: var(--text-muted);
}

.timetable-week-table th.col-today {
    background: #eff6ff;
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.timetable-week-table td {
    vertical-align: top;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    background: #ffffff;
    height: 110px;
    transition: background 0.15s ease;
}

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

.timetable-week-table td:last-child {
    border-right: none;
}

.timetable-week-table td.col-slot-info {
    background: #f8fafc;
    text-align: center;
    vertical-align: middle;
    width: 130px;
    padding: 0.6rem 0.4rem;
}

.timetable-week-table td.col-today {
    background: rgba(239, 246, 255, 0.35);
}

.timetable-week-table td.is-weekend {
    background: rgba(248, 250, 252, 0.5);
}

/* Interactive Session Card in Cell */
.timetable-session-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-left: 3.5px solid var(--primary);
    border-radius: 8px;
    padding: 0.5rem 0.55rem;
    margin-bottom: 0.45rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.timetable-session-card:last-child {
    margin-bottom: 0;
}

.timetable-session-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
    border-color: #cbd5e1;
    border-left-color: var(--primary);
}

.timetable-session-card.type-dat {
    border-left-color: #2563eb;
    background: linear-gradient(to right, #f8fafc 0%, #ffffff 100%);
}

.timetable-session-card.type-sahinh {
    border-left-color: #059669;
    background: linear-gradient(to right, #f0fdf4 0%, #ffffff 100%);
}

.timetable-session-card.is-waiting-veh {
    border-left-color: #f59e0b;
}

.timetable-session-card.status-completed {
    border-left-color: #64748b;
    opacity: 0.85;
}

.timetable-session-card.status-cancelled {
    border-left-color: #ef4444;
    background: #fef2f2;
    opacity: 0.7;
}

.timetable-session-card.status-no_show {
    border-left-color: #dc2626;
    background: #fff1f2;
}

.card-student-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.2rem;
}

.card-student-name {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-teacher-row {
    font-size: 0.73rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 3px;
}

.card-vehicle-row {
    font-size: 0.72rem;
    font-weight: 700;
    margin-top: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.veh-assigned {
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.veh-waiting {
    color: #d97706;
    background: #fef3c7;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

/* Empty Slot Hover Button */
.cell-empty-action {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.78rem;
    border: 1px dashed transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0.4rem;
}

.timetable-week-table td:hover .cell-empty-action {
    display: flex;
    border-color: #cbd5e1;
    background: rgba(241, 245, 249, 0.4);
    color: var(--primary);
}

/* Direct Matrix Scheduling Hover Button & Cell Layout */
.timetable-week-table td {
    position: relative;
}

.cell-matrix-hover-wrap {
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-top: 0.35rem;
    display: flex;
    justify-content: center;
}

.timetable-week-table td:hover .cell-matrix-hover-wrap {
    opacity: 1;
    transform: translateY(0);
}

.btn-cell-assign {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.35rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    border: 1px dashed #3b82f6;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.12);
    transition: all 0.15s ease;
}

.btn-cell-assign:hover {
    background: #2563eb;
    color: #ffffff;
    border-style: solid;
    border-color: #1d4ed8;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
}

.cell-empty-matrix-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 85px;
    width: 100%;
    height: 100%;
    border: 1px dashed transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0.4rem;
    transition: all 0.15s ease;
}

.cell-empty-matrix-box .cell-empty-assign-text {
    opacity: 0;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    background: #eff6ff;
    border: 1px dashed #3b82f6;
    border-radius: 5px;
    transition: opacity 0.15s ease;
}

.timetable-week-table td:hover .cell-empty-matrix-box {
    border-color: #93c5fd;
    background: rgba(239, 246, 255, 0.5);
}

.timetable-week-table td:hover .cell-empty-matrix-box .cell-empty-assign-text {
    opacity: 1;
}

.badge-avail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 2px 7px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    box-shadow: 0 1px 2px rgba(217, 119, 6, 0.1);
}

/* Premium Matrix Slot Modal & Table Styles */
.matrix-modal-dialog {
    max-width: 1180px !important;
    width: 96vw !important;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3) !important;
    border: 1px solid #e2e8f0;
}

.matrix-metric-card {
    border-radius: 14px;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.matrix-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.matrix-metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.matrix-student-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.matrix-rank-badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.2);
}

.matrix-rank-badge.top-1 {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.matrix-select {
    width: 100%;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.42rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e293b;
    background-color: #ffffff;
    transition: all 0.15s ease;
}

.matrix-select:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.matrix-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.matrix-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
}

.matrix-table td {
    padding: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    background: #ffffff;
    transition: background 0.15s ease;
}

.matrix-table tr:hover td {
    background: #f8fafc;
}

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

/* Modal Details Grid Layout */
.schedule-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.schedule-detail-section {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1rem;
}

.schedule-detail-section.full-width {
    grid-column: span 2;
}

.section-title-sm {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

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

.detail-info-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.detail-info-value {
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}

/* ==========================================================================
   TEACHER RATINGS & STUDENT REVIEWS COMPONENT
   ========================================================================== */
.star-rating-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.6rem 0;
}

.star-pick-btn {
    background: none;
    border: none;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
    color: #cbd5e1;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease, filter 0.15s ease;
    padding: 0 0.15rem;
    outline: none;
}

.star-pick-btn:hover {
    transform: scale(1.22);
}

.star-pick-btn.active,
.star-pick-btn.hovered {
    color: #f59e0b;
    filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.45));
}

.star-rating-hint {
    font-size: 0.85rem;
    font-weight: 700;
    color: #d97706;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    transition: color 0.2s ease;
}

.review-quote-box {
    background: rgba(248, 250, 252, 0.8);
    border-left: 3px solid #f59e0b;
    border-radius: 0 8px 8px 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.45;
    position: relative;
    font-style: normal;
}

.badge-star {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
}

.badge-star-5 { background: #fef3c7; color: #b45309; border-color: rgba(245, 158, 11, 0.5); }
.badge-star-4 { background: #ecfdf5; color: #047857; border-color: rgba(16, 185, 129, 0.35); }
.badge-star-3 { background: #f0fdf4; color: #15803d; border-color: rgba(34, 197, 94, 0.3); }
.badge-star-2 { background: #fff7ed; color: #c2410c; border-color: rgba(249, 115, 22, 0.35); }
.badge-star-1 { background: #fef2f2; color: #b91c1c; border-color: rgba(239, 68, 68, 0.35); }

.review-card-item {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.review-card-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   GLOBAL SLIDE-OUT MOBILE HAMBURGER DRAWER MENU
   ========================================================================== */
.btn-hamburger,
#btn-mobile-hamburger {
    display: none; /* Hidden on desktop (PC), shown via responsive.css on mobile */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.btn-hamburger:hover,
#btn-mobile-hamburger:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.btn-hamburger:active,
#btn-mobile-hamburger:active {
    transform: scale(0.92);
}

.btn-hero-drawer {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 0.45rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 800;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    margin-left: auto;
}

.btn-hero-drawer:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-hero-drawer:active {
    transform: scale(0.96);
}

.hamburger-bar {
    display: block;
    width: 18px;
    height: 2.2px;
    background: #1e293b;
    border-radius: 2px;
    pointer-events: none; /* Allows click events to pass directly to button */
    transition: all 0.2s ease;
}

/* Drawer Overlay Backdrop */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9990;
    opacity: 0;
    visibility: hidden;
    display: none;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
}

.drawer-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    pointer-events: auto !important;
}

/* Slide-out Mobile Drawer Menu */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 86vw;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 9995;
    box-shadow: none; /* Không đổ bóng khi đóng để loại bỏ hoàn toàn vệt tối bên mép trái */
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s, box-shadow 0.28s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mobile-drawer.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    display: flex !important;
    pointer-events: auto !important;
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.25) !important;
}

.drawer-header {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    padding: 1.25rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
}

.drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    flex-shrink: 0;
}

.drawer-name {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    line-height: 1.25;
}

.drawer-meta {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.25rem;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.85rem;
    -webkit-overflow-scrolling: touch;
}

.drawer-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 0.65rem;
    padding-left: 0.4rem;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #334155;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.drawer-nav-item:hover {
    background: #f8fafc;
}

.drawer-nav-item:active {
    background: #f1f5f9;
    transform: scale(0.98);
}

.drawer-nav-item.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.drawer-nav-item.active .drawer-item-title {
    color: #1d4ed8;
    font-weight: 800;
}

.drawer-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.drawer-item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.drawer-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1e293b;
}

.drawer-item-desc {
    font-size: 0.75rem;
    color: #64748b;
}

.drawer-footer {
    padding: 1rem 0.85rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

/* Base Mobile Bottom Nav: ALWAYS hidden on PC desktop by default */
.mobile-bottom-nav,
body.has-bottom-nav .mobile-bottom-nav {
    display: none !important;
}

/* ==========================================================================
   THEORY & GPLX MOCK EXAM MODULE STYLES (MOBILE-FIRST)
   ========================================================================== */
.theory-hero-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.theory-hero-card::after {
    content: "🚗";
    position: absolute;
    right: 1.5rem;
    bottom: -1rem;
    font-size: 8rem;
    opacity: 0.12;
    pointer-events: none;
}

.theory-hero-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    margin-bottom: 0.65rem;
}

.theory-hero-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.35rem;
    color: #ffffff;
    line-height: 1.3;
}

.theory-hero-subtitle {
    font-size: 0.9rem;
    color: #bfdbfe;
    margin-bottom: 1.25rem;
    max-width: 650px;
    line-height: 1.45;
}

.theory-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
}

.theory-stat-box {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
}

.theory-stat-val {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
}

.theory-stat-lbl {
    font-size: 0.74rem;
    color: #e0e7ff;
    margin-top: 0.15rem;
}

/* 3 Theory Modes Grid */
.theory-modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.theory-mode-card {
    background: var(--card-bg);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.theory-mode-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.15);
}

.theory-mode-card.featured {
    border-color: #16a34a;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.theory-mode-ribbon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
}

.theory-mode-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.theory-mode-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}

.theory-mode-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.theory-mode-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.theory-mode-action-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Chapter Pill Grid */
.theory-chapters-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.65rem;
}

.theory-chapter-pill {
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.theory-chapter-pill:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    transform: translateX(2px);
}

.theory-chapter-pill strong {
    font-size: 0.85rem;
    color: var(--text-main);
}

.theory-chapter-pill span.count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #e2e8f0;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    font-weight: 700;
}

/* ==========================================================================
   THEORY IMMERSIVE VIEW & MODERN TOPBAR (FULLSCREEN FOCUS MODE)
   ========================================================================== */

/* 1. Khi đang làm bài/thi thử, ẩn hoàn toàn mọi thành phần khác của website */
#student-portal-view.tab-theory-active #student-header-card {
    display: none !important;
}

body.theory-quiz-mode {
    background: #f8fafc !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

body.theory-quiz-mode #main-topbar,
body.theory-quiz-mode #student-header-card,
body.theory-quiz-mode .student-nav-tabs,
body.theory-quiz-mode #mobile-bottom-nav,
body.theory-quiz-mode .mobile-drawer,
body.theory-quiz-mode .drawer-overlay,
body.theory-quiz-mode #btn-mobile-hamburger,
body.theory-quiz-mode #btn-reset-db,
body.theory-quiz-mode .app-footer,
body.theory-quiz-mode #theory-dashboard-screen {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

body.theory-quiz-mode .main-wrapper,
body.theory-quiz-mode #student-portal-view,
body.theory-quiz-mode #student-tab-theory {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    overflow: visible !important;
    contain: none !important;
    transform: none !important;
}

body.theory-quiz-mode #theory-quiz-screen {
    display: block !important;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0.5rem 0.75rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    overflow: visible !important;
}

/* Modern Sticky Topbar: Luôn dính trên đỉnh khi cuộn xuống */
.theory-modern-topbar {
    position: -webkit-sticky;
    position: sticky;
    top: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
    margin-bottom: 1rem;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    transition: box-shadow 0.25s ease;
}

/* Top Row: Exit | Timer/Mode | Palette */
.theory-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem 0.45rem;
}

/* Buttons in Topbar */
.theory-topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.75rem;
    border-radius: 99px;
    border: 1px solid var(--border-subtle);
    background: #f8fafc;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

.theory-topbar-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.theory-topbar-btn:active {
    transform: scale(0.96);
}

.theory-btn-exit {
    color: #64748b;
    background: #f1f5f9;
}

.theory-btn-exit:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.theory-btn-palette {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.theory-btn-palette:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.palette-counter-badge {
    background: #2563eb;
    color: #ffffff;
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-left: 0.15rem;
}

/* Center Timer & Mode Pill */
.theory-topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.theory-modern-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1.5px solid #fca5a5;
    padding: 0.35rem 0.95rem;
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

.timer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #dc2626;
    animation: timerPulse 1.2s infinite ease-in-out;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.theory-modern-timer .timer-icon {
    font-size: 1rem;
    line-height: 1;
}

.theory-modern-timer .timer-text {
    font-size: 1.18rem;
    font-weight: 900;
    color: #b91c1c;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    line-height: 1;
}

.theory-modern-timer.warning {
    background: #fffbeb;
    border-color: #fde68a;
}
.theory-modern-timer.warning .timer-text { color: #d97706; }
.theory-modern-timer.warning .timer-dot { background: #d97706; }

.theory-modern-timer.danger {
    background: #ef4444;
    border-color: #dc2626;
    animation: dangerShake 0.6s infinite alternate;
}
.theory-modern-timer.danger .timer-text { color: #ffffff; }
.theory-modern-timer.danger .timer-dot { background: #ffffff; }

/* Practice Mode Badge */
.theory-modern-mode-badge {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Sub Row: Topic Name & Question Count */
.theory-topbar-subrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.95rem 0.55rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(241, 245, 249, 0.9);
}

.theory-subrow-title {
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 65%;
}

.theory-subrow-progress {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Progress Track & Fill */
.theory-topbar-progress-track {
    width: 100%;
    height: 3.5px;
    background: #e2e8f0;
    overflow: hidden;
}

.theory-topbar-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
    border-radius: 0 2px 2px 0;
    transition: width 0.3s ease;
}

/* Quiz Body */
.theory-quiz-body {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 1.25rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .theory-quiz-body {
        grid-template-columns: 1fr;
    }
}

.theory-question-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.theory-question-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.theory-question-index {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
}

.badge-diem-liet-pill {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    animation: pulseDiemLiet 2s infinite ease-in-out;
}

@keyframes pulseDiemLiet {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.75; }
}

.theory-chapter-tag {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.theory-question-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

/* Question Image */
.theory-image-wrap {
    text-align: center;
    margin: 1rem 0 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem;
    position: relative;
    cursor: pointer;
}

.theory-image-wrap img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s;
}

.theory-image-wrap:hover img {
    transform: scale(1.02);
}

.theory-image-zoom-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* Options Touch Cards */
.theory-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theory-option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1.15rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 52px;
}

.theory-option-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.theory-option-item:active {
    transform: scale(0.99);
}

.theory-option-label {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.theory-option-text {
    font-size: 0.98rem;
    color: var(--text-main);
    line-height: 1.45;
    flex: 1;
}

/* Option Selected State (Exam Mode) */
.theory-option-item.selected {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px #2563eb;
}

.theory-option-item.selected .theory-option-label {
    background: #2563eb;
    color: #ffffff;
}

/* Option Correct State (Practice / Review) */
.theory-option-item.correct-answer {
    background: #f0fdf4 !important;
    border-color: #16a34a !important;
    box-shadow: 0 0 0 1px #16a34a;
}

.theory-option-item.correct-answer .theory-option-label {
    background: #16a34a !important;
    color: #ffffff !important;
}

/* Option Wrong State */
.theory-option-item.wrong-answer {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px #dc2626;
}

.theory-option-item.wrong-answer .theory-option-label {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* Explanation Box */
.theory-explanation-box {
    margin-top: 1.25rem;
    padding: 1rem 1.2rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    color: #166534;
    animation: fadeIn 0.25s ease-out;
}

.theory-explanation-header {
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.theory-explanation-content {
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Bottom Navigation */
.theory-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
    gap: 0.5rem;
}

.theory-nav-btn {
    padding: 0.65rem 1.15rem;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: 9px;
}

.theory-nav-counter {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* Matrix Sidebar & Palette */
.theory-matrix-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 70px;
}

.theory-matrix-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.theory-matrix-close-mobile {
    display: none;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
}

.theory-matrix-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

.matrix-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.matrix-btn:hover {
    border-color: var(--primary);
}

.matrix-btn.current {
    border: 2px solid #2563eb !important;
    color: #2563eb !important;
    font-weight: 900;
    transform: scale(1.05);
}

.matrix-btn.answered {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.matrix-btn.correct {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
}

.matrix-btn.wrong {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border-color: #fca5a5 !important;
}

.theory-matrix-legend {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.73rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.unanswered { background: #f8fafc; border: 1px solid #cbd5e1; }
.legend-dot.answered { background: #dbeafe; }
.legend-dot.current { border: 2px solid #2563eb; }

/* Result Screen */
.theory-result-container {
    max-width: 680px;
    margin: 1.5rem auto;
    text-align: center;
}

.theory-result-banner {
    border-radius: 20px;
    padding: 2.25rem 2rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
}

.theory-result-banner.pass {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.theory-result-banner.fail {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.theory-result-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.theory-result-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.65rem;
    color: #ffffff;
}

.theory-result-score-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.theory-result-score-num {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1;
}

.theory-result-score-total {
    font-size: 1.4rem;
    opacity: 0.85;
}

.theory-result-summary {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.45;
}

.theory-result-details-card {
    background: var(--card-bg);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.theory-result-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.result-stat-box {
    padding: 0.85rem 0.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-stat-box.success { background: #f0fdf4; color: #166534; }
.result-stat-box.danger { background: #fef2f2; color: #991b1b; }
.result-stat-box.warning { background: #fffbeb; color: #92400e; }
.result-stat-box.neutral { background: #f8fafc; color: #334155; }

.result-stat-box .stat-number {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
}

.result-stat-box .stat-label {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.theory-result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Image Modal */
.theory-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.theory-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.5rem;
}

.theory-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.theory-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dc2626;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile responsive drawer for Question Matrix on screens <= 900px */
@media (max-width: 900px) {
    .theory-matrix-col {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: rgba(0, 0, 0, 0.5);
        display: none;
        padding: 0;
    }

    .theory-matrix-col.mobile-open {
        display: flex;
        align-items: flex-end;
    }

    .theory-matrix-card {
        width: 100%;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
        position: static;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
        animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .theory-matrix-close-mobile {
        display: block;
    }

    .theory-matrix-grid {
        grid-template-columns: repeat(6, 1fr);
        max-height: 50vh;
    }

    .theory-stats-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .theory-result-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   THEORY SWIPE ANIMATIONS & MOBILE HINT
   ========================================================================== */
@keyframes theorySlideInRight {
    from {
        opacity: 0.3;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes theorySlideInLeft {
    from {
        opacity: 0.3;
        transform: translateX(-28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.theory-question-card.slide-left {
    animation: theorySlideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theory-question-card.slide-right {
    animation: theorySlideInLeft 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.theory-swipe-hint {
    display: none;
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    user-select: none;
    letter-spacing: -0.01em;
}

@media (max-width: 900px) {
    .theory-swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}

/* ==========================================================================
   ULTRA-PREMIUM SENSOR / CHIP PRACTICE SCHEDULING MODULE
   ========================================================================== */
.sensor-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}

.sensor-kpi-card {
    position: relative;
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.sensor-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1), 0 10px 12px -5px rgba(0, 0, 0, 0.04);
}

.sensor-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.sensor-kpi-blue {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
    border-color: #bfdbfe;
}
.sensor-kpi-emerald {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border-color: #a7f3d0;
}
.sensor-kpi-amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
    border-color: #fde68a;
}
.sensor-kpi-purple {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #e9d5ff 100%);
    border-color: #e9d5ff;
}

.sensor-kpi-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.sensor-kpi-blue .sensor-kpi-icon-wrap { background: #2563eb; color: #fff; }
.sensor-kpi-emerald .sensor-kpi-icon-wrap { background: #059669; color: #fff; }
.sensor-kpi-amber .sensor-kpi-icon-wrap { background: #d97706; color: #fff; }
.sensor-kpi-purple .sensor-kpi-icon-wrap { background: #7c3aed; color: #fff; }

.sensor-kpi-meta { flex: 1; min-width: 0; }
.sensor-kpi-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.25rem; }
.sensor-kpi-blue .sensor-kpi-title { color: #1e40af; }
.sensor-kpi-emerald .sensor-kpi-title { color: #065f46; }
.sensor-kpi-amber .sensor-kpi-title { color: #92400e; }
.sensor-kpi-purple .sensor-kpi-title { color: #5b21b6; }

.sensor-kpi-num { font-size: 1.85rem; font-weight: 900; line-height: 1.1; margin-bottom: 0.2rem; }
.sensor-kpi-blue .sensor-kpi-num { color: #1e3a8a; }
.sensor-kpi-emerald .sensor-kpi-num { color: #064e3b; }
.sensor-kpi-amber .sensor-kpi-num { color: #78350f; }
.sensor-kpi-purple .sensor-kpi-num { color: #4c1d95; }

.sensor-kpi-desc { font-size: 0.76rem; font-weight: 600; color: #475569; }

/* Filter Bar Modern */
.sensor-filter-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.sensor-filter-search-box {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.sensor-filter-search-box input {
    width: 100%;
    padding: 0.55rem 0.85rem 0.55rem 2.25rem;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.sensor-filter-search-box input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.sensor-filter-search-box .icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
}

.sensor-filter-select {
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sensor-filter-select:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Practice Type Segmented Selector in Modal */
.practice-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.practice-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    user-select: none;
}

.practice-type-card:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.practice-type-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.practice-type-card .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.practice-type-card.type-sahinh .icon-box { background: #dcfce7; color: #15803d; }
.practice-type-card.type-duongtruong .icon-box { background: #fef3c7; color: #b45309; }

.practice-type-card .label-box h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 800;
    color: #1e293b;
}

.practice-type-card .label-box p {
    margin: 2px 0 0;
    font-size: 0.74rem;
    color: #64748b;
}

/* Duration Presets */
.duration-preset-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.duration-preset-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.duration-preset-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Student Chips Container */
.sensor-student-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    margin-bottom: 0.85rem;
    align-items: center;
}

.sensor-student-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1.5px solid #93c5fd;
    border-radius: 24px;
    padding: 0.3rem 0.75rem 0.3rem 0.4rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: chipFadeIn 0.2s ease-out;
}

@keyframes chipFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.sensor-chip-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sensor-chip-info {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e3a8a;
    line-height: 1.2;
}

.sensor-chip-info small {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
}

.sensor-chip-btn-remove {
    background: #f1f5f9;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 2px;
}

.sensor-chip-btn-remove:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Candidate Picker Item */
.sensor-candidate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.sensor-candidate-card:hover {
    background: #f8fafc;
}

.sensor-candidate-card:last-child {
    border-bottom: none;
}

.sensor-candidate-btn-add {
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid #3b82f6;
    background: #eff6ff;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sensor-candidate-btn-add:hover {
    background: #2563eb;
    color: #ffffff;
}

.sensor-candidate-btn-add.is-added {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* Modern Score Entry Card */
.sensor-score-student-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.sensor-score-student-card.pass {
    border-color: #86efac;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.sensor-score-student-card.fail {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%);
}

.score-badge-result {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.score-badge-result.pass { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.score-badge-result.fail { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.score-badge-result.pending { background: #fef3c7; color: #92400e; border: 1px solid #fde047; }

/* Vehicle Source Toggle Cards (Xe Trung Tâm vs Xe Thuê Ngoài) */
.vehicle-source-card {
    cursor: pointer;
    padding: 0.6rem 0.85rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.vehicle-source-card:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.vehicle-source-card.active.source-center {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.vehicle-source-card.active.source-rental {
    border-color: #d97706;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.14);
}

