/* ==========================================================================
   HUTECH IT Got Talent - Backoffice Design System
   Clean, flat institutional UI compatible with Bootstrap 5.3.9 & FA 4.7
   ========================================================================== */

@font-face {
    font-family: 'CertDefault';
    src: url('/assets/fonts/font-default.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'CertDefault';
    src: url('/assets/fonts/font_bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bo-bg: #f8fafc;
    --bo-surface: #ffffff;
    --bo-surface-muted: #f1f5f9;
    --bo-border: #e2e8f0;
    --bo-border-strong: #cbd5e1;
    --bo-text: #0f172a;
    --bo-text-secondary: #334155;
    /* Tăng độ tương phản chữ phụ đạt chuẩn WCAG AA trên nền trắng/nhạt */
    --bo-text-muted: #475569;
    --bo-primary: #1d4ed8;
    --bo-primary-hover: #1e40af;
    --bo-primary-soft: #eff6ff;
    --bo-accent: #b91c1c;
    --bo-accent-soft: #fef2f2;
    --bo-success: #15803d;
    --bo-success-soft: #dcfce7;
    --bo-warning: #b45309;
    --bo-warning-soft: #fef3c7;
    --bo-danger: #b91c1c;
    --bo-danger-soft: #fee2e2;
    --bo-info: #0369a1;
    --bo-info-soft: #e0f2fe;
    --bo-radius: 0.5rem;
    --bo-radius-sm: 0.375rem;
    --bo-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --bo-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --bo-sidebar-width: 256px;
    --bo-topbar-height: 58px;
}

body.bo-body {
    background-color: var(--bo-bg);
    color: var(--bo-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
}

.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Auth layout */
body.bo-auth-body {
    background-color: var(--bo-bg);
    color: var(--bo-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.bo-auth-card {
    background: var(--bo-surface);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-shadow-md);
    width: 100%;
    max-width: 440px;
}

/* App Shell */
.bo-app {
    display: flex;
    min-height: 100vh;
}

.bo-sidebar {
    width: var(--bo-sidebar-width);
    background-color: var(--bo-surface);
    border-right: 1px solid var(--bo-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
}

body.bo-sidebar-animating .bo-sidebar {
    transition: transform 0.2s ease-in-out;
}

.bo-sidebar-brand {
    height: var(--bo-topbar-height);
    padding: 0 1rem;
    border-bottom: 1px solid var(--bo-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--bo-text);
}

.bo-brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bo-text);
    text-decoration: none;
}

.bo-brand-dot {
    width: 28px;
    height: 28px;
    border-radius: var(--bo-radius-sm);
    background-color: var(--bo-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bo-sidebar-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.875rem 0.75rem 1.25rem;
}

.bo-nav-group + .bo-nav-group {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bo-border);
}

.bo-nav-group-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bo-text-muted);
    padding: 0 0.625rem 0.375rem;
}

.bo-nav-group--pinned {
    margin-bottom: 0.25rem;
}

.bo-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0.35rem 0.625rem;
    border-radius: var(--bo-radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bo-text-muted);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.bo-nav-group-toggle:hover {
    background-color: var(--bo-surface-muted);
    color: var(--bo-text);
}

.bo-nav-chevron {
    font-size: 0.7rem;
    transition: transform 0.16s ease;
}

.bo-nav-group-toggle[aria-expanded="false"] .bo-nav-chevron {
    transform: rotate(-90deg);
}

.bo-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    background-color: #dc2626;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

.bo-nav-list {
    list-style: none;
    margin: 0.25rem 0 0;
    padding: 0;
}

.bo-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.45rem 0.625rem;
    border-radius: var(--bo-radius-sm);
    color: var(--bo-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.bo-nav-link .fa {
    width: 16px;
    text-align: center;
    color: var(--bo-text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bo-nav-link:hover {
    background-color: var(--bo-surface-muted);
    color: var(--bo-text);
}

.bo-nav-link:hover .fa {
    color: var(--bo-primary);
}

.bo-nav-link.active {
    background-color: var(--bo-primary-soft);
    color: var(--bo-primary);
    font-weight: 600;
}

.bo-nav-link.active .fa {
    color: var(--bo-primary);
}

.bo-sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--bo-border);
    background-color: var(--bo-bg);
    font-size: 0.8125rem;
}

.bo-main-wrap {
    flex: 1 1 auto;
    margin-left: var(--bo-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.bo-sidebar-animating .bo-main-wrap {
    transition: margin-left 0.2s ease-in-out;
}

@media (min-width: 992px) {
    body.bo-sidebar-collapsed .bo-sidebar {
        transform: translateX(-100%);
    }
    body.bo-sidebar-collapsed .bo-main-wrap {
        margin-left: 0;
    }
}

.bo-topbar {
    height: var(--bo-topbar-height);
    background-color: var(--bo-surface);
    border-bottom: 1px solid var(--bo-border);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.bo-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.bo-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
}

.bo-content {
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem 2rem;
    max-width: 100%;
}

.bo-content a,
.bo-content button,
.bo-content input,
.bo-content select,
.bo-content tr {
    scroll-margin-top: calc(var(--bo-topbar-height) + 1rem);
}

.bo-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .bo-sidebar {
        transform: translateX(-100%);
    }
    body.bo-sidebar-open .bo-sidebar {
        transform: translateX(0);
    }
    body.bo-sidebar-open .bo-backdrop {
        display: block;
    }
    .bo-main-wrap {
        margin-left: 0;
    }
    .bo-content {
        padding: 1rem;
    }
}

/* Season Switcher & Archive Banner */
.bo-season-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: var(--bo-surface-muted);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

.bo-season-select {
    border: 0;
    background: transparent;
    color: var(--bo-text);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
}

/* Giữ vòng focus rõ ràng cho bàn phím thay vì xóa outline */
.bo-season-select:focus-visible {
    outline: 2px solid var(--bo-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.bo-archive-banner {
    background-color: var(--bo-warning-soft);
    border-bottom: 1px solid #f59e0b;
    color: #78350f;
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 575.98px) {
    .bo-topbar {
        padding: 0 0.625rem;
        gap: 0.35rem;
    }
    .bo-role-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.45rem;
    }
    .bo-season-pill {
        padding: 0.18rem 0.35rem;
        gap: 0.2rem;
    }
    .bo-season-select {
        max-width: 170px;
        font-size: 0.75rem;
        padding: 0.05rem 0.15rem;
    }
}

/* Role Badges */
.bo-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.bo-role-badge--admin { background: var(--bo-primary-soft); color: var(--bo-primary); border: 1px solid #bfdbfe; }
.bo-role-badge--sponsor { background: var(--bo-surface-muted); color: var(--bo-text-secondary); border: 1px solid var(--bo-border-strong); }
.bo-role-badge--chief { background: var(--bo-accent-soft); color: var(--bo-accent); border: 1px solid #fecaca; }
.bo-role-badge--judge { background: var(--bo-info-soft); color: var(--bo-info); border: 1px solid #bae6fd; }
.bo-role-badge--secretary { background: var(--bo-success-soft); color: var(--bo-success); border: 1px solid #bbf7d0; }

/* Cards, Headers, Tables & Semantic Badges (Bootstrap 5.3.9) */
.bo-card {
    background-color: var(--bo-surface);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-shadow-sm);
}

.bo-card-header {
    padding: 0.875rem 1.125rem;
    border-bottom: 1px solid var(--bo-border);
    background-color: var(--bo-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top-left-radius: var(--bo-radius);
    border-top-right-radius: var(--bo-radius);
}

.bo-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--bo-text);
}

.bo-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.bo-page-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--bo-text);
    margin: 0;
    line-height: 1.3;
}

.bo-page-subtitle {
    font-size: 0.875rem;
    color: var(--bo-text-muted);
    margin: 0.25rem 0 0;
}

.bo-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--bo-text-muted);
    margin-bottom: 0.25rem;
}

.bo-breadcrumb a {
    color: var(--bo-text-muted);
    text-decoration: none;
}

.bo-breadcrumb a:hover {
    color: var(--bo-primary);
    text-decoration: underline;
}

/* KPI Stat Cards (Flat, clean, zero 45deg gradients or bounce) */
.bo-stat-card {
    background-color: var(--bo-surface);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    box-shadow: var(--bo-shadow-sm);
    padding: 1rem 1.125rem;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.bo-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--bo-text-muted);
    margin-bottom: 0.25rem;
}

.bo-stat-value {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bo-text);
    font-variant-numeric: tabular-nums;
}

.bo-stat-hint {
    font-size: 0.78rem;
    color: var(--bo-text-muted);
    margin-top: 0.25rem;
}

.bo-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--bo-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.bo-stat-icon--primary { background: var(--bo-primary-soft); color: var(--bo-primary); }
.bo-stat-icon--success { background: var(--bo-success-soft); color: var(--bo-success); }
.bo-stat-icon--warning { background: var(--bo-warning-soft); color: var(--bo-warning); }
.bo-stat-icon--danger  { background: var(--bo-danger-soft);  color: var(--bo-danger); }
.bo-stat-icon--info    { background: var(--bo-info-soft);    color: var(--bo-info); }
.bo-stat-icon--neutral { background: var(--bo-surface-muted); color: var(--bo-text-secondary); }

/* Semantic Soft Badges (WCAG compliant contrast) */
.bo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25em 0.6em;
    border-radius: var(--bo-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.bo-badge-primary { background-color: var(--bo-primary-soft); color: var(--bo-primary); border: 1px solid #bfdbfe; }
.bo-badge-success { background-color: var(--bo-success-soft); color: var(--bo-success); border: 1px solid #bbf7d0; }
.bo-badge-warning { background-color: var(--bo-warning-soft); color: var(--bo-warning); border: 1px solid #fde68a; }
.bo-badge-danger  { background-color: var(--bo-danger-soft);  color: var(--bo-danger);  border: 1px solid #fecaca; }
.bo-badge-info    { background-color: var(--bo-info-soft);    color: var(--bo-info);    border: 1px solid #bae6fd; }
.bo-badge-neutral { background-color: var(--bo-surface-muted); color: var(--bo-text-secondary); border: 1px solid var(--bo-border); }

/* Tables */
.bo-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.bo-table thead th {
    --bs-table-bg: var(--bo-bg);
    background-color: var(--bo-bg);
    color: var(--bo-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--bo-border);
    padding: 0.65rem 0.75rem;
    white-space: nowrap;
}

.bo-table tbody td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--bo-border);
    vertical-align: middle;
}

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

/* Charts */
.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
}

.chart-container--tall {
    position: relative;
    height: 310px;
    width: 100%;
}

/* Empty State */
.bo-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--bo-text-muted);
}

.bo-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 9999px;
    background-color: var(--bo-surface-muted);
    color: var(--bo-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Sticky Score & Attendance Matrices (Desktop sticky, Mobile static) */
.bo-score-wrap {
    max-height: 75vh;
    overflow: auto;
    position: relative;
}

.bo-score-table {
    border-collapse: separate;
    border-spacing: 0;
}

.bo-score-table thead th {
    position: sticky;
    top: 0;
    z-index: 15;
    --bs-table-bg: var(--bo-bg);
    background-color: var(--bo-bg);
    box-shadow: inset 0 -1px 0 var(--bo-border);
}

.bo-score-table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 10;
    --bs-table-bg: var(--bo-surface);
    background-color: var(--bo-surface);
    border-right: 1px solid var(--bo-border);
    min-width: 72px;
    width: 72px;
}

.bo-score-table .sticky-col-2 {
    position: sticky;
    left: 72px;
    z-index: 10;
    --bs-table-bg: var(--bo-surface);
    background-color: var(--bo-surface);
    border-right: 2px solid var(--bo-border-strong);
    width: 220px;
    min-width: 220px;
    max-width: 220px;
}

.bo-score-table thead th.sticky-col,
.bo-score-table thead th.sticky-col-2 {
    z-index: 25;
    --bs-table-bg: var(--bo-bg);
    background-color: var(--bo-bg);
}

/* Neo cột ĐTB ở mép phải để không đè lên cột Đề tài khi cuộn ngang */
.bo-score-table .sticky-col-avg {
    position: sticky;
    right: 0;
    left: auto;
    z-index: 10;
    --bs-table-bg: var(--bo-primary-soft);
    background-color: var(--bo-primary-soft);
    border-left: 2px solid var(--bo-primary);
    border-right: 1px solid var(--bo-border);
    min-width: 90px;
}

.bo-score-table thead th.sticky-col-avg {
    z-index: 25;
    --bs-table-bg: #dbeafe;
    background-color: #dbeafe;
    color: var(--bo-primary);
}

.bo-score-table tbody tr:hover td.sticky-col,
.bo-score-table tbody tr:hover td.sticky-col-2 {
    --bs-table-bg: #f8fafc;
    background-color: #f8fafc;
}

.bo-score-table tbody tr.table-danger > td.sticky-col,
.bo-score-table tbody tr.table-danger > td.sticky-col-2 { --bs-table-bg: #f8d7da; background-color: #f8d7da; }
.bo-score-table tbody tr.table-warning > td.sticky-col,
.bo-score-table tbody tr.table-warning > td.sticky-col-2 { --bs-table-bg: #fff3cd; background-color: #fff3cd; }
.bo-score-table tbody tr.table-info > td.sticky-col,
.bo-score-table tbody tr.table-info > td.sticky-col-2 { --bs-table-bg: #cff4fc; background-color: #cff4fc; }
.bo-score-table tbody tr.table-success > td.sticky-col,
.bo-score-table tbody tr.table-success > td.sticky-col-2 { --bs-table-bg: #d1e7dd; background-color: #d1e7dd; }
.bo-score-table tbody tr.table-secondary > td.sticky-col,
.bo-score-table tbody tr.table-secondary > td.sticky-col-2 { --bs-table-bg: #e2e3e5; background-color: #e2e3e5; }
.bo-score-table tbody tr.table-light > td.sticky-col,
.bo-score-table tbody tr.table-light > td.sticky-col-2 { --bs-table-bg: #f8f9fa; background-color: #f8f9fa; }

.judge-name-truncate {
    display: inline-block;
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.bo-score-input {
    width: 66px;
    text-align: center;
    margin: 0 auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    .bo-score-table .sticky-col,
    .bo-score-table .sticky-col-2,
    .bo-score-table .sticky-col-avg {
        position: static !important;
        left: auto !important;
        right: auto !important;
        box-shadow: none !important;
    }
    .bo-score-table .sticky-col-2 {
        width: auto;
        min-width: 150px;
        max-width: 220px;
    }
}

/* Sortable headers & status indicator */
.bo-sort-th {
    cursor: pointer;
    user-select: none;
}

.bo-sort-th:hover {
    color: var(--bo-primary);
}

.bo-live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background-color: var(--bo-success);
}

.bo-live-dot--paused {
    background-color: var(--bo-warning);
}

/* Certificate WYSIWYG Editor */
.cert-stage-wrap {
    background-color: var(--bo-surface-muted);
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    padding: 0.75rem;
    overflow: auto;
    text-align: center;
}

#certCanvas {
    max-width: 100%;
    height: auto;
    background: #ffffff;
    box-shadow: var(--bo-shadow-md);
    cursor: crosshair;
    display: inline-block;
    /* Ngăn cuộn trang cản trở thao tác kéo thả chữ trên màn hình cảm ứng */
    touch-action: none;
}

.cert-field-item {
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius-sm);
    padding: 0.625rem 0.75rem;
    background: var(--bo-surface);
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.cert-field-item.is-selected {
    border-color: var(--bo-primary);
    background-color: var(--bo-primary-soft);
}

/* Utilities & Accessibility Overrides */
.min-width-0 { min-width: 0; }
.cursor-pointer { cursor: pointer; }
.bo-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* Đảm bảo độ tương phản nút warning chuẩn WCAG AA */
.btn-outline-warning {
    color: #92400e;
    border-color: #b45309;
}
.btn-outline-warning:hover,
.btn-outline-warning:focus-visible {
    color: #ffffff;
    background-color: #b45309;
    border-color: #b45309;
}

.bo-body :focus-visible,
.bo-auth-body :focus-visible {
    outline: 2px solid var(--bo-primary);
    outline-offset: 2px;
}

@media (pointer: coarse) {
    /* Vùng chạm tối thiểu 44x44px và khoảng cách thoáng cho màn hình cảm ứng */
    .bo-table .btn-sm,
    .bo-page-actions .btn-sm,
    .bo-sort-btn {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .bo-table td .d-flex,
    .bo-table td.text-nowrap {
        gap: 0.5rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bo-sidebar,
    .bo-nav-link,
    .cert-field-item {
        transition: none !important;
    }
}

@media print {
    .bo-sidebar,
    .bo-topbar,
    .bo-archive-banner,
    .no-print {
        display: none !important;
    }
    .bo-main-wrap {
        margin-left: 0 !important;
    }
    .bo-content {
        padding: 0 !important;
    }
    .bo-card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* Bộ chọn nhiều Giảng viên hướng dẫn dạng thẻ dùng trong Cổng Sinh viên & Admin */
.mentor-picker {
    position: relative;
}

.mentor-picker-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.625rem;
    background-color: var(--bo-surface);
    border: 1px solid var(--bo-border-strong);
    border-radius: var(--bo-radius-sm);
    cursor: text;
}

.mentor-picker-box--sm {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
}

.mentor-picker-box:focus-within {
    border-color: var(--bo-primary);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.16);
}

.mentor-picker-box.is-invalid {
    border-color: var(--bo-danger);
}

.mentor-picker.is-disabled .mentor-picker-box {
    background-color: var(--bo-surface-muted);
    cursor: default;
}

.mentor-picker-chips {
    display: contents;
}

.mentor-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    background-color: var(--bo-primary-soft);
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 0.825rem;
    font-weight: 500;
    line-height: 1.3;
}

.mentor-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0.1rem;
    background: transparent;
    color: #1e40af;
    cursor: pointer;
    line-height: 1;
}

.mentor-chip-remove:hover,
.mentor-chip-remove:focus-visible {
    color: var(--bo-danger);
}

.mentor-picker-input {
    flex: 1 1 180px;
    min-width: 120px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.125rem 0.25rem;
    color: var(--bo-text);
}

.mentor-picker-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 220px;
    overflow-y: auto;
    background-color: var(--bo-surface);
    border: 1px solid var(--bo-border-strong);
    border-radius: var(--bo-radius-sm);
    box-shadow: var(--bo-shadow-md);
}

.mentor-picker-option {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: var(--bo-text);
    cursor: pointer;
}

.mentor-picker-option:hover,
.mentor-picker-option.is-active {
    background-color: var(--bo-primary-soft);
    color: var(--bo-primary);
}

.mentor-picker-create {
    border-top: 1px solid var(--bo-border);
    color: #0f766e;
    font-weight: 600;
}

.mentor-picker-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.825rem;
    color: var(--bo-text-muted);
}

/* Phân tầng z-index rõ ràng cho modal và lớp nền (backdrop < modal < confirm chồng lớp < toast) */
.modal-backdrop {
    z-index: 1050;
}

.modal {
    z-index: 1060;
}

/* Modal xác nhận luôn nổi trên các modal xem thuyết minh / sửa nhanh */
#appUiModal {
    z-index: 1085;
}

.bo-proposal-modal .modal-content {
    background-color: var(--bo-surface);
}

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

/* Modal Thuyết minh & Thanh thao tác hàng loạt nổi */
.bo-proposal-modal .modal-header {
    background-color: var(--bo-surface);
    border-bottom: 1px solid var(--bo-border);
}

.bo-sticky-bulk-bar {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 1030;
    background-color: #0f172a;
    color: #ffffff;
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

@media print {
    body.bo-printing-proposal .bo-app,
    body.bo-printing-proposal .sp-app,
    body.bo-printing-proposal .bo-proposal-modal .modal-header,
    body.bo-printing-proposal .no-print {
        display: none !important;
    }
    body.bo-printing-proposal .bo-proposal-modal,
    body.bo-printing-proposal .bo-proposal-modal .modal-dialog,
    body.bo-printing-proposal .bo-proposal-modal .modal-content,
    body.bo-printing-proposal .bo-proposal-modal .modal-body {
        position: static !important;
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        border: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Lớp tiện ích thay thế inline style trong các view Backoffice & Cổng Sinh viên */
.bo-text-xs { font-size: 0.75rem; }
.bo-pre-line { white-space: pre-line; }
.bo-pre-wrap { white-space: pre-wrap; }
.bo-comment-cell { white-space: pre-wrap; max-width: 240px; }
.bo-sbd-box { min-width: 78px; }
.bo-max-w-190 { max-width: 190px; }
.bo-max-w-240 { max-width: 240px; }
.bo-max-w-260 { max-width: 260px; }
.bo-max-w-420 { max-width: 420px; }
.bo-card-max-520 { max-width: 520px; }
.bo-card-max-600 { max-width: 600px; }
.bo-card-max-620 { max-width: 620px; }
.bo-card-max-680 { max-width: 680px; }
.bo-card-max-720 { max-width: 720px; }
.bo-card-max-760 { max-width: 760px; }
.bo-card-max-860 { max-width: 860px; }
.bo-col-w-36 { width: 36px; }
.bo-col-w-40 { width: 40px; }
.bo-col-w-55 { width: 55px; }
.bo-col-w-70 { width: 70px; }
.bo-col-w-85 { width: 85px; }
.bo-col-w-90 { width: 90px; }
.bo-col-w-100 { width: 100px; }
.bo-col-w-110 { width: 110px; }
.bo-col-w-150 { width: 150px; }
.bo-col-w-160 { width: 160px; }
.bo-col-w-170 { width: 170px; }
.bo-col-min-95 { min-width: 95px; }
.bo-col-min-115 { min-width: 115px; }
.bo-col-min-140 { min-width: 140px; }
.bo-col-min-170 { min-width: 170px; }
.bo-col-min-190 { min-width: 190px; }
.bo-col-min-220 { min-width: 220px; }
.bo-col-finalist-drive { min-width: 270px; width: 280px; }
.bo-scroll-list-280 { max-height: 280px; overflow-y: auto; }
.bo-skip-link { z-index: 2000; }
.bo-brand-dot--lg { width: 40px; height: 40px; font-size: 1.1rem; }
.bo-auth-subtitle { letter-spacing: 0.05em; }


