/* VA Meal · NỀN TẢNG: token, bố cục, form, bảng, responsive và đăng nhập
 * Giữ nguyên thứ tự cascade. Mỗi phần bên dưới giữ nguyên CSS gốc.
 * Chỉnh sửa trực tiếp tại phần tương ứng; không cần bước sinh CSS.
 */

/* ===== BẮT ĐẦU: styles.css ===== */

/* ===== 1. BIẾN CSS TOÀN CỤC (DESIGN SYSTEM TOKENS) — VA Schools Brand ===== */
/* ===== 1. DESIGN TOKENS — the only light and dark token blocks (CONTENT_PAGE_DESIGN_RULES §12.1, §14, §15.3).
   Change a value here and every screen that uses the token follows. Status colours: one set for every screen. ===== */
:root {
    --color-primary: var(--va-maroon-500);
    --color-primary-dark: var(--va-maroon-600);
    --color-primary-light: #B8004A;
    --color-primary-tint: #FCF1F4;
    --color-primary-border: var(--va-maroon-100);
    --color-navy: #1B2A4A;
    --color-teal: var(--va-teal-500);
    --color-teal-light: #E6F5F4;
    --color-brown: #725139;
    --color-yellow-label: #C49C57;
    --color-yellow-light: #FAF3E0;
    --color-success: var(--va-teal-600);
    --color-success-dark: #006B61;
    --color-success-light: var(--va-teal-100);
    --color-success-text: var(--va-teal-700);
    --color-success-border: #99DAD5;
    --color-warning: #D97706;
    --color-warning-dark: #92400E;
    --color-warning-light: #FFFBEB;
    --color-warning-text: #92400E;
    --color-warning-border: #FDE68A;
    --color-error: #DC2626;
    --color-error-dark: #991B1B;
    --color-error-light: #FEF2F2;
    --color-error-text: #991B1B;
    --color-error-border: #FECACA;
    --color-info: var(--va-blue-500);
    --color-info-dark: #0F1A30;
    --color-info-light: #EEF1F7;
    --color-info-text: #1B2A4A;
    --color-info-border: #B8C4D8;
    --main-bg: #F3F5F8;
    --sidebar-bg: #FFFFFF;
    --topbar-bg: rgba(255, 255, 255, 0.92);
    --card-bg: #FFFFFF;
    --card-bg-alt: #F9FAFB;
    --hover-bg: #F3F4F6;
    --hover-tint-bg: #FFF0F4;
    --input-bg: #FFFFFF;
    --modal-bg: rgba(15, 23, 42, 0.55);
    --text-primary: #182738;
    --text-secondary: #5F6E84;
    --text-muted: #6B6B6B;
    --text-strong: #101828;
    --text-white: #FFFFFF;
    --text-brand: #9A0036;
    --border-color: #DCE0E8;
    --border-light: #F3F4F6;
    --border-focus: #9A0036;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    --shadow-light: none;
    --card-shadow: none;
    --card-shadow-hover: 0 14px 30px -6px rgba(154, 0, 54, 0.12), 0 6px 12px -3px rgba(0, 0, 0, 0.04);
    --shadow-button: none;
    --shadow-raised: 0 20px 48px -10px rgba(15, 23, 42, 0.14), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
    --sidebar-width: 256px;
    --topbar-height: 60px;
    --fs-h1: 30px;
    --fs-h2: 28px;
    --fs-h3: 24px;
    --fs-h4: 20px;
    --fs-h5: 16px;
    --fs-h6: 14px;
    --fs-body1: 18px;
    --fs-body2: 16px;
    --fs-body3: 14px;
    --button-height: 36px;
    --button-padding: 0 12px;
    --button-radius: 8px;
    --motion: background-color 150ms, color 150ms, border-color 150ms;
    --motion-gradual: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    --va-scrollbar-thumb: #b8bec8;
    --va-scrollbar-track: transparent;
    --va-maroon-100: #F5D6DE;
    --va-maroon-200: #EBA8BC;
    --va-maroon-300: #E07A9B;
    --va-maroon-400: #D64D79;
    --va-maroon-500: #9A0036;
    --va-maroon-600: #7A002B;
    --va-maroon-700: #5C0020;
    --va-maroon-800: #3D0015;
    --va-teal-100: #D6F2EF;
    --va-teal-500: #009082;
    --va-teal-600: #007369;
    --va-teal-700: #00564F;
    --va-teal-200: #AEE5DF;
    --va-teal-300: #85D8CF;
    --va-teal-400: #5DCBBF;
    --va-teal-800: #003A36;
    --va-blue-100: #DCE6F8;
    --va-blue-500: #1750B5;
    --va-blue-200: #B9CEF1;
    --va-blue-300: #96B5EA;
    --va-blue-400: #739DE3;
    --va-blue-600: #124092;
    --va-blue-700: #0E306E;
    --va-blue-800: #09204A;
    --va-brown-100: #EAE4DF;
    --va-brown-500: #725139;
    --va-brown-200: #CCBFB5;
    --va-brown-300: #AD9A8C;
    --va-brown-400: #8F7562;
    --va-brown-600: #5B412E;
    --va-brown-700: #443122;
    --va-brown-800: #2E2017;
    --va-gold-100: #F6EFE3;
    --va-gold-400: #C49C57;
    --va-gold-600: #765E34;
    --va-gold-200: #EADDBF;
    --va-gold-300: #DEC89A;
    --va-gold-350: #D1B276;
    --va-gold-500: #9D7D46;
    --va-gold-700: #4E3E23;
    --va-gray-0: #FFFFFF;
    --va-gray-100: #F5F6F7;
    --va-gray-200: #D9D9D9;
    --va-gray-300: #B4B4B4;
    --va-gray-400: #A6A6A6;
    --va-gray-500: #737373;
    --va-gray-600: #545454;
    --va-gray-700: #000000;
    --va-space-1: 4px;
    --va-space-2: 8px;
    --va-space-3: 12px;
    --va-space-4: 16px;
    --va-space-6: 24px;
    --va-space-8: 32px;
    --va-space-12: 48px;
    --va-space-16: 64px;
    --va-content-max: clamp(1280px, 83.333333vw, 2880px);
    --va-page-gutter: clamp(24px, 1.5625vw, 48px);
    --va-card-line: #d8cbd0;
    --va-focus-ring: 0 0 0 3px #F6D3DE;
    --va-shadow-control: 0 1px 2px rgba(16, 24, 40, 0.05);
    --va-shadow-popover: 0 8px 24px rgba(16, 24, 40, 0.12), 0 1px 2px rgba(16, 24, 40, 0.05);
    --va-line-hover: #EBA8BC;
    --va-backdrop: rgba(16, 24, 40, 0.4);
    --va-on-primary: #ffffff;
    --va-wide-gap: clamp(24px, 1.5625cqi, 40px);
    --va-table-head-bg: #F9EDF2;
    --va-table-head-ink: #650026;
    --va-table-head-line: #DAB6C4;
    --va-table-head-divider: #EBD5DE;
    --status-booked-ink: #007B66;
    --status-booked-bg: #E2F6F1;
    --status-booked-line: #C6ECE3;
    --status-received-ink: #0965D8;
    --status-received-bg: #E5F2FF;
    --status-received-line: #C9E1FC;
    --status-missed-ink: #B54123;
    --status-missed-bg: #FFF0E8;
    --status-missed-line: #F0B49B;
    --status-locked-ink: #87602A;
    --status-locked-bg: #F6EBD9;
    --status-locked-line: #E6D4B7;
    --status-walk-in-ink: #6941C6;
    --status-walk-in-bg: #F4F0FF;
    --status-walk-in-line: #D9CCFF;
}

:root[data-va-theme="dark"] {
    color-scheme: dark;
    --va-card-line: #5b4851;
    --va-focus-ring: 0 0 0 3px #4A2A3A;
    --va-shadow-control: 0 1px 2px rgba(0, 0, 0, 0.3);
    --va-shadow-popover: 0 8px 24px rgba(0, 0, 0, 0.45);
    --va-line-hover: #7B354D;
    --va-backdrop: rgba(0, 0, 0, 0.6);
    --va-on-primary: #ffffff;
    --main-bg: #111820;
    --card-bg: #1B2531;
    --card-bg-alt: #222E3C;
    --topbar-bg: #18222E;
    --input-bg: #17212C;
    --hover-bg: #273447;
    --hover-tint-bg: #3A2635;
    --modal-bg: rgba(4,9,16,.72);
    --text-primary: #ECF2FA;
    --text-strong: #F2F5FA;
    --text-secondary: #9FB0C6;
    --text-muted: #9AAAC0;
    --text-brand: #FFA7C3;
    --border-color: #364456;
    --border-light: #2A3747;
    --border-focus: #F4B9CE;
    --color-primary-tint: #3A2635;
    --color-primary-border: #805065;
    --color-success-text: #81E1CB;
    --color-success-light: #163D36;
    --color-success-border: #326B5F;
    --color-error-text: #FFADB8;
    --color-error-light: #442A33;
    --color-error-border: #854958;
    --color-warning-text: #F1CE87;
    --color-warning-light: #3D3424;
    --color-warning-border: #7F6A3F;
    --color-info-text: #ABCDFB;
    --color-info-light: #22364F;
    --color-info-border: #4C6D96;
    --va-table-head-bg: #302534;
    --va-table-head-ink: #F7BDD1;
    --va-table-head-line: #785467;
    --va-table-head-divider: #594153;
    --rp-brand: #FFAAC8;
    --rp-green: #7EE0CD;
    --rp-amber: #F1CE87;
    --rp-blue: #A8CBFF;
    --va-scrollbar-thumb: #64748b;
    --status-booked-ink: #81E1CB;
    --status-booked-bg: #163D36;
    --status-booked-line: #326B5F;
    --status-received-ink: #91C5FF;
    --status-received-bg: #1D3550;
    --status-received-line: #365873;
    --status-missed-ink: #FFB393;
    --status-missed-bg: #45291F;
    --status-missed-line: #995439;
    --status-locked-ink: #E5BF83;
    --status-locked-bg: #433621;
    --status-locked-line: #6E5635;
    --status-walk-in-ink: #C9B6FF;
    --status-walk-in-bg: #2E2648;
    --status-walk-in-line: #5A4A8F;
}

/* ===== 2. RESET & ĐỒNG BỘ TOÀN DIỆN FONT CHỮ ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    background: var(--main-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    font-weight: 400;
}

b, strong {
    font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-strong);
}

p, span, label, input, select, textarea {
    font-weight: 400;
}

/* Tabular figures cho bảng số liệu */
.tabular-value,
.metric-banner-count,
.table-data td,
.dropdown-user-info-rows strong {
    font-variant-numeric: tabular-nums;
}

/* Thanh cuộn hiện đại */


* { scrollbar-width: thin; scrollbar-color: var(--va-scrollbar-thumb) var(--va-scrollbar-track); }
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--va-scrollbar-track);
}
::-webkit-scrollbar-thumb {
    background: var(--va-scrollbar-thumb);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Shared outline action: size comes from .btn / .btn-sm (B1). */
.btn.va-action-outline {
    border: 1px solid var(--va-card-line);
    background: var(--card-bg);
    color: var(--text-primary);
    box-shadow: var(--va-shadow-control);
}
.btn.va-action-outline svg { color: var(--text-brand); }
.btn.va-action-outline:hover:not(:disabled) { background: var(--color-primary-tint); border-color: var(--va-line-hover); }
.btn.va-action-outline:focus-visible { outline: 2px solid var(--border-focus, var(--color-primary)); outline-offset: 2px; }

/* ===== 3. TRANG ĐĂNG NHẬP (LOGIN PAGE) ===== */
/* ===== 3. TRANG ĐĂNG NHẬP (LOGIN PAGE) ===== */
.page-sign-in {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F4F5F8;
    position: relative;
    padding: 24px 20px;
    overflow-y: auto;
}

.sign-in-box {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 26px;
    padding: 30px 34px 24px;
    width: 100%;
    max-width: 440px;
    margin: auto;
    box-shadow:
        0 20px 60px -10px rgba(154, 0, 54, 0.15),
        0 6px 18px -2px rgba(0, 0, 0, 0.04),
        0 0 0 1px rgba(154, 0, 54, 0.06);
    position: relative;
    z-index: 10;
    transition: var(--motion);
    animation: sign-in-box-enter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sign-in-box-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== INPUT & FORM CONTROLS (.group-input) ===== */
.group-input {
    margin-bottom: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.group-input label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 7px;
    color: #1F2937;
    font-size: 0.84rem;
    font-weight: 500;
    letter-spacing: -0.15px;
}

.group-input input,
.group-input select,
.group-input textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #FFFFFF;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    color: #111827;
    font-size: 0.88rem;
    font-weight: 400;
    transition: var(--motion);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    font-family: inherit;
}

.group-input input:hover,
.group-input select:hover,
.group-input textarea:hover {
    border-color: #D1D5DB;
}

.group-input input:focus,
.group-input select:focus,
.group-input textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3.5px rgba(154, 0, 54, 0.12);
    background-color: #FFFFFF;
}

/* Dropdown Select tùy chỉnh chuẩn hiện đại */
.group-input select {
    padding: 0 38px 0 14px;
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.group-input select option {
    background: #FFFFFF;
    color: #111827;
    padding: 8px 12px;
    font-weight: 400;
}

/* Trường ngày tháng */
.group-input input[type="date"] {
    cursor: pointer;
    color: #1F2937;
}

.group-input input::placeholder {
    color: #9CA3AF;
    font-weight: 500;
}

/* Thông báo lỗi đăng nhập */
.notice-error-sign-in {
    padding: 12px 16px;
    background: var(--color-error-light);
    border: 1px solid var(--color-error-border);
    border-radius: 12px;
    color: var(--color-error-text);
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake-error 0.35s ease;
}

@keyframes shake-error {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ===== 4. BỐ CỤC CHÍNH (SIDEBAR + MAIN APP) ===== */
.layout-main {
    display: flex;
    min-height: 100vh;
    background: var(--main-bg);
    position: relative;
}

/* ===== 5. THANH BÊN (SIDEBAR) — Dark Maroon VA Schools Slide 19 ===== */
.side-nav {
    width: var(--sidebar-width);
    background: #9A0036;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
    box-shadow: 3px 0 16px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

/* ── Header: Logo con rồng VA Schools chuẩn Slide 19 ── */
.sb-logo {
    height: var(--topbar-height);
    padding: 0 16px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sb-logo-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

/* Con rồng VA Schools màu trắng sắc nét chuẩn Slide 19 */
.sb-dragon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
    transition: var(--motion);
}

.sb-logo-link:hover .sb-dragon-img {
    transform: scale(1.08);
}

.sb-logo-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sb-name-system {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-name-software {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* Nút thu gọn / mở rộng sidebar (Slide 19) */
.sb-btn-collapse {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--motion);
    flex-shrink: 0;
}

.sb-btn-collapse:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

.sb-btn-close-mobile {
    display: none;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--motion);
    flex-shrink: 0;
}

.sb-btn-close-mobile:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ── Nav scrollable ── */
.sb-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 10px 16px;
    scrollbar-width: none;
}

.sb-nav::-webkit-scrollbar { display: none; }

/* ── Nhóm menu Dropdown Accordion (Slide 19) ── */
.sb-group-dropdown {
    margin-bottom: 4px;
}

.sb-group-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-radius: 7px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.72);
    transition: var(--motion);
    text-align: left;
    user-select: none;
}

.sb-group-header:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.sb-group-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sb-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    flex-shrink: 0;
}

.sb-group-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-chevron-icon {
    stroke: rgba(255, 255, 255, 0.55);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.sb-group-dropdown.is-opened .sb-chevron-icon {
    transform: rotate(0deg);
    stroke: rgba(255, 255, 255, 0.9);
}

.sb-group-dropdown:not(.is-opened) .sb-chevron-icon {
    transform: rotate(-90deg);
}

.sb-group-content {
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    max-height: 800px;
    opacity: 1;
    padding-left: 4px;
}

.sb-group-dropdown:not(.is-opened) .sb-group-content {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* ── Menu item ── */
.sb-item,
.item-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    text-align: left;
    transition: var(--motion);
    position: relative;
    margin-bottom: 2px;
    text-decoration: none;
}

.sb-item svg,
.item-menu svg {
    stroke: rgba(255, 255, 255, 0.65);
    flex-shrink: 0;
    transition: var(--motion);
}

.sb-item:hover,
.item-menu:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
}

.sb-item:hover svg,
.item-menu:hover svg {
    stroke: #FFFFFF;
}

.sb-item.is-chosen,
.item-menu.is-chosen {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-weight: 500;
}

.sb-item.is-chosen svg,
.item-menu.is-chosen svg {
    stroke: #FFFFFF;
}

.sb-item.is-chosen::before,
.item-menu.is-chosen::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: #FFFFFF;
    border-radius: 0 3px 3px 0;
}

/* ── Trạng thái Thu gọn (Collapsed Sidebar - Slide 19) ── */
.side-nav.is-collapsed {
    width: 70px;
}

.area-content.is-collapsed {
    margin-left: 70px;
    width: calc(100% - 70px);
}

.side-nav.is-collapsed .sb-logo-text, .side-nav.is-collapsed .sb-group-name, .side-nav.is-collapsed .sb-chevron-icon, .side-nav.is-collapsed .sb-item-text {
    display: none !important;
}

.side-nav.is-collapsed .sb-logo {
    padding: 0;
    justify-content: center;
    position: relative;
}

.side-nav.is-collapsed .sb-btn-collapse {
    position: absolute;
    right: -13px;
    top: 18px;
    background: #7A002B;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 105;
}

.side-nav.is-collapsed .sb-btn-collapse svg {
    transform: rotate(180deg);
}

.side-nav.is-collapsed .sb-group-header {
    justify-content: center;
    padding: 10px 0;
}

.side-nav.is-collapsed .sb-item {
    justify-content: center;
    padding: 10px 0;
}

.side-nav.is-collapsed .sb-group-content {
    padding-left: 0;
    max-height: none !important;
    opacity: 1 !important;
}

/* ── Backward compat: cũ dùng .item-menu — giữ lại để JS data-page vẫn hoạt động ── */
.side-nav .nav-list { flex: 1; overflow-y: auto; }
.side-nav .item-menu,
.sb-item {
    /* merged above */
}

/* Man che sidebar */
.overlay-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    transition: opacity 0.3s ease;
}

.overlay-sidebar.is-shown {
    display: block;
}

/* ===== 6. VÙNG NỘI DUNG CHÍNH (MAIN AREA) ===== */
.area-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--motion);
    background: var(--main-bg);
    width: calc(100% - var(--sidebar-width));
}

/* ===== 7. THANH ĐỈNH TRANG (TOP BAR) — VA Schools Slide 21 ===== */
.top-bar {
    height: var(--topbar-height);
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.realtime-status {
    margin: 0;
    min-width: 0;
    max-width: min(18rem, 46vw);
    overflow: hidden;
    color: var(--text-secondary, #545454);
    font-size: 14px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Nút menu mobile */
.btn-menu-mobile {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--motion);
    flex-shrink: 0;
}

.btn-menu-mobile:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border-color: var(--color-primary-border);
}

/* Khu vực phải topbar — Slide 21 */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-shrink: 0;
}

/* User Pill Badge ở Topbar với Dropdown List */
.user-dropdown-container {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.user-dropdown-menu.is-visible {
    display: block;
}

.user-dropdown-container:hover .user-pill-topbar,
.user-pill-topbar.is-opened {
    border-color: var(--color-primary-border);
    background: var(--color-primary-tint);
    box-shadow: 0 4px 16px rgba(154, 0, 54, 0.1);
}

.user-pill-topbar.is-opened .user-pill-arrow-svg {
    transform: rotate(180deg);
    stroke: var(--color-primary);
}

.user-pill-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 6px;
    border-radius: 9999px;
    border: 1.5px solid var(--color-primary-border);
    background: var(--card-bg);
    cursor: pointer;
    transition: var(--motion);
    user-select: none;
    box-shadow: 0 2px 8px rgba(154, 0, 54, 0.05);
}

.user-pill-topbar:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
    box-shadow: 0 4px 16px rgba(154, 0, 54, 0.12);
}

.user-pill-avatar-wrapper {
    position: relative;
    display: inline-flex;
}

.user-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.user-pill-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-pill-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.2;
}

.user-pill-role {
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.user-pill-arrow-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

.user-pill-arrow-svg {
    stroke: #6B7280;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.2s ease;
}

.dropdown-user-avatar-wrapper {
    position: relative;
    display: inline-flex;
}

.dropdown-user-avatar-wrapper .user-status-dot {
    width: 11px;
    height: 11px;
    bottom: -1px;
    right: -1px;
}

.dropdown-action-icon {
    flex-shrink: 0;
    stroke: currentColor;
    transition: var(--motion);
}

/* Dropdown Menu Người dùng */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    width: 310px;
    background: white;
    border: 1.5px solid var(--color-primary-border);
    border-radius: 20px;
    box-shadow:
        0 16px 40px -8px rgba(154, 0, 54, 0.16),
        0 6px 16px -4px rgba(0, 0, 0, 0.05);
    padding: 18px;
    z-index: 1050;
    display: none;
    animation: popup-rise 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes popup-rise {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 14px;
}

.dropdown-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: contain;
    border: 2px solid var(--color-primary-border);
    padding: 2px;
    background: white;
    box-shadow: 0 4px 12px rgba(154, 0, 54, 0.08);
}

.dropdown-user-details {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-size: 0.98rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    background: var(--color-primary-tint);
    border: 1px solid var(--color-primary-border);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 4px;
}

.dropdown-user-info-rows {
    background: rgba(255, 240, 244, 0.5);
    border: 1px solid var(--color-primary-border);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 0.78rem;
    line-height: 1.75;
    color: #4B5563;
}

.dropdown-user-info-rows strong {
    color: #111827;
    font-weight: 700;
}

.dropdown-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.86rem;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: var(--motion);
}

.dropdown-btn:hover {
    background: var(--hover-bg);
}

.dropdown-btn.sign-out {
    color: var(--color-error);
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
    margin-top: 4px;
}

.dropdown-btn.sign-out:hover {
    background: var(--color-error-light);
    border-color: var(--color-error-border);
}

/* ===== 8. KHU VỰC THÂN TRANG & SUB-TABS ===== */
.page-body {
    padding: 28px 32px 64px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* ===== 9. DASHBOARD HERO BANNER ===== */
.greeting-banner {
    background: linear-gradient(135deg, #9A0036 0%, #7A002B 55%, #5C0020 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    box-shadow: 0 12px 36px -4px rgba(154, 0, 54, 0.28), 0 4px 12px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.greeting-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: 15%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.greeting-banner::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 20%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.greeting-banner-left {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 18px;
}

.banner-linh-vat {
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
    animation: nhun-nhe 3.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes nhun-nhe {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.greeting-banner-title {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.greeting-banner-secondary {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 6px;
    font-weight: 500;
    line-height: 1.4;
}

.greeting-banner-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 32px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    padding-left: 32px;
}

.metric-banner {
    text-align: center;
}

.metric-banner-count {
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1;
    color: white;
    letter-spacing: -0.5px;
}

.metric-banner-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 6px;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Header Banner module trang phụ */
.card-info-page-header {
    background: linear-gradient(135deg, rgba(154, 0, 54, 0.04) 0%, #FFFFFF 100%);
    border: 1px solid rgba(154, 0, 54, 0.14);
    border-radius: 18px;
    padding: 20px 24px;
    margin-bottom: 22px;
    box-shadow: 0 4px 18px rgba(154, 0, 54, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.card-info-page-header::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.card-info-page-header h2 {
    font-size: 1.22rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.card-info-page-header p {
    font-size: 0.84rem;
    color: #4B5563;
    margin-top: 4px;
    font-weight: 500;
    line-height: 1.4;
}

/* Tiêu đề khối nội dung chuẩn */
.title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-block-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.title-block-icon svg {
    stroke: currentColor;
}

.title-block h3 {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0;
    letter-spacing: -0.2px;
}

/* Chuẩn hóa Date input & Dropdown select trên các trang */
.input-date-standard,
.select-standard {
    height: 42px;
    padding: 0 14px;
    background: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1F2937;
    outline: none;
    transition: var(--motion);
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.select-standard {
    padding-right: 36px;
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.input-date-standard:focus,
.select-standard:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3.5px rgba(154, 0, 54, 0.12);
    background-color: #FFFFFF;
}

/* ===== 10. THẺ THỐNG KÊ (METRICS GRID) ===== */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: var(--motion);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0.85;
    transition: var(--motion);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(154, 0, 54, 0.1);
    border-color: rgba(154, 0, 54, 0.2);
}

.stat-card:hover::after {
    height: 5px;
    opacity: 1;
}

.stat-card.tone-primary::after { background: linear-gradient(90deg, #9A0036, #A21742); }
.stat-card.thanh-cong::after { background: linear-gradient(90deg, #0D9668, #34D399); }
.stat-card.canh-bao::after { background: linear-gradient(90deg, #D97706, #FBBF24); }
.stat-card.loi::after { background: linear-gradient(90deg, #DC2626, #F87171); }

.stat-card .icon-tk {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.stat-card.tone-primary .icon-tk { background: var(--color-primary-tint); color: #9A0036; border: 1px solid var(--color-primary-border); }
.stat-card.thanh-cong .icon-tk { background: var(--color-teal-light); color: #009082; border: 1px solid #99DAD5; }
.stat-card.canh-bao .icon-tk { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }
.stat-card.loi .icon-tk { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

.stat-card-svg {
    stroke: currentColor;
}

.stat-card .tabular-value {
    font-size: 2.15rem;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.6px;
}

.stat-card .tag-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ===== 11. BỐ CỤC LƯỚI & KHUNG BIỂU ĐỒ ===== */
.grid-2-column {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.the {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-light);
    transition: var(--motion);
}

.box-chart {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-light);
    display: flex;
    flex-direction: column;
}

.box-chart h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frame-chart {
    position: relative;
    height: 280px;
    width: 100%;
}

.frame-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== 12. NÚT BẤM (BUTTONS) — VA Schools Slide 7 Spec ===== */
.btn,
.modal-actions-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--button-height);
    height: var(--button-height);
    padding: var(--button-padding);
    border-radius: var(--button-radius);
    border: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--motion);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    box-shadow: none;
}

.btn-primary {
    background: var(--color-primary, #9a0036);
    color: #fff;
    border: 1px solid var(--color-primary, #9a0036);
    box-shadow: none;
}

.btn-primary:hover:not(:disabled) {
    background: #7a002b;
    border-color: #7a002b;
}

.btn-error,
.btn-danger {
    background: var(--color-error);
    color: #fff;
    border: 1px solid var(--color-error);
}

.btn-error:hover:not(:disabled),
.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-outline {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--va-card-line);
}

.btn-outline:hover:not(:disabled) {
    background: var(--color-primary-tint);
    border-color: var(--va-line-hover);
    color: var(--text-primary);
}

.btn-sm,
.btn-small {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
}

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

.btn[aria-busy="true"] {
    cursor: wait;
    opacity: 0.8;
}

.btn[aria-busy="true"]::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: quay 0.7s linear infinite;
}

#content-main :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select):where(
    :not(#page-booking *, #page-personal-qr *, .va-segmented *, .va-period *, .btn-sm, .btn-small, .rm-role)
) {
    min-height: 36px;
}

@media (max-width: 1279px), (pointer: coarse) {
    #content-main :is(button, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select):where(
        :not(#page-booking *, #page-personal-qr *, .va-segmented *, .va-period *)
    ) {
        min-height: 44px;
    }
}

/* ===== 13. BẢNG DỮ LIỆU & TRẠNG THÁI ===== */
.report-table {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-primary-border);
    background: var(--card-bg);
    box-shadow: 0 4px 16px rgba(154, 0, 54, 0.05);
}

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

.table-data thead tr {
    background: linear-gradient(135deg, #9A0036 0%, #7A002B 100%);
}

.table-data thead th {
    background: linear-gradient(135deg, #9A0036 0%, #7A002B 100%);
    color: #FFFFFF;
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 16px;
    border-bottom: 2px solid #5C0020;
    white-space: nowrap;
}

.table-data tbody tr {
    border-bottom: 1px solid rgba(154, 0, 54, 0.08);
    transition: var(--motion);
}

.table-data tbody tr:nth-child(even) {
    background: rgba(255, 240, 244, 0.35);
}

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

.table-data tbody tr:hover {
    background: var(--color-primary-tint);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.table-data tbody tr.is-chosen {
    background: var(--color-primary-tint);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.table-data tbody td {
    padding: 14px 16px;
    color: var(--text-strong);
    vertical-align: middle;
}

/* Nhãn trạng thái (Status Badges) */
.label-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.label-status.thanh-cong {
    background: var(--color-success-light);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}

.label-status.canh-bao {
    background: var(--color-warning-light);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning-border);
}

.label-status.huy,
.label-status.loi {
    background: var(--color-error-light);
    color: var(--color-error-text);
    border: 1px solid var(--color-error-border);
}

.label-status.thong-tin {
    background: var(--color-info-light);
    color: var(--color-info-text);
    border: 1px solid var(--color-info-border);
}

#area-read-qr {
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(154, 0, 54, 0.2);
    background: #0B0F19;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    position: relative;
}

/* Kết quả quét QR Card */
.result-scan {
    padding: 24px 22px;
    border-radius: 18px;
    text-align: center;
    animation: popup-rise 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 14px;
    border: 1.5px solid transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.result-scan.thanh-cong {
    background: linear-gradient(135deg, #ECFDF5 0%, #FFFFFF 100%);
    border-color: #A7F3D0;
    color: #065F46;
}

.result-scan.canh-bao {
    background: linear-gradient(135deg, #FFFBEB 0%, #FFFFFF 100%);
    border-color: #FDE68A;
    color: #92400E;
}

.result-scan.loi {
    background: linear-gradient(135deg, #FEF2F2 0%, #FFFFFF 100%);
    border-color: #FECACA;
    color: #991B1B;
}

.result-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.result-scan.thanh-cong .result-icon-badge {
    background: #10B981;
    color: #FFFFFF;
}

.result-scan.canh-bao .result-icon-badge {
    background: #F59E0B;
    color: #FFFFFF;
}

.result-scan.loi .result-icon-badge {
    background: #EF4444;
    color: #FFFFFF;
}

.result-scan .name-person {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 6px 0 4px;
    color: #111827;
    letter-spacing: -0.3px;
}

.result-scan .scan-detail {
    font-size: 0.86rem;
    color: #4B5563;
    font-weight: 500;
    line-height: 1.5;
}

/* Nút thao tác trong hàng bảng dữ liệu (Action Buttons) */
.btn-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1.5px solid var(--border-color);
    background: #FFFFFF;
    color: #4B5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--motion);
    padding: 0;
}

.btn-action-btn:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.btn-action-btn.edit-action:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #2563EB;
}

.btn-action-btn.qr:hover {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #0D9668;
}

.btn-action-btn.lock-action:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #DC2626;
}

.btn-action-btn svg {
    stroke: currentColor;
    width: 15px;
    height: 15px;
}

/* Thẻ đăng ký suất ăn cá nhân */
.item-booking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: var(--motion);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.item-booking-item:hover {
    border-color: rgba(154, 0, 54, 0.25);
    box-shadow: 0 4px 14px rgba(154, 0, 54, 0.06);
    transform: translateY(-1.5px);
}

.item-booking-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.item-booking-icon-box.breakfast {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #D97706;
}

.item-booking-icon-box.lunch {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    color: #B45309;
}

.item-booking-icon-box.evening {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    color: #2563EB;
}

/* ===== 15. MODAL HỘP THOẠI CAO CẤP ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    cursor: default;
}

.modal-overlay.is-visible:not(.bk-feedback-hosted) {
    display: flex;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 24px;
    border: 1.5px solid var(--color-primary-border);
    padding: 28px 32px 32px;
    width: 100%;
    max-width: 580px;
    box-shadow:
        0 25px 65px -12px rgba(154, 0, 54, 0.22),
        0 10px 24px -4px rgba(0, 0, 0, 0.08);
    animation: modal-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-change-password-card {
    max-width: 480px;
}

@keyframes modal-slide {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hiệu ứng rung nhẹ khi click ra ngoài overlay để báo người dùng phải bấm dấu X hoặc Hủy */
@keyframes modal-shake {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.025); }
    40% { transform: scale(0.985); }
    60% { transform: scale(1.015); }
    80% { transform: scale(0.995); }
}

.modal-shake {
    animation: modal-shake 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97) !important;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(154, 0, 54, 0.08);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.25;
}

.modal-subtitle {
    font-size: 0.78rem;
    color: #6B7280;
    margin-top: 3px;
    font-weight: 500;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: #F9FAFB;
    color: #6B7280;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--motion);
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--color-error-light);
    color: var(--color-error);
    border-color: var(--color-error-border);
    transform: rotate(90deg) scale(1.05);
}

.modal-close svg {
    stroke: currentColor;
    transition: var(--motion);
}

/* Bố cục lưới 2 cột bên trong modal */
.modal-grid-2cot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mark-star {
    color: var(--color-error);
    font-weight: 700;
    margin-left: 2px;
}

/* Tinh chỉnh input và select trong modal */
.modal-content .group-input {
    margin-bottom: 18px;
}

.modal-content .group-input label {
    margin-bottom: 7px;
    color: #1F2937;
    font-size: 0.83rem;
    font-weight: 500;
}

.modal-content .group-input input {
    height: 46px;
    padding: 0 14px;
    background: #FAFAFC;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 400;
    color: #111827;
    transition: var(--motion);
    width: 100%;
    outline: none;
}

.modal-content .group-input select {
    width: 100%;
    height: 46px;
    padding: 0 38px 0 14px;
    background: #FAFAFC url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: #111827;
    font-size: 0.88rem;
    font-weight: 400;
    outline: none;
    transition: var(--motion);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.modal-content .group-input input:focus,
.modal-content .group-input select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3.5px rgba(154, 0, 54, 0.12);
    background-color: #FFFFFF;
}

/* Footer hành động modal */
.modal-actions-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.modal-actions-footer .btn {
    padding: 11px 22px;
    font-size: 0.88rem;
    border-radius: 12px;
}

/* ===== 16. TOAST NOTIFICATIONS ===== */
.area-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    padding: 14px 20px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-raised);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.86rem;
    font-weight: 600;
    min-width: 280px;
    max-width: 440px;
    animation: toast-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    pointer-events: auto;
}

@keyframes toast-slide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-item.thanh-cong { border-left: 4px solid var(--color-success); color: var(--color-success-text); }
.toast-item.loi { border-left: 4px solid var(--color-error); color: var(--color-error-text); }
.toast-item.canh-bao { border-left: 4px solid var(--color-warning); color: var(--color-warning-text); }
.toast-item.thong-tin { border-left: 4px solid var(--color-info); color: var(--color-info-text); }

/* ===== 17. TIỆN ÍCH KHÁC ===== */
.loading-block {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
}

.vong-quay {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: quay 0.7s linear infinite;
}

@keyframes quay {
    to { transform: rotate(360deg); }
}

.select-box {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-strong);
    font-weight: 600;
}

.select-box input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.pager-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 18px 0 0;
}

.pager-bar button {
    min-width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--motion);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pager-bar button:hover {
    background: var(--hover-bg);
    color: var(--text-strong);
}

.pager-bar button.is-chosen {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
}

.d-none { display: none !important; }
.row-horizontal { display: flex; align-items: center; }
.middle-element { justify-content: space-between; }

.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }

.text-center { text-align: center; }

/* ===== THỰC ĐƠN (MENU CARDS) ===== */
.menu-group-meal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.menu-group-meal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    background: linear-gradient(135deg, rgba(154, 0, 54, 0.04) 0%, #FFFFFF 100%);
    border-bottom: 1px solid var(--border-light);
}

.menu-meal-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-strong);
    flex: 1;
}

.menu-list-dish {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.menu-card-dish {
    display: flex;
    align-items: stretch;
    gap: 14px;
    background: var(--card-bg-alt);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    transition: var(--motion);
    position: relative;
}

.menu-card-dish:hover {
    border-color: rgba(154, 0, 54, 0.2);
    box-shadow: 0 4px 16px rgba(154, 0, 54, 0.06);
    transform: translateY(-2px);
}

.menu-dish-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-dish-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 4px;
    line-height: 1.3;
}

.menu-dish-description {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-dish-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: center;
    flex-shrink: 0;
}

.ops-form-grid,.ops-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:end; }
.ops-time-picker { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) minmax(0,1.25fr); gap:8px; align-items:center; }
.ops-time-picker select { min-width:0; padding:0 28px 0 10px; background-position:right 8px center; font-variant-numeric:tabular-nums; }
.ops-time-picker > span { color:var(--text-secondary); text-align:center; }
.ops-section-title { color:var(--text-strong); font-weight:700; margin-bottom:10px; }
.ops-import-actions { gap:10px; align-items:center; flex-wrap:wrap; margin:14px 0; }
.ops-import-actions input[type=file] { max-width:100%; font-size:.78rem; }
.row-error { background:#FEF2F2; color:#991B1B; }
.row-valid { background:#F0FDF4; }
.ops-metrics { display:flex; align-items:center; gap:22px; padding:12px 16px; border-radius:10px; background:#F8FAFC; color:var(--text-secondary); }
.ops-metrics b { color:var(--text-strong); font-variant-numeric:tabular-nums; margin-left:5px; }
.ops-metrics .waste,.ops-metrics .waste b { color:#C2410C; }
.ops-pager { display:flex; justify-content:center; gap:16px; align-items:center; margin-top:14px; }

.ops-ok { color:#047857; margin-left:10px; }
.ops-error { color:#B91C1C; margin-left:10px; }

@media(max-width:720px) {
    .ops-form-grid,.ops-settings-grid { grid-template-columns:1fr; }
    .ops-metrics { flex-wrap:wrap; gap:8px 16px; }

}
.sso-login { text-align:center; }
.sso-login h2 { color:var(--text-strong); font-size:1.02rem; margin:0 0 8px; }
.sso-intro { color:var(--text-secondary); font-size:.82rem; line-height:1.65; max-width:38ch; margin:0 auto 22px; }
.google-login-button { display:flex; justify-content:center; min-height:44px; }
.sso-status { margin:12px auto 0; color:var(--text-secondary); font-size:.76rem; line-height:1.5; max-width:42ch; }

.cal-toolbar-actions { display:flex; align-items:center; gap:8px; }
.cal-toolbar-actions strong { min-width:150px; text-align:center; text-transform:capitalize; color:var(--text-strong); }
.cal-auto-register { display:flex; align-items:center; gap:12px; cursor:pointer; position:relative; }
.cal-auto-register > span:first-child { display:flex; flex-direction:column; font-size:.82rem; color:var(--text-strong); }
.cal-auto-register small { color:var(--text-secondary); font-size:.69rem; }
.cal-auto-register input { position:absolute; opacity:0; width:1px; height:1px; }
.cal-switch { width:42px; height:24px; border-radius:99px; background:#CBD5E1; transition:.2s; position:relative; }
.cal-switch:after { content:""; width:18px; height:18px; background:white; border-radius:50%; position:absolute; top:3px; left:3px; transition:.2s; box-shadow:0 1px 3px #0002; }
.cal-auto-register input:checked + .cal-switch { background:#0F8A70; }
.cal-auto-register input:checked + .cal-switch:after { transform:translateX(18px); }
.cal-auto-register input:focus-visible + .cal-switch { outline:3px solid #0f8a7040; }

.cal-weekdays,.cal-month-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; }
.cal-weekdays { margin-bottom:8px; text-align:center; color:var(--text-secondary); font-size:.72rem; font-weight:700; }
.cal-month-grid { grid-auto-rows:minmax(130px,auto); }
.cal-day { background:#fff; border:1px solid var(--border-color); border-radius:12px; padding:9px; min-width:0; }
.cal-day.is-outside { background:#F8FAFC; }
.cal-day.is-outside > header,.cal-day.is-outside .cal-meals { opacity:.42; }
.cal-day.is-today { border-color:var(--color-primary); box-shadow:0 0 0 1px var(--color-primary); }
.cal-day.is-closed { background:#F1F5F9; color:#64748B; }
.cal-day > header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-size:.83rem; }
.cal-day > header small { font-size:.62rem; color:#64748B; }
.cal-meals { display:flex; flex-direction:column; gap:6px; }
.cal-meal { width:100%; min-height:42px; padding:5px 7px; display:flex; justify-content:space-between; align-items:center; gap:4px; text-align:left; cursor:pointer; border:1px solid #DDE5EB; border-radius:8px; background:#F8FAFC; color:#475569; font:inherit; font-size:.68rem; }
.cal-meal strong { font-size:.63rem; white-space:nowrap; }
.cal-meal:hover:not(:disabled) { border-color:#0F8A70; background:#ECFDF5; }
.cal-meal.is-booked { background:#ECFDF5; border-color:#86EFAC; color:#047857; }
.cal-meal.is-locked,.cal-meal:disabled { cursor:not-allowed; background:#F1F5F9; color:#94A3B8; border-style:dashed; }
.cal-legend { display:flex; justify-content:flex-end; gap:16px; padding:12px 2px; color:var(--text-secondary); font-size:.72rem; }
.cal-legend span { display:flex; align-items:center; gap:6px; }
.cal-legend i { width:9px; height:9px; border-radius:50%; background:#F1F5F9; border:1px solid #CBD5E1; }
.cal-legend i.booked { background:#86EFAC; border-color:#34D399; }
.cal-legend i.available { background:#fff; }
.cal-legend i.locked { background:#CBD5E1; }
.cal-meal:active:not(:disabled) { transform:scale(.98); }
@media(max-width:760px) {

    .cal-toolbar-actions { order:3; width:100%; justify-content:space-between; }
    .cal-toolbar-actions strong { min-width:auto; }
    .cal-auto-register { margin-left:auto; }
    .cal-weekdays,.cal-month-grid { gap:3px; }
    .cal-month-grid { grid-auto-rows:minmax(88px,auto); }
    .cal-day { padding:4px; border-radius:8px; }
    .cal-day > header { margin-bottom:4px; font-size:.72rem; }
    .cal-meals { gap:3px; }
    .cal-meal { display:block; padding:4px 3px; min-height:44px; text-align:center; font-size:.61rem; }
    .cal-meal span,.cal-meal strong { display:block; white-space:normal; line-height:1.15; }
    .cal-meal strong { margin-top:2px; font-size:.56rem; }
    .cal-legend { justify-content:center; gap:10px; flex-wrap:wrap; }
}

.cal-frame-calendar-week {
    margin-bottom: 24px;
}

/* ===== 18. TỐI ƯU GIAO DIỆN RESPONSIVE MOBILE & TABLET ===== */
@media (max-width: 1024px) {
    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-2-column {
        grid-template-columns: 1fr;
    }
    .greeting-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .greeting-banner-right {
        border-left: none;
        padding-left: 0;
        width: 100%;
        justify-content: space-around;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        padding-top: 16px;
    }

}

@media (max-width: 767px) {
    .btn-menu-mobile {
        display: flex;
    }

    .side-nav {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    }

    .side-nav.is-expanded {
        transform: translateX(0);
    }

    .sb-btn-collapse {
        display: none !important;
    }

    .sb-btn-close-mobile {
        display: flex !important;
    }

    .area-content {
        margin-left: 0;
        width: 100%;
    }

    .top-bar {
        padding: 0 16px;
    }

    .page-body {
        padding: 16px 14px 50px;
    }

    .user-pill-info {
        display: none;
    }

    .user-pill-topbar {
        padding: 4px 8px 4px 4px;
    }

    .user-dropdown-menu {
        right: 0;
        width: 280px;
    }

    .greeting-banner {
        padding: 20px;
        border-radius: var(--radius);
    }

    .banner-linh-vat {
        width: 44px;
        height: 44px;
    }

    .greeting-banner-title {
        font-size: 1.15rem;
    }

    .greeting-banner-secondary {
        font-size: 0.78rem;
    }

    .metric-banner-count {
        font-size: 1.35rem;
    }

    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .tabular-value {
        font-size: 1.55rem;
    }

    .stat-card .icon-tk {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .frame-chart {
        height: 240px;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        padding: 24px 20px 32px;
    }

    .modal-grid-2cot {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .the {
        padding: 18px;
    }

    .sign-in-box {
        padding: 24px 20px;
        border-radius: 22px;
        margin: auto;
        max-width: 100%;
    }

    /* Thực đơn mobile */
    .menu-list-dish {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .menu-group-meal-header {
        padding: 12px 16px;
    }

    .menu-meal-name {
        font-size: 0.95rem;
    }

    .menu-card-dish {
        padding: 12px;
        border-radius: 12px;
    }

    .menu-dish-name {
        font-size: 0.86rem;
    }

    .menu-dish-description {
        font-size: 0.74rem;
    }

}

.report-time-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--motion);
    white-space: nowrap;
}
.report-time-btn:hover {
    color: var(--text-strong);
    background: var(--hover-bg);
}
.report-time-btn.is-chosen {
    background: var(--color-primary);
    color: #FFFFFF;
    font-weight: 500;
}

/* ===== KẾT THÚC: styles.css ===== */

/* ===== BẮT ĐẦU: va-design-system.css ===== */
/* VA Schools Design System v1 — 17/09/2026. Internal application. */

html { font-size: 14px; scroll-padding-top: 96px; }
.va-bottom-nav { display: none; }
.va-bottom-nav[hidden] { display: none !important; }
body { min-height: 100dvh; color: var(--text-primary); }
h1 { font-size: 30px; line-height: 1.3; }
h2 { font-size: 28px; line-height: 1.35; }
h3 { font-size: 24px; line-height: 1.4; }
h4 { font-size: 20px; } h5 { font-size: 16px; } h6 { font-size: 14px; }
button, input, select, textarea { font-size: 14px; }
button { touch-action: manipulation; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; box-shadow: none; }
/* D-163: [tabindex="-1"] is a programmatic focus target (the main content area, skip-link target); it never draws a frame. */
:is(button,a,input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible:where(:not(.bk-root *, .bk-dialog *, .va-search *, .va-multiselect *)) {
    outline: 2px solid var(--text-brand,var(--color-primary)) !important; outline-offset: 2px; box-shadow: none;
}
/* Buttons use a small inset marker instead of a second frame outside the control. */
:is(button,[role="button"]:not(svg *),input[type="button"],input[type="submit"],input[type="reset"]):focus-visible:where(:not(.bk-root *, .bk-dialog *, .va-search *, .va-multiselect *)) {
    outline: none !important;
    box-shadow: inset 0 -3px 0 currentColor !important;
}
@media (forced-colors: active) {
    :is(button,[role="button"]:not(svg *),input[type="button"],input[type="submit"],input[type="reset"]):focus-visible:where(:not(.bk-root *, .bk-dialog *, .va-search *, .va-multiselect *)) {
        outline: 2px solid ButtonText !important;
        outline-offset: 0;
    }
}
#page-booking :is(button,a,input,select,textarea,[tabindex]):focus-visible:where(:not(.bk-root *, .bk-dialog *)) { outline-color:#765E34!important; }
.side-nav :is(button,a):focus-visible { outline-color: #F6EFE3 !important; }
.skip-link { position: fixed; z-index: 2100; top: 8px; left: 8px; transform: translateY(-160%); padding: 12px 20px; background: white; color: var(--color-primary); border-radius: 8px; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.side-nav { height: 100dvh; box-shadow: none; background: var(--va-maroon-500); }
.sb-logo { padding: 0 16px; height: var(--topbar-height); gap: 8px; }
.sb-dragon-img { width: 40px; height: 36px; filter: none; mix-blend-mode: normal; background: transparent; }
.sb-name-system { font-size: 16px; font-weight: 700; letter-spacing: 0; }
.sb-name-software { color: #FFFFFF; opacity: 1; font-size: 11px; font-weight: 400; }
.sb-logo-text { overflow: visible; }
.sb-btn-collapse { width: 32px; height: 32px; border-radius: 6px; }
.sb-nav { padding: 16px 12px; }
.sb-group-header { height: 40px; padding: 8px; color: #FFFFFF; opacity: 1; }
.sb-group-name { font-size: 12px; font-weight: 600; letter-spacing: .35px; }
.sb-group-icon { color: white; opacity: 1; }

.sb-group-dropdown { margin-bottom: 12px; }
.sb-group-content { margin: 4px 0 0 16px; padding: 0 0 0 8px; border-left: 0; }
.sb-item, .side-nav .item-menu { min-height: 40px; padding: 8px 12px; margin: 2px 0; color: #FFFFFF; font-size: 13px; font-weight: 400; gap: 12px; border-radius: 6px; }
.sb-item.is-chosen, .side-nav .item-menu.is-chosen { background: var(--va-maroon-600); color: white; }
.side-nav .sb-item.is-chosen::before, .side-nav .item-menu.is-chosen::before { display: none; }
.sb-item:hover { background: #7A002B; }
.sb-item-icon { display: inline-flex; width: 20px; flex: 0 0 20px; }
.sb-item-icon svg { display: block; width: 18px; height: 18px; }
.side-nav.is-collapsed { width: 76px; }
.area-content.is-collapsed { margin-left: 76px; width: calc(100% - 76px); }
.side-nav.is-collapsed .sb-logo { padding: 0 18px; }
.side-nav.is-collapsed .sb-btn-collapse { right: 2px; top: 48px; width: 24px; height: 24px; }
.side-nav.is-collapsed .sb-group-header { display: none; }
.side-nav.is-collapsed .sb-group-content { border: 0; padding: 0; margin: 0; display: block; max-height: none; opacity: 1; }
.side-nav.is-collapsed .sb-item { display: flex; justify-content: center; padding: 12px 8px; height: 44px; }
/* Sidebar welcome motion uses transform/opacity and leaves remembered widths intact. */
.side-nav { transition:width 250ms cubic-bezier(.22,1,.36,1),transform 420ms cubic-bezier(.22,1,.36,1); }
.va-login-enter .side-nav :is(.sb-logo,.sb-nav > .sb-item,.sb-nav > .sb-group-dropdown) { animation:va-sidebar-item 440ms cubic-bezier(.22,1,.36,1) both; animation-delay:calc(110ms + var(--sb-enter-delay,0ms)); }
@keyframes va-sidebar-item { from { opacity:0; transform:translateX(-12px); } to { opacity:1; transform:translateX(0); } }
@keyframes va-sidebar-enter { from { opacity:0; transform:translateX(-100%); } to { opacity:1; transform:translateX(0); } }
@media(min-width:768px) {
    .va-login-pending .side-nav { opacity:0; transform:translateX(-100%); }
    .va-login-enter .side-nav { animation:va-sidebar-enter 600ms cubic-bezier(.22,1,.36,1) both; }
}
@media(max-width:767px) {
    .side-nav.is-expanded { box-shadow:12px 0 40px #3D001524; }
    .overlay-sidebar { transition:opacity 300ms ease,visibility 300ms ease; }
    .side-nav.is-expanded .sb-btn-close-mobile { min-width:44px; min-height:44px; border-radius:9px; }
}
.area-content { min-width: 0; min-height: 100dvh; }
.top-bar { height: var(--topbar-height); padding: 0 24px; box-shadow: none; gap: 16px; z-index: 50; }
/* 20/11: one page edge for top bar, page header and content. The top bar uses the same gutter as the
   page and, on wide screens, the same centred frame (--va-frame-max mirrors .page-body max-width),
   so bell/avatar line up with header buttons and filters on every screen. */
.area-content { --va-frame-max: min(var(--va-content-max), 2880px); }
.area-content:has(#page-campus-settings:not(.d-none)) { --va-frame-max: min(var(--va-content-max), calc(1440px + 2 * var(--va-page-gutter))); }
.area-content:has(#page-access:not(.d-none)) { --va-frame-max: min(var(--va-content-max), calc(1600px + 2 * var(--va-page-gutter))); }
.area-content:has(#page-station:not(.d-none)) { --va-frame-max: min(var(--va-content-max), calc(1360px + 2 * var(--va-page-gutter))); }
.area-content:has(:is(#page-booking,#page-personal-qr,#page-kitchen-schedule,#page-my-meal-feedback):not(.d-none)) { --va-frame-max: 100000px; }
.top-bar { padding-inline: calc(max(0px, (100% - var(--va-frame-max)) / 2) + var(--va-page-gutter)); }
.top-bar-left { flex: 0 0 auto; min-width: 0; }
.top-bar-right { flex-shrink: 0; gap: 8px; margin-left: auto; }
.va-popover[hidden] { display: none; }
.va-error-page button[hidden] { display: none; }
.va-tool { width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 8px; background: white; color: #1B2A4A; display: inline-flex; align-items: center; justify-content: center; position: relative; }
.va-tool svg { width: 20px; height: 20px; }
.va-tool:hover { background: #EEF1F7; }
.va-lang { display: flex; align-items: center; height: 40px; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }
.va-lang button { border: 0; background: white; color: #545454; height: 38px; padding: 0 8px; font-size: 12px; }
.va-lang button[aria-pressed=true] { color: var(--color-primary); font-weight: 600; background: #FCF1F4; }
#va-lang-mobile { display:none; }
/* D-205: where the person works (read only); duty roles also see their data scope. */
.va-workplace { display: flex; flex-direction: column; justify-content: center; min-width: 0; max-width: 280px; height: 40px; margin: 0; padding: 0 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--card-bg); color: var(--text-primary); line-height: 1.25; }
.va-workplace[hidden] { display: none; }
.va-workplace-place { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.va-workplace-scope { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.va-workplace-scope[hidden] { display: none; }
@media (max-width: 1023px) {
    .top-bar .va-workplace { display: none; }
}
/* D-205: people, roles and data scopes (Phân quyền). */
.pa-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border: 1px solid var(--border-color); border-radius: 999px; background: var(--card-bg); color: var(--text-primary); font-size: 14px; }
.pa-sub { display: block; color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.pa-warning { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: #FFF4E5; color: #8A4B00; font-size: 14px; }
[data-va-theme="dark"] .pa-warning { background: #3A2A12; color: #FFD8A8; }
.pa-note { color: var(--text-muted); font-size: 14px; }
.pa-editor { margin-top: 16px; padding: 16px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--card-bg); }
.pa-editor[hidden] { display: none; }
.pa-editor h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.pa-editor fieldset { margin: 12px 0; border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; }
.pa-editor fieldset[hidden] { display: none; }
.va-notification-count { position: absolute; top: -4px; right: -4px; background: var(--color-primary); border: 2px solid white; color: white; border-radius: 12px; font-size: 10px; min-width: 18px; padding: 0 3px; }
.va-popover-anchor { position: relative; }
.va-popover { position: absolute; right: 0; top: 48px; width: 320px; max-width: calc(100vw - 32px); max-height: 400px; overflow-y: auto; padding: 20px; border: 1px solid var(--border-color); border-radius: 8px; background: white; box-shadow: 0 12px 32px #1B2A4A1A; }
.va-popover h2 { font-size: 16px; margin-bottom: 16px; }
.va-popover { max-height: min(400px, calc(100vh - 88px)); max-height: min(400px, calc(100dvh - 88px - env(safe-area-inset-bottom, 0px))); }
.va-popover p { font-size: 14px; color: var(--text-secondary); }
.va-notification { border-top: 1px solid var(--border-color); padding: 12px 0; }
.va-notification small { color: var(--text-secondary); display: block; margin-top: 4px; }
.user-pill-topbar { min-height: 40px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; padding: 0 4px; gap: 8px; color: var(--text-primary); }
.user-pill-topbar:hover { background: #F5F6F7; transform: none; box-shadow: none; }
.user-pill-avatar-wrapper { width: 32px; height: 32px; }
.va-avatar-initials { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; color: var(--color-primary); background: var(--va-maroon-100); font-size: 12px; font-weight: 600; }
.dropdown-user-avatar-wrapper .va-avatar-initials { width: 44px; height: 44px; font-size: 16px; }
.user-status-dot { display: none; }
.user-pill-name { max-width: 140px; font-size: 13px; font-weight: 600; }
.user-pill-role { font-size: 11px; color: #545454; }
.user-dropdown-menu { border-radius: 8px; top: calc(100% + 12px); box-shadow: 0 12px 32px #1B2A4A1A; }
.page-body { --va-workspace-max:2880px; min-width:0; max-width:min(var(--va-content-max),var(--va-workspace-max)); padding:24px var(--va-page-gutter) 48px; }
/* Forms and QR readers keep their intentional reading/scanning widths. */
.page-body:has(> #page-campus-settings:not(.d-none)) { --va-workspace-max:calc(1440px + 2 * var(--va-page-gutter)); }
.page-body:has(> #page-access:not(.d-none)) { --va-workspace-max:calc(1600px + 2 * var(--va-page-gutter)); }
.page-body:has(> #page-station:not(.d-none)) { --va-workspace-max:calc(1360px + 2 * var(--va-page-gutter)); }
.page-body:has(> :is(#page-personal-qr,#page-my-meal-feedback):not(.d-none)) { --va-workspace-max:1280px; }
.page-content { min-width:0; container:va-page / inline-size; }
.va-page-heading { margin-bottom: 24px; }
.va-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.va-breadcrumb button { border: 0; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.va-breadcrumb svg { width: 14px; height: 14px; }

.greeting-banner { display: grid; grid-template-columns: minmax(0,1fr) 80px minmax(0,1fr); align-items: center; background: white; border: 1px solid var(--border-color); border-left: 4px solid var(--color-primary); border-radius: 8px; padding: 20px 24px; box-shadow: none; gap: 24px; margin-bottom: 24px; }
.greeting-banner::before, .greeting-banner::after { display: none; }
.greeting-banner-left { gap: 16px; min-width: 0; }
.mascot-frame { position: relative; display: block; width: 80px; height: 112px; overflow: hidden; flex: 0 0 80px; align-self: center; justify-self: center; border-radius: 20px; background: transparent; }
/* Center the character itself, accounting for the PNG's transparent margins. */
.mascot-frame .banner-linh-vat { position: absolute; width: 336px; height: auto; max-width: none; top: 50%; left: 50%; transform: translate(-43.02%,-53.6%); object-fit: contain; animation: none; filter: none; }
.greeting-banner-title { display: block; color: #1B2A4A; font-size: 20px; font-weight: 600; line-height: 1.4; }
.greeting-banner-title span { font-weight: inherit; }
.greeting-banner-secondary { color: #545454; font-size: 14px; font-weight: 400; line-height: 1.6; margin-top: 8px; }
.greeting-banner-right { gap: 24px; border-color: var(--border-color); justify-self: end; }
.metric-banner-count { color: var(--color-primary); font-size: 24px; font-weight: 600; }
.metric-banner-label { color: #545454; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.va-dashboard-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.va-dashboard-toolbar h2 { font-size: 20px; }
.va-dashboard-filter { display:flex; align-items:center; flex-wrap:wrap; gap:12px; min-width:0; }
.va-dashboard-filter label { color:var(--text-secondary); font-size:13px; }
.va-dashboard-filter .va-dashboard-field { display:flex; align-items:center; gap:8px; min-width:0; }
.va-dashboard-field>span { white-space:nowrap; }
.va-dashboard-field :is(input,select) { min-width:0; max-width:100%; height:44px; min-height:44px; padding:8px 12px; border:1px solid var(--border-color); border-radius:8px; background:var(--card-bg); color:var(--text-primary); font:inherit; }
.va-dashboard-field input { width:184px; }.va-dashboard-field select { width:155px; }
.va-dashboard-filter .va-tool { width:44px; height:44px; flex:0 0 44px; }
@media(max-width:767px){
 .va-dashboard-filter .va-dashboard-field{flex-direction:column;align-items:stretch;gap:6px}
 .va-dashboard-filter{align-items:flex-end}
}
@media(max-width:599px){
 .va-dashboard-toolbar .va-dashboard-filter{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:12px}
 .va-dashboard-field:first-child{grid-column:1/-1}
 .va-dashboard-field :is(input,select){width:100%}
}
.grid-stats { gap: 16px; margin-bottom: 24px; }
.stat-card { border: 1px solid var(--border-color); border-radius: 8px; box-shadow: none; padding: 20px; display: grid; grid-template-columns: 1fr 40px; align-items: start; gap: 12px; }
.stat-card::after { display: none; }
.stat-card:hover { transform: none; box-shadow: none; border-color: #B4B4B4; }
.stat-card .icon-tk { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; margin: 0; border-radius: 8px; }
.stat-card .tag-label { grid-column: 1; grid-row: 1; color: #545454; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.stat-card .tabular-value { grid-column: 1; font-size: 30px; font-weight: 600; line-height: 1.2; margin: 0; color: #1B2A4A; }
.stat-card .va-metric-detail { grid-column: 1 / -1; color: #545454; font-size: 12px; }
.grid-2-column { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.grid-2-column.va-chart-full { grid-template-columns: 1fr; }
.the, .box-chart { border: 1px solid var(--border-color); border-radius: 8px; background: white; box-shadow: none; padding: 24px; min-width: 0; }
.box-chart { position: relative; }
.frame-chart { height: 260px; position: relative; }
.title-block { gap: 12px; }
.title-block h3 { font-size: 16px; font-weight: 600; }
.title-block-icon { width: 32px; height: 32px; border-radius: 6px; border: 0; background: #FCF1F4; }
.va-chart-state { position: absolute; inset: 0; background: white; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px; color: #545454; }
.va-chart-state strong { color: #1B2A4A; font-weight: 500; }
.va-state { padding: 32px 16px; text-align: center; color: #545454; }
.va-state p { margin: 8px 0 16px; }
.va-skeleton { height: 16px; border-radius: 4px; background: #EEF1F7; animation: va-pulse 1.4s ease-in-out infinite alternate; }
.va-state .va-skeleton { width: 70%; margin: 12px auto; }
@keyframes va-pulse { to { opacity: .45; } }
.va-meal-row { display: grid; grid-template-columns: 160px 1fr 80px; gap: 24px; align-items: center; padding: 20px 0; border-top: 1px solid var(--border-color); }
.va-meal-name { font-weight: 600; font-size: 16px; }
.va-meal-counts { display: flex; gap: 24px; margin-bottom: 12px; color: #545454; font-size: 13px; flex-wrap: wrap; }
.va-meal-counts strong { color: #1B2A4A; }
.va-progress { height: 6px; background: #EEF1F7; border-radius: 4px; overflow: hidden; }
.va-progress span { display: block; height: 100%; background: var(--va-teal-600); }
.va-meal-rate { text-align: right; color: var(--va-teal-700); font-size: 24px; font-weight: 600; min-width: 72px; }
.va-meal-rate small { display: block; font-size: 12px; color: #545454; margin-top: 4px; }
.card-info-page-header { padding: 0 0 24px; margin: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.card-info-page-header h2 { font-size: 20px; font-weight: 600; }
.card-info-page-header p { color: #545454; font-size: 14px; margin-top: 8px; }

.card-info-page-header::after { display: none; }

.report-table { border-color: var(--border-color); box-shadow: none; }
.btn-action-btn { width: 36px; min-width: 36px; height: 36px; padding: 0; border-radius: 8px; }
.modal-close, .sb-btn-close-mobile, .va-toast-dismiss, .menu-import-table .btn-action-btn, .menu-dish-actions .btn-action-btn.lock-action {
    width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; flex-shrink: 0;
    align-items: center; justify-content: center; border-radius: 8px;
    font-size: 28px; font-weight: 500; line-height: 1; touch-action: manipulation;
}
.modal-close, .va-toast-dismiss, .menu-import-table .btn-action-btn, .menu-dish-actions .btn-action-btn.lock-action { display: inline-flex; }
.modal-close svg { width: 26px; height: 26px; flex-shrink: 0; }
.modal-close:focus-visible, .sb-btn-close-mobile:focus-visible, .va-toast-dismiss:focus-visible {
    outline: 2px solid var(--va-maroon-500); outline-offset: 3px;
}
.btn-action-btn:hover, .modal-close:hover { transform: none; }
.group-input label { color: #1B2A4A; font-size: 14px; font-weight: 500; }
.group-input input, .group-input select, .input-date-standard, .select-standard, .modal-content .group-input input, .modal-content .group-input select { height: 40px; border-radius: 8px; border-width: 1px; background-color: white; font-size: 14px; }
.group-input textarea { border-radius: 8px; background: white; }
.table-data { font-size: 14px; }

.table-data thead th,
.page-content .table-data thead th,
#page-reports .table-data thead th,
.modal-overlay .table-data thead th { background:var(--va-table-head-bg); color:var(--va-table-head-ink); font-size:12px; font-weight:600; padding:14px 16px; line-height:1.5; text-transform:none; letter-spacing:.1px; border-bottom:2px solid var(--va-table-head-line); border-right:1px solid var(--va-table-head-divider); text-align:left; }
.table-data thead th:last-child { border-right:0; }
.table-data tbody td { padding: 16px; height: 56px; color: #1B2A4A; }
.table-data tbody tr:nth-child(even) { background: white; }
.table-data tbody tr:hover { background: #FAFBFC; }
.table-data thead tr { background:var(--va-table-head-bg); border-bottom:2px solid var(--va-table-head-line); }
#page-reports .va-table-cards td[data-label]::before,
.page-content .admin-table td[data-label]::before,
.ops-workspace .ops-schedule-table td[data-label]::before,
.modal-overlay .menu-import-table td[data-label]::before { color:var(--va-table-head-ink); font-weight:600; }
.label-status { font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 4px; }
.va-sort { background: none; border: 0; color: inherit; font: inherit; display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer; }
.va-sort span { color: #545454; font-size: 14px; }
:is(.table-data, table[data-va-sortable]) thead .va-sort > span { color:inherit; font-size:inherit; font-weight:inherit; }
:is(.table-data, table[data-va-sortable]) thead .va-sort > span[aria-hidden="true"] { opacity:.65; }
.pager-bar { gap: 8px; justify-content: flex-end; }

#sec-report-overview,#sec-bc-so-sanh,#sec-report-department { scroll-margin-top:90px; }

.report-time-btn { font-size: 12px; }


.menu-group-meal, .menu-card-dish { box-shadow: none; border-radius: 8px; }
.menu-group-meal-header { background: #F5F6F7; }
.menu-list-dish { gap: 16px; }
.meal-notice { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px; margin-bottom:16px; background:#F6EFE3; border-radius:8px; color:#503D22; }
.meal-notice p { margin:6px 0 0; font-size:14px; }
.meal-empty { padding:40px 24px; background:#fff; border:1px solid #E4E4E4; border-radius:8px; text-align:center; }
.meal-empty h3 { margin-bottom:10px; }
.meal-empty p { margin-bottom:16px; color:#545454; }
.menu-date-toolbar, .menu-date-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.menu-date-toolbar { padding:16px 20px; margin-bottom:20px; }
.menu-date-toolbar > strong { font-size:16px; text-transform:capitalize; }
.menu-date-label { display:flex; align-items:center; gap:8px; font-size:13px; color:#545454; }
.menu-campus { display:flex; gap:32px; overflow-x:auto; max-width:100%; margin-bottom:20px; border-bottom:1px solid var(--border-color); }
.menu-campus button { flex-shrink:0; min-height:48px; padding:12px 0; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--text-secondary); font:inherit; font-size:13px; white-space:nowrap; cursor:pointer; }
.menu-campus button[aria-pressed=true] { color:var(--text-strong); font-weight:700; border-bottom-color:var(--color-primary); }
.menu-form-branch { margin:0 0 20px; font-size:13px; font-weight:600; color:var(--color-primary); }
@media(max-width:767px) { .menu-campus { gap:24px; }.menu-campus button { font-size:12px; } }
.menu-tabs { display:flex; gap:24px; border-bottom:1px solid var(--border-color); margin-bottom:20px; }
.menu-tabs button { padding:12px 0; color:var(--text-secondary); background:none; border:0; border-bottom:2px solid transparent; font:inherit; font-size:14px; cursor:pointer; }
.menu-tabs button[aria-selected=true] { color:var(--color-primary); border-bottom-color:var(--color-primary); font-weight:600; }
.menu-tabs button:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }
.menu-month-table { table-layout:fixed; min-width:620px; background:white; }
.menu-month-table th:first-child { width:170px; }
.menu-month-table td { vertical-align:top; white-space:normal; padding:16px 20px; }
.menu-month-table th small,.menu-month-table li small { display:block; color:var(--text-secondary); font-weight:400; font-size:12px; line-height:1.5; margin-top:4px; }
.menu-month-table ul { margin:0; padding-left:18px; }
.menu-month-table li { margin-bottom:7px; font-size:14px; line-height:1.5; }
.menu-month-day { display:flex; flex-direction:column; gap:5px; text-align:left; background:none; border:0; color:var(--text-strong); font:inherit; cursor:pointer; }
.menu-month-day span,.menu-month-status { color:var(--text-secondary); font-size:12px; }
.menu-month-status { display:block; margin-bottom:8px; }
.menu-month-today { background:#FFF5F7; }
.menu-month-closed { background:#F8F9FA; }
.menu-month-empty-note { color:var(--text-secondary); font-size:14px; margin-bottom:16px; }
@media(max-width:767px) {
    .menu-month-wrap { border:0; overflow:visible; }
    .menu-month-table { display:block; min-width:0; width:100%; background:none; }
    .menu-month-table thead { display:none; }
    .menu-month-table tbody { display:grid; gap:12px; }
    .menu-month-table tbody tr { display:grid; padding:12px 16px; background:white; border:1px solid var(--border-color); border-radius:8px; }
    .menu-month-table tbody tr.menu-month-today { border-color:var(--color-primary); }
    .menu-month-table tbody td { display:block; border:0; padding:8px 0; }
    .menu-month-table td[data-label]::before { content:attr(data-label); display:block; margin-bottom:6px; color:var(--text-secondary); font-size:12px; font-weight:600; }
}
.menu-import-dialog { max-width:1120px; width:calc(100vw - 40px); max-height:90vh; overflow-y:auto; padding:28px; }
.menu-delete-button { color:#B42318; border-color:#FDA29B; }
.menu-delete-button:hover { color:#912018; background:#FEF3F2; border-color:#F97066; }
.menu-delete-dialog { max-width:580px; width:calc(100vw - 32px); max-height:90vh; overflow-y:auto; padding:24px; }
.menu-delete-context { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; margin:22px 0; }
.menu-delete-context span { display:block; color:#667085; font-size:13px; margin-bottom:5px; }
.menu-delete-context strong { display:block; font-size:14px; overflow-wrap:anywhere; }
.menu-delete-scope { display:block; font-size:14px; font-weight:600; }
.menu-delete-scope select { display:block; width:100%; min-width:0; margin-top:8px; padding:10px; height:44px; border:1px solid var(--border-color); border-radius:8px; background:white; color:var(--text-strong); font:inherit; font-weight:400; }
.menu-delete-summary { margin:20px 0; font-weight:600; }
.menu-delete-dialog .modal-footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
.menu-import-help { color:var(--text-secondary); font-size:13px; line-height:1.6; margin:8px 0 16px; }
.menu-import-controls { display:flex; flex-wrap:wrap; align-items:flex-end; gap:16px; margin-top:20px; }
.menu-import-controls label,.menu-import-footer label { display:flex; flex-direction:column; gap:8px; font-size:13px; }
.menu-import-controls input,.menu-import-controls select,.menu-import-footer select { max-width:100%; background:white; border:1px solid var(--border-color); border-radius:8px; padding:10px; color:var(--text-strong); font:inherit; }
.menu-import-notes { font-size:13px; color:var(--text-secondary); line-height:1.6; }
.menu-import-dialog details { margin:12px 0; font-size:13px; }
.menu-import-dialog pre { max-height:220px; overflow:auto; white-space:pre-wrap; margin-top:10px; padding:12px; background:#F5F6F7; font-size:12px; }
.menu-import-summary { margin:20px 0 12px; gap:12px; flex-wrap:wrap; font-size:14px; }
.menu-import-table-wrap { border:1px solid var(--border-color); border-radius:8px; overflow:auto; max-height:380px; }
.menu-import-table { min-width:760px; table-layout:fixed; }
.menu-import-table th:nth-child(1) { width:155px; }.menu-import-table th:nth-child(2) { width:130px; }.menu-import-table th:nth-child(4) { width:170px; }.menu-import-table th:last-child { width:64px; }
.menu-import-table th { position:sticky; top:0; z-index:1; background:#F5F6F7; }
.menu-import-table td { padding:8px; white-space:normal; vertical-align:top; }
.menu-import-table input,.menu-import-table select { width:100%; min-width:0; border:1px solid var(--border-color); border-radius:6px; padding:9px 7px; color:var(--text-strong); background:white; font:inherit; font-size:13px; }
.menu-import-row-state { font-size:12px; color:#0F8A70; line-height:1.5; }.menu-import-row-state.has-error { color:#B42318; }
.menu-import-footer { margin-top:20px; display:flex; align-items:flex-end; flex-wrap:wrap; gap:16px; }
.menu-import-footer > .row-horizontal { gap:12px; flex-shrink:0; }
.menu-import-footer p { flex:1; min-width:160px; font-size:12px; line-height:1.6; color:var(--text-secondary); }
@media(max-width:767px) { .menu-import-dialog { padding:18px; width:calc(100vw - 24px); max-height:92vh; }.menu-import-controls label { width:100%; }.menu-import-controls input[type=file] { width:100%; }.menu-import-footer label,.menu-import-footer > .row-horizontal { width:100%; }.menu-tabs { gap:18px; }.menu-tabs button { font-size:13px; } }
.menu-day-summary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; margin:0 0 12px; font-size:13px; color:#545454; }
.menu-day-summary strong { font-weight:500; font-variant-numeric:tabular-nums; }
.menu-meal-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; align-items:start; }
.menu-meal-layout .menu-group-meal { margin:0; border:1px solid #E4E4E4; }
.menu-meal-layout .menu-group-meal-header { padding:20px; align-items:flex-start; justify-content:space-between; gap:12px; }
.menu-meal-heading { min-width:0; }
.menu-meal-heading .menu-meal-name { font-size:20px; margin:0 0 6px; }
.menu-meal-heading p { font-size:13px; color:#545454; margin:0; font-variant-numeric:tabular-nums; }
.meal-state { padding:5px 8px; border-radius:4px; font-size:12px; white-space:nowrap; }
.meal-state.is-serving { color:#00564F; background:#D6F2EF; }
.meal-state.is-muted { color:#545454; background:#EAEAEA; }
.menu-meal-layout .menu-list-dish { display:flex; flex-direction:column; padding:0 20px; gap:0; }
.menu-meal-layout .menu-card-dish { padding:16px 0; border:0; border-bottom:1px solid #EEEEEE; border-radius:0; background:#fff; gap:14px; }
.menu-meal-layout .menu-card-dish:last-child { border-bottom:0; }
.menu-meal-layout .menu-card-dish:hover { transform:none; box-shadow:none; }
.menu-meal-layout .menu-dish-name { font-size:15px; line-height:1.5; }
.menu-meal-layout .menu-dish-description { font-size:13px; display:block; overflow:visible; line-height:1.6; }
.menu-service-note { margin:0; padding:12px 20px; background:#F6EFE3; font-size:13px; }
.menu-unpublished { padding:28px 0; }
.menu-unpublished strong { font-size:15px; font-weight:600; }
.menu-unpublished p { margin:8px 0 16px; font-size:14px; line-height:1.6; color:#545454; }
.menu-meal-footer { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:16px; padding:20px; border-top:1px solid #E4E4E4; background:#FAFAFA; }
.menu-meal-footer strong { font-size:14px; font-weight:600; }
.menu-meal-footer p { margin:6px 0 0; color:#545454; font-size:12px; line-height:1.6; }
.menu-booked-text { color:#00564F; }
.meal-loading { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.meal-loading > div { min-height:260px; border-radius:8px; background:#EAEAEA; }
.meal-schedule-form { margin-bottom:20px; }
.meal-schedule-form > p { margin:8px 0 20px; color:#545454; font-size:14px; line-height:1.6; }
.meal-schedule-form .ops-form-grid { padding:0; margin:0 0 16px; }
.meal-schedule-options { display:flex; flex-wrap:wrap; gap:12px 20px; border:0; padding:0; margin:0 0 20px; }
.meal-schedule-options legend { font-weight:600; font-size:14px; margin-bottom:12px; }
.meal-schedule-options label { display:flex; align-items:center; gap:8px; font-size:14px; cursor:pointer; }
.meal-schedule-options input { width:18px; height:18px; accent-color:#9A0036; }
.meal-schedule-save { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px; font-size:13px; color:#545454; }
@media (max-width:900px) { .menu-meal-layout { grid-template-columns:1fr; } }
@media (max-width:767px) {
    .meal-notice { flex-direction:column; align-items:flex-start; }
    .menu-date-toolbar, .menu-meal-layout .menu-group-meal-header, .menu-meal-footer { padding:16px; }
    .menu-meal-layout .menu-list-dish { padding:0 16px; }
    .menu-date-actions { width:100%; justify-content:flex-start; }
    .menu-date-label { width:100%; justify-content:space-between; }
    .meal-loading { grid-template-columns:1fr; }
}
.cal-auto-register input:disabled + .cal-switch { opacity: .5; cursor: wait; }
.modal-overlay { background: #1B2A4A66; backdrop-filter: blur(2px); }
.modal-content { border-radius: 12px; max-height: 90dvh; padding: 24px; box-shadow: 0 24px 64px #1B2A4A26; }
.modal-content h2, .modal-content h3 { font-size: 20px; }
.modal-actions-footer { gap: 12px; }
.va-permission-dialog { width: min(760px,100%); max-width: 760px; display: flex; flex-direction: column; overflow: hidden; }
.va-permission-dialog > :not(form) { flex-shrink: 0; }
.va-permission-dialog form { display: flex; flex-direction: column; flex:1; min-height: 0; overflow:hidden; }
.va-permission-body { min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:8px; }
#user-permission-list { min-height: 0; }
.va-permission-dialog .modal-actions-footer { flex-shrink: 0; margin-top: 16px; padding-top: 16px; }
.va-permission-dialog .btn { min-height:44px; }
.va-permission-controls { flex-shrink: 0; }
#user-table-body-legacy .btn-action-group { flex-wrap: wrap; max-width: 100%; }
.btn-action-btn.unlock-action { color: var(--va-teal-700); }
.btn-action-btn:disabled { opacity: .4; cursor: not-allowed; }
.va-account-option { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0 24px; cursor: pointer; }
.va-account-option input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; accent-color: var(--color-primary); }
.va-account-option small { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.va-permission-user { margin: 12px 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.va-permission-note { color: var(--text-secondary); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
.va-permission-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.va-permission-controls[hidden] { display: none; }
.va-permission-controls label { display: grid; gap: 8px; font-weight: 500; flex: 1; min-width: 180px; }
.va-permission-controls select { height: 44px; border: 1px solid var(--border-color); border-radius: 8px; padding: 0 12px; background: white; }
.va-permission-select { display: flex; flex-wrap: wrap; gap: 8px; }
.va-permission-group { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 8px 24px; border: 0; padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--border-color); }
.va-permission-group legend { padding: 0 0 12px; font-weight: 600; color: var(--text-primary); }
.va-permission-option { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.va-permission-option input { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 18px; accent-color: var(--color-primary); }
.va-permission-option strong { display: block; font-size: 14px; font-weight: 500; }
.va-permission-option small { display: block; color: var(--text-secondary); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.va-permission-option.va-permission-role-only { padding:10px 12px; border-left:3px solid var(--color-primary); border-radius:4px; background:var(--color-primary-tint); cursor:default; }
.va-confirm-icon { color: var(--color-primary); background: #FCF1F4; width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; margin-bottom: 16px; }
.va-confirm-icon svg { width: 24px; height: 24px; }
.va-confirm-message { margin-top: 12px; line-height: 1.6; color: #545454; }
.va-confirm-dialog { max-width: 440px; width: 100%; }
#va-confirm { z-index:2002; }
#va-confirm .modal-actions-footer .btn { min-height:44px; }
#va-help { inset:0; top:var(--va-help-viewport-top,0px); left:var(--va-help-viewport-left,0px); width:auto; height:auto; max-width:var(--va-help-viewport-width,100%); max-height:var(--va-help-viewport-height,100%); padding:24px; align-items:center; overflow:hidden; }
#va-help .va-help-dialog { display:flex; flex-direction:column; width:100%; max-width:640px; height:auto; max-height:100%; min-height:0; padding:0; overflow:hidden; border:1px solid var(--border-color); border-top:4px solid var(--color-primary); border-radius:16px; box-shadow:0 24px 72px #1B2A4A24; }
.va-help-header { display:flex; align-items:flex-start; gap:14px; padding:24px 24px 20px; flex-shrink:0; }
.va-help-icon { display:grid; place-items:center; width:48px; height:48px; flex-shrink:0; color:var(--color-primary); background:var(--color-primary-tint); border-radius:12px; }
.va-help-icon svg { width:26px; height:26px; }
.va-help-heading { min-width:0; flex:1; }
.va-help-heading > p { margin-bottom:5px; color:var(--text-secondary); font-size:12px; font-weight:500; }
.va-help-heading h2 { font-size:23px; font-weight:700; line-height:1.35; letter-spacing:-.3px; text-wrap:balance; overflow-wrap:anywhere; }
.va-help-header .modal-close { color:var(--text-secondary); background:var(--card-bg); border:1px solid var(--border-color); }
.va-help-header .modal-close:hover { color:var(--color-primary); background:var(--color-primary-tint); border-color:var(--color-primary-border); }
.va-help-header .modal-close svg { width:18px; height:18px; }
.va-help-body { min-height:0; padding:0 24px 24px; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; scrollbar-gutter:stable; }
.va-help-description { margin:0 0 20px; color:var(--text-secondary); font-size:14px; line-height:1.65; text-wrap:pretty; }
.va-help-dialog ol { list-style:none; display:grid; gap:0; padding:0; margin:0; }
.va-help-dialog li { display:grid; grid-template-columns:36px minmax(0,1fr); gap:16px; padding:18px 0; line-height:1.65; }
.va-help-dialog li:first-child { padding-top:0; }
.va-help-dialog li:last-child { padding-bottom:0; }
.va-help-dialog li + li { border-top:1px solid var(--border-light); }
.va-help-step-number { display:grid; place-items:center; width:36px; height:36px; background:var(--color-primary-tint); color:var(--color-primary); border-radius:10px; font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; }
.va-help-step-copy { min-width:0; }
.va-help-step-copy h3 { margin:3px 0 6px; font-size:15px; font-weight:600; line-height:1.4; }
.va-help-step-copy p { margin:0; color:var(--text-secondary); font-size:14px; line-height:1.7; overflow-wrap:anywhere; text-wrap:pretty; }
.va-help-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 24px; border-top:1px solid var(--border-color); background:var(--card-bg-alt); flex-shrink:0; }
.va-help-footer .btn { min-height:44px; }
.va-help-footer .btn-primary { min-width:132px; margin-left:auto; }
.va-help-feedback { padding:0 10px; color:var(--text-secondary); border:0; background:transparent; box-shadow:none; }
.va-help-feedback svg { width:18px; height:18px; }
.va-help-feedback:hover:not(:disabled) { color:var(--color-primary); background:var(--color-primary-tint); transform:none; box-shadow:none; }
.va-help-feedback[hidden] { display:none; }
@media (max-width:640px) {
    #va-help { padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); align-items:center; }
    #va-help .va-help-dialog { max-height:100%; border-radius:16px; }
    .va-help-header { gap:10px; padding:20px 16px 16px; }
    .va-help-icon { width:40px; height:40px; border-radius:10px; }
    .va-help-icon svg { width:23px; height:23px; }
    .va-help-heading h2 { font-size:20px; }
    .va-help-body { padding:0 16px 20px; }
    .va-help-description { margin-bottom:18px; }
    .va-help-dialog li { gap:12px; padding:16px 0; }
    .va-help-footer { padding:14px 16px; }
    .va-help-footer .btn-primary { min-width:116px; }
}
.va-form-error { color: #991B1B; margin-top: 4px; font-size: 13px; }
.group-input [aria-invalid=true] { border-color: #DC2626; }
.area-notice { top:auto; bottom:20px; right:20px; left:auto; width:min(360px,calc(100vw - 32px)); gap:8px; }
.toast-item { width:100%; min-width:0; max-width:none; gap:8px; font-size:13px; line-height:1.5; font-weight:400; padding:8px 10px; border-radius:8px; box-shadow:0 4px 16px #1B2A4A14; cursor:default; }
.va-toast-content { flex:1; min-width:0; overflow-wrap:anywhere; }
.va-toast-icon { flex:0 0 16px; font-size:16px; font-weight:700; }
.va-toast-dismiss { background:none; border:0; color:inherit; margin-left:auto; font-size:22px; cursor:pointer; }
.toast-item.cal-action-toast { pointer-events:none; }
.cal-action-toast .va-toast-dismiss { pointer-events:auto; }
.va-error-page { min-height: 360px; display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: center; background: white; padding: 48px; border-radius: 8px; }
.va-error-number { font-size: 80px; font-weight: 700; color: #7A002B; line-height: 1.2; }
.va-error-page h2 { font-size: 24px; margin: 16px 0; }
.va-error-page p { color: #545454; margin-bottom: 24px; }
.va-error-mascot { background: url('/images/linh-vat.png') center center / 960px 540px no-repeat; height: 280px; }
/* Sign-in layout mirrors the VA Schools Short Link login: logo, tagline, product name, compact Google card. */
.page-sign-in { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 40px; min-height: 100vh; min-height: 100dvh; padding: max(32px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); background: #9B0038; position: relative; isolation: isolate; }
/* The SVG stores the subtle white watermark; mobile needs no color filters or blending. */
.page-sign-in::before { content: ''; position: fixed; z-index: -1; inset: 0; background: url('/images/sign-in-backdrop.svg?v=20261011-login-background') 58% center / cover no-repeat; filter: none; opacity: 1; pointer-events: none; }
.va-login-brand { position: relative; width: 390px; max-width: 100%; flex-shrink: 0; text-align: center; color: white; }
.va-login-logo { display: flex; justify-content: center; }
/* login-logo.png is the brand red; render it white on the red background. */
.va-login-logo img { display: block; width: 100%; height: auto; filter: brightness(0) invert(1); }
.va-login-tagline { margin: 20px 0 0; color: white; font-size: min(22px, calc((100vw - 32px) / 17.5)); font-weight: 600; line-height: 1.3; text-transform: uppercase; white-space: nowrap; }
.va-login-brand h1 { margin: 20px 0 0; color: white; font-size: 26px; font-weight: 600; line-height: 1.35; }
.sign-in-box { position: relative; flex-shrink: 0; width: 402px; max-width: 100%; margin: 0; padding: 40px 32px; border: 0; border-radius: 12px; background: white; box-shadow: 0 16px 48px #3D001526; animation: none; }
.sign-in-box::before { display: none; }
.sso-login { text-align: center; }
.sso-login h2 { margin: 0; font-size: 28px; font-weight: 600; line-height: 1.3; color: #1A1A1A; }
.sso-intro { max-width: 300px; margin: 12px auto 24px; font-size: 14px; font-weight: 400; color: #545454; line-height: 1.6; }
.sso-intro b { font-weight: 500; overflow-wrap: anywhere; }
.google-g-button { position: relative; width: 44px; height: 44px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; transition: transform .15s ease; }
.google-g-button svg { width: 40px; height: 40px; display: block; transition: opacity .15s ease; }
.google-g-button:hover { transform: scale(1.06); }
.google-g-button:focus-within { outline: 2px solid #9B0038; outline-offset: 4px; }
.google-g-button:has(.google-login-button[inert]) svg { opacity: .4; }
/* Google's rendered icon button stays clickable and keyboard-focusable, but invisible over the plain G. */
.google-g-button .google-login-button { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; overflow: hidden; border-radius: 50%; opacity: .01; }
.sso-login .notice-error-sign-in { margin-top: 20px; text-align: left; }
.sso-status { color: #545454; font-size: 12px; line-height: 1.7; margin-top: 16px; }
.sso-status:empty { display: none; }

.va-breadcrumb button { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 1279px) {
    .user-pill-info { display: none; }
    .greeting-banner { grid-template-columns: minmax(0,1fr); align-items: center; gap: 16px; }
    .greeting-banner > .mascot-frame { grid-row: 1; }
    .greeting-banner-left { grid-row: 2; justify-content: center; text-align: center; }
    .greeting-banner-right { grid-row: 3; width: 100%; border-left: 0; border-top: 1px solid var(--border-color); padding: 16px 0 0; justify-content: space-around; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    :root { --sidebar-width: 76px; }
    .side-nav { width: 76px; }
    .sb-logo { padding: 0 18px; }
    .sb-logo-text, .sb-group-header, .sb-item-text, .sb-btn-collapse { display: none; }
    .sb-group-content { margin: 0; padding: 0; border: 0; display: block !important; max-height: none !important; opacity: 1 !important; }
    .sb-item, .side-nav .item-menu { padding: 12px 8px; justify-content: center; }
    .side-nav .sb-nav { padding: 16px 12px; }
    .va-low-priority { display: none; }
}
@media (max-width: 1023px) {
    .grid-2-column { grid-template-columns: 1fr; }
    .grid-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .top-bar { padding: 0 24px; gap: 12px; }
    .top-bar-right { gap: 4px; }
}
@media (max-width: 767px) {
    :root { --sidebar-width: 256px; --topbar-height: 64px; }
    :root { --tab-bar-height: 143px; }
    html { scroll-padding-bottom: calc(var(--tab-bar-height) + 16px + env(safe-area-inset-bottom, 0px)); }
    .va-has-tab-bar .page-body { padding-bottom: calc(var(--tab-bar-height) + 24px + env(safe-area-inset-bottom, 0px)); }
    .va-has-tab-bar .area-notice { bottom: calc(var(--tab-bar-height) + 12px + env(safe-area-inset-bottom, 0px)); }
    .va-has-tab-bar .va-popover { max-height: min(400px, calc(100vh - 88px - var(--tab-bar-height))); max-height: min(400px, calc(100dvh - 88px - var(--tab-bar-height) - env(safe-area-inset-bottom, 0px))); }
    .side-nav, .side-nav.is-collapsed { width: 280px; transform: translateX(-100%); }
    .side-nav.is-expanded { transform: translateX(0); }
    .side-nav.is-expanded .sb-logo-text, .side-nav.is-expanded .sb-group-name, .side-nav.is-expanded .sb-item-text, .side-nav.is-expanded .sb-chevron-icon { display: block; }
    .side-nav.is-expanded .sb-group-header { display: flex; }
    .side-nav.is-expanded .sb-item { justify-content: flex-start; padding: 8px 12px; }
    .side-nav.is-expanded #menu-surplus { min-height:44px; height:auto; }
    .side-nav.is-expanded .sb-group-content { border-left: 0; margin-left: 16px; padding-left: 8px; }
    .area-content, .area-content.is-collapsed { margin-left: 0; width: 100%; }
    .btn-menu-mobile { display: flex; width: 40px; height: 40px; }
    .sb-btn-close-mobile { display: flex; }
    .sb-btn-collapse { display: none !important; }
    :root { --va-page-gutter: 16px; }
    .top-bar { padding: 0 16px; height: 64px; gap: 8px; }
    .top-bar-left { gap: 8px; }
    .va-feedback-nav { display: none; }
    .top-bar :is(.va-tool,.btn-menu-mobile) { width:44px; height:44px; flex:0 0 44px; }
    .top-bar .va-lang { display:flex; height:44px; flex:0 0 48px; width:48px; background:var(--card-bg); }
    .top-bar .va-lang button { display:none; }
    #va-lang-mobile { display:block; width:100%; height:44px; min-height:44px; padding:0 3px; border:0; border-radius:8px; background:var(--card-bg); color:var(--text-primary); font:inherit; font-size:12px; cursor:pointer; }
    .va-tool { width: 36px; }
    .top-bar-right { gap: 4px; }
    .user-pill-arrow-wrapper { display: none; }
    .user-dropdown-menu { position: fixed; right: 16px; top: 72px; max-width: calc(100vw - 32px); }
    .va-popover { position: fixed; right: 16px; top: 72px; }
    .page-body { padding: 16px 16px 32px; }

    .va-page-heading { margin-bottom: 16px; }
    .greeting-banner { padding: 16px; margin-bottom: 24px; gap: 16px; }
    .greeting-banner-title { font-size: 18px; }
    .greeting-banner-secondary { font-size: 13px; }
    .greeting-banner-left { gap: 12px; }
    .mascot-frame { flex-basis: 64px; width: 64px; height: 96px; border-radius: 16px; }
    .mascot-frame .banner-linh-vat { width: 288px; height: auto; }
    .greeting-banner-right { gap: 12px; }
    .metric-banner-label { font-size: 11px; }
    .va-dashboard-filter { width: 100%; flex-wrap: wrap; justify-content: space-between; }
    .stat-card { padding: 16px; gap: 12px; grid-template-columns: 1fr 28px; }
    .stat-card .icon-tk { width: 28px; height: 28px; }
    .stat-card .icon-tk svg { width: 18px; height: 18px; }
    .stat-card .tabular-value { font-size: 28px; }
    .stat-card .tag-label { font-size: 12px; }
    .stat-card .va-metric-detail { font-size: 11px; }
    .the, .box-chart { padding: 16px; }
    .title-block h3 { font-size: 16px; }
    .frame-chart { height: 240px; }
    .va-meal-row { grid-template-columns: 1fr 72px; gap: 12px; }
    .va-meal-name { grid-column: 1; }
    .va-meal-body { grid-column: 1 / -1; grid-row: 2; }
    .va-meal-rate { grid-column: 2; grid-row: 1; font-size: 20px; }
    .va-meal-counts { gap: 12px; }

    .modal-overlay { padding: 16px; align-items: center; }
    .modal-content { padding: 24px; border-radius: 12px; max-height: calc(100dvh - 32px); }
    .modal-overlay .modal-content .btn { min-height:44px; height:auto; }
    .modal-actions-footer .btn { min-width:0; padding:0 16px; }
    .cal-weekdays { display: none; }
    .cal-month-grid { grid-template-columns: 1fr; gap: 16px; }
    .cal-day.is-outside { display: none; }
    .cal-day { padding: 16px; border-radius: 8px; }
    .cal-day > header { font-size: 16px; }
    .cal-day > header small { font-size: 12px; }
    .cal-meals { flex-direction: row; gap: 12px; }
    .cal-meal { flex: 1; min-height: 48px; font-size: 14px; }
    .cal-meal strong { font-size: 12px; }
    .cal-legend { justify-content: flex-start; flex-wrap: wrap; font-size: 12px; }
    .cal-toolbar-actions strong { width: 100%; order: -1; text-align: left; font-size: 16px; }

    .cal-toolbar-actions { order: 1; }
    .cal-auto-options { order: 2; }
    .va-table-cards { display: block; width: 100%; }
    .va-table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .va-table-cards tbody { display: grid; gap: 16px; }
    .report-table:has(.va-table-cards) { border: 0; overflow: visible; }
    .va-table-cards tbody tr { display: grid; grid-template-columns: 1fr; padding: 16px; border: 1px solid var(--border-color); border-radius: 8px; background: white; }
    .va-table-cards tbody td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0 !important; height: auto; min-height: 40px; border: 0; text-align: right; white-space: normal; overflow-wrap: anywhere; }
    .va-table-cards tbody td::before { content: attr(data-label); text-align: left; flex: 0 0 36%; color: #545454; font-size: 12px; font-weight: 400; }
    .va-table-cards tbody td[colspan] { display: block; text-align: center; }
    .va-table-cards tbody td[colspan]::before { display: none; }
    .va-table-cards tbody td:first-child { font-weight: 600; }
    .va-table-cards .va-low-priority { display: flex; }

    .va-error-page { padding: 24px; grid-template-columns: 1fr; }
    .va-error-mascot { display: none; }
    .area-notice { top:auto; bottom:calc(16px + env(safe-area-inset-bottom)); left:auto; right:16px; }
    .toast-item { max-width: 100%; min-width: 0; }
    .page-sign-in { gap: 32px; }
    .va-login-brand { width: 300px; }
    .va-login-tagline { font-size: min(17px, calc((100vw - 32px) / 17.5)); }
    .va-login-brand h1 { font-size: 22px; }
    .sign-in-box { padding: 32px 24px; }
    .sso-login h2 { font-size: 24px; }
}
@media (max-width: 374px) {
    .grid-stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .va-login-enter .side-nav,
    .va-login-enter .side-nav :is(.sb-logo,.sb-nav > .sb-item,.sb-nav > .sb-group-dropdown) { animation:none !important; }
}

/* Thời gian còn lại của thông báo đồng bộ với bộ hẹn giờ đóng. */
.toast-item { position:relative; overflow:hidden; padding-bottom:11px; }
.va-toast-progress { position:absolute; left:0; right:0; bottom:0; height:3px; background:currentColor; opacity:.65; transform-origin:left; animation:va-toast-countdown var(--toast-duration,3000ms) linear forwards; pointer-events:none; }
@keyframes va-toast-countdown { from { transform:scaleX(1); } to { transform:scaleX(0); } }

.cal-auto-top { display:flex; align-items:center; gap:20px; }
.cal-auto-top > label { flex:1; }
.cal-feedback-open { flex-shrink:0; font-size:12px; min-height:40px; gap:7px; }
.cal-feedback-open > span { color:var(--va-gold-600); }
.feedback-entry { display:flex; align-items:center; gap:18px; margin-bottom:20px; padding:24px; }

.feedback-entry-copy { flex:1; min-width:0; }
.feedback-entry h3 { color:var(--va-maroon-700); font-size:16px; margin-bottom:6px; }
.feedback-entry p { color:var(--text-muted); font-size:13px; line-height:1.6; }
.feedback-entry > .btn { flex-shrink:0; gap:8px; }
.feedback-entry-topics { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:12px; color:var(--text-muted); font-size:12px; }
.feedback-entry-topics > span { display:inline-flex; align-items:center; gap:5px; }
#modal-rating-meal, #modal-image-feedback { backdrop-filter:blur(4px); padding:16px; }
#modal-rating-meal .feedback-dialog { display:flex; flex-direction:column; width:100%; max-width:580px; max-height:calc(100dvh - 32px); padding:0; overflow:hidden; border-radius:14px; }
.feedback-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; padding:18px 20px; border-bottom:1px solid var(--border-color); }
.feedback-header h2 { color:var(--va-maroon-700); font-size:16px; line-height:1.5; font-weight:700; }
.feedback-header h2 > span { color:#BB881F; padding-right:4px; }
.feedback-header p { color:var(--text-muted); font-size:11px; line-height:1.5; margin-top:3px; }
.feedback-header .modal-close { flex-shrink:0; border:1px solid #D6DBE1; border-radius:7px; background:white; color:var(--text-primary); }
.feedback-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:16px 20px; display:flex; flex-direction:column; gap:12px; }
.feedback-context { display:grid; grid-template-columns:1.15fr 1fr 1fr; gap:10px; }
.feedback-context label { display:flex; flex-direction:column; min-width:0; gap:6px; color:var(--text-muted); font-size:11px; }
.feedback-context input, .feedback-context select { width:100%; min-width:0; min-height:38px; padding:7px 8px; border:1px solid #DDE1E6; border-radius:6px; background:#F8FAFB; color:var(--text-primary); font:inherit; font-size:12px; }
.feedback-rating { min-width:0; padding:12px; margin:0; border:1px solid #EEE3BF; border-radius:8px; background:#FFFCF1; text-align:center; }
.feedback-rating legend { float:left; width:100%; padding:0; margin:0 0 8px; font-size:11px; line-height:1.6; color:#75633D; font-weight:500; text-align:center; }
.feedback-stars { clear:both; display:flex; justify-content:center; gap:6px; }
.feedback-stars label { position:relative; display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; cursor:pointer; border-radius:6px; }
.feedback-stars input { position:absolute; width:1px; height:1px; opacity:0; }
.feedback-stars svg { width:28px; height:28px; color:#DED7C2; }
.feedback-stars label.is-selected svg { color:#F7C650; }
.feedback-stars label:hover { background:#F8EECB; }
.feedback-stars label:has(input:focus-visible) { outline:2px solid var(--va-maroon-600); outline-offset:2px; }
.feedback-rating p { color:var(--va-teal-700); font-size:11px; margin:5px 0 0; font-weight:500; }
.feedback-tags-title { display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12px; }
.feedback-tags-title span, .feedback-description > span { color:var(--text-muted); font-size:11px; font-weight:400; }
#feedback-tags { display:grid; gap:15px; }
.feedback-tag-group { min-width:0; border:0; margin:0; padding:0; }
.feedback-tag-group legend { color:var(--text-primary); font-size:12px; font-weight:600; margin-bottom:9px; padding:0; }
.feedback-tag-group > div { display:flex; flex-wrap:wrap; gap:7px; }
.feedback-tag { position:relative; display:inline-flex; cursor:pointer; }
.feedback-tag input { position:absolute; width:1px; height:1px; opacity:0; }
.feedback-tag > span { display:inline-flex; align-items:center; padding:7px 10px; border:1px solid #E0E4E9; border-radius:6px; background:#F8F9FB; color:#5E6874; font-size:11px; line-height:1.5; }
.feedback-tag input:checked + span { background:#E5F5F0; border-color:#8BCDBF; color:var(--va-teal-700); }
.feedback-tag input:focus-visible + span { outline:2px solid var(--va-maroon-600); outline-offset:2px; }
.feedback-description { font-size:12px; font-weight:600; }
.feedback-description textarea { display:block; width:100%; margin-top:8px; min-height:88px; resize:vertical; padding:10px 12px; border:1px solid #CCD2DB; border-radius:7px; font:inherit; font-size:12px; font-weight:400; line-height:1.6; color:var(--text-primary); background:white; }
.feedback-anonymous { display:flex; align-items:center; gap:9px; min-height:44px; padding:12px; border:1px solid #DEE2EA; border-radius:8px; background:#F4F6FA; cursor:pointer; }
.feedback-anonymous input { flex-shrink:0; width:16px; height:16px; margin:0; accent-color:var(--va-teal-600); }
.feedback-anonymous b { display:block; font-size:12px; }
.feedback-anonymous small { display:block; font-size:10px; line-height:1.6; color:var(--text-muted); margin-top:4px; }
.feedback-error:not([hidden]) { padding:10px 12px; color:#991B1B; background:#FFF1F2; border:1px solid #F2CBD1; border-radius:6px; font-size:12px; line-height:1.6; }
.feedback-footer { flex-shrink:0; display:flex; justify-content:flex-end; align-items:center; gap:16px; padding:14px 20px; border-top:1px solid var(--border-color); background:white; }
.feedback-footer > div { display:flex; gap:8px; }
.page-sign-in #login-retry[hidden] { display:none !important; }
.sign-in-box .sso-status, .sign-in-box .sso-ready { margin:12px 0 0; font-size:14px; line-height:1.5; color:#545454; text-align:center; }
.sign-in-box .sso-ready { font-weight:600; color:#1A1A1A; }
.page-sign-in #sso-ready-label[hidden] { display:none !important; }
.page-sign-in #login-retry { min-height:44px; margin-top:12px; font-size:14px; font-weight:600; }
@media (max-width:480px) {
    .page-sign-in { gap:16px; justify-content:flex-start; }
    .sign-in-box { padding:24px 16px; }
    .sso-login h2 { font-size:22px; }
}
.feedback-footer .btn { font-size:12px; min-height:40px; padding:8px 12px; white-space:nowrap; }

.feedback-admin-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; }
.feedback-admin-tags > span { padding:3px 8px; background:#E5F5F0; border-radius:5px; color:var(--va-teal-700); font-size:11px; }
.feedback-admin-images { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
#modal-image-feedback .feedback-image-dialog { max-width:900px; width:100%; padding:0; overflow:hidden; }
.feedback-image-dialog > img { display:block; max-width:100%; max-height:calc(100dvh - 130px); margin:auto; object-fit:contain; }
@media (max-width:360px) {
    .feedback-stars { gap:2px; }
    .feedback-body .feedback-context { grid-template-columns:1fr; }
}
@media (max-width:640px) {
    .cal-auto-top { flex-wrap:wrap; gap:12px; }
    .cal-auto-top > label { flex-basis:100%; }
    .cal-feedback-open { width:100%; }
    .feedback-entry { flex-wrap:wrap; gap:12px; padding:18px; }

    .feedback-entry > .btn { width:100%; }
    .feedback-entry-topics { gap:8px 12px; font-size:11px; }
    #modal-rating-meal, #modal-image-feedback { padding:10px; }
    #modal-rating-meal .feedback-dialog { max-height:calc(100dvh - 20px); }
    .feedback-header { padding:14px; gap:8px; }
    .feedback-header h2 { font-size:14px; }
    .feedback-body { padding:14px; gap:16px; }
    .feedback-context { grid-template-columns:1fr 1fr; }
    .feedback-branch-label { grid-column:1 / -1; }
    .feedback-context input, .feedback-context select, .feedback-description textarea { font-size:16px; }
    .feedback-tag > span { min-height:40px; align-items:center; }
    .feedback-footer { padding:12px 14px; flex-direction:column; align-items:stretch; gap:8px; }
    .feedback-footer > div { display:grid; grid-template-columns:90px minmax(0,1fr); }
    .feedback-footer .btn { min-height:44px; padding:8px; font-size:11px; }
}

/* Lịch đăng ký: thiết lập, hạn chốt và thực đơn trong từng ngày. */
#page-booking .cal-page-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
#page-booking .cal-page-actions .btn { display:inline-flex; align-items:center; gap:7px; min-height:40px; width:auto; padding:0 13px; font-size:12px; }
#page-booking .cal-page-actions .cal-feedback-open { color:var(--va-maroon-600); border-color:#D8B8C4; }
#page-booking .cal-page-actions .cal-feedback-open:hover { background:#FCF1F4; border-color:var(--va-maroon-600); }
#page-booking .cal-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:20px; align-items:stretch; }
#page-booking .cal-cutoff-panel { order:-1; display:flex; flex-direction:column; padding:0; border:1px solid var(--border-color); border-radius:12px; background:white; color:var(--text-primary); min-width:0; overflow:hidden; }
#page-booking .cal-cutoff-main { padding:18px; flex:1; }
#page-booking .cal-cutoff-heading { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
#page-booking .cal-cutoff-label { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border-radius:4px; background:var(--va-maroon-700); color:white; font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:.15px; line-height:1.5; }
#page-booking .cal-cutoff-label svg { width:12px; height:12px; flex-shrink:0; }
#page-booking .cal-cutoff-state { display:inline-flex; align-items:center; gap:4px; color:var(--va-teal-700); background:#E2F5F1; padding:3px 6px; font-size:10px; border-radius:4px; white-space:nowrap; }
#page-booking .cal-cutoff-state::before { content:''; width:5px; height:5px; border-radius:50%; background:var(--va-teal-500); }
#page-booking .cal-cutoff-state[hidden] { display:none; }
#page-booking .cal-cutoff-panel strong { display:block; font-size:22px; line-height:1.4; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:-.3px; }
#page-booking .cal-cutoff-panel p { margin:0; color:var(--text-secondary); font-size:11px; line-height:1.6; }
#page-booking .cal-cutoff-meta { padding:12px 18px; border-top:1px solid #EDF0F3; background:#F8F9FB; display:grid; gap:7px; }
#page-booking .cal-cutoff-meta > div { display:flex; align-items:flex-start; gap:7px; }
#page-booking .cal-cutoff-meta > div:has(> p:empty) { display:none; }
#page-booking .cal-cutoff-meta svg { width:14px; height:14px; flex:0 0 14px; margin-top:2px; color:var(--text-muted); }
#page-booking #cal-cutoff-next:empty { display:none; }
#page-booking #cal-cutoff-next { display:flex; align-items:center; flex-wrap:wrap; gap:5px 7px; }
#page-booking .cal-cutoff-panel .cal-cutoff-period { display:inline-flex; align-items:center; max-width:100%; padding:4px 8px; border:1px solid #C98AA2; border-radius:5px; background:#FCEFF3; color:var(--va-maroon-700); font-size:12px; font-weight:600; line-height:1.5; letter-spacing:0; white-space:nowrap; }
#page-booking .cal-cutoff-countdown { display:flex; flex-direction:column; gap:7px; margin:14px 0 0; }
#page-booking .cal-cutoff-countdown[hidden] { display:none; }
#page-booking .cal-cutoff-countdown > span { color:var(--text-muted); font-size:10px; }
#page-booking .cal-countdown-units { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
#page-booking .cal-countdown-units > span { display:flex; flex-direction:column; align-items:center; gap:4px; padding:10px 4px; border:1px solid #EBDCE1; border-radius:6px; background:#FBEAED; color:var(--va-maroon-700); }
#page-booking .cal-countdown-units b { font-size:30px; line-height:1.2; font-weight:700; font-variant-numeric:tabular-nums; }
#page-booking .cal-countdown-units small { color:var(--text-primary); font-size:11px; }
#page-booking .cal-touch-hint { display:none; }
#page-booking .cal-meal { touch-action:manipulation; }
#page-booking .cal-meal.is-saving { outline:2px solid var(--va-teal-500); outline-offset:2px; }
@media(max-width:767px) { #page-booking .cal-touch-hint { display:block; margin:0 0 12px; color:var(--text-muted); font-size:11px; line-height:1.5; } }
#page-booking .cal-auto-panel { padding:16px 18px; background:white; border:1px solid var(--border-color); border-radius:12px; }
#page-booking .cal-auto-register { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0; min-width:0; min-height:44px; }
#page-booking .cal-auto-register > span:first-child { display:flex; flex-direction:column; gap:3px; min-width:0; font-size:13px; line-height:1.5; }
#page-booking .cal-auto-register small { color:var(--text-muted); font-size:11px; line-height:1.5; font-weight:400; }
#page-booking .cal-auto-heading { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
#page-booking .cal-auto-heading b { color:var(--va-maroon-600); font-size:15px; font-weight:700; }
#page-booking .cal-preference-state { display:inline-flex; padding:1px 7px; background:#E2F5F1; border-radius:4px; color:var(--va-teal-700); font-size:10px; font-weight:600; font-style:normal; white-space:nowrap; }
#page-booking .cal-preference-state.is-off { color:var(--text-muted); background:#F0F1F3; }
#page-booking .cal-auto-options { display:grid; grid-template-columns:1fr; gap:10px; padding-top:12px; margin-top:4px; }
#page-booking .cal-auto-options .cal-auto-register { padding:10px; gap:10px; background:#F8F9FB; border:1px solid #EDF0F3; border-radius:6px; }
#page-booking .cal-auto-options > label + label { padding-left:10px; border-left:1px solid #EDF0F3; }
#page-booking .cal-auto-options .cal-auto-register > .cal-session-content { flex-direction:row; align-items:center; gap:10px; }
#page-booking .cal-session-copy { display:flex; flex-direction:column; gap:3px; }
#page-booking .cal-auto-session { display:flex; align-items:center; flex-wrap:wrap; gap:4px; font-size:12px; }
#page-booking .cal-auto-session b { font-weight:600; }
#page-booking .cal-switch { flex:0 0 40px; width:40px; height:23px; }
#page-booking .cal-switch::after { width:17px; height:17px; }
#page-booking input:checked + .cal-switch { background:var(--va-teal-500); }
#page-booking input:checked + .cal-switch::after { transform:translateX(17px); }
#page-booking .cal-calendar-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; margin-bottom:16px; }
#page-booking .cal-calendar-meta { display:flex; flex-direction:column; align-items:flex-end; justify-self:end; min-width:0; max-width:100%; gap:10px; }
#page-booking .cal-view-controls { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; max-width:100%; }
#page-booking .cal-view-modes,#page-reports .rp-presets { display:flex; flex:0 0 auto; width:fit-content; max-width:100%; gap:0; flex-wrap:nowrap; padding:3px; border:1px solid var(--border-color); border-radius:8px; background:var(--card-bg-alt); }
#page-booking .cal-view-modes button,#page-reports .rp-presets button { min-height:44px; min-width:60px; padding:0 12px; border:0; border-radius:5px; background:transparent; color:var(--text-secondary); font:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:background .15s,color .15s; }
#page-booking .cal-view-modes button[aria-pressed="true"],#page-reports .rp-presets button[aria-pressed="true"] { background:var(--color-primary); color:white; }
#page-booking .cal-view-modes button:focus-visible,#page-reports .rp-presets button:focus-visible,#page-booking .cal-date-picker input:focus-visible { outline:2px solid var(--va-teal-500); outline-offset:2px; }
#page-booking .cal-date-picker { display:flex; align-items:center; gap:8px; max-width:100%; color:var(--text-secondary); font-size:12px; }
#page-booking .cal-date-picker[hidden] { display:none; }
#page-booking .cal-date-picker input { width:150px; min-width:0; min-height:44px; padding:8px; border:1px solid var(--border-color); border-radius:7px; color:var(--text-primary); background:var(--card-bg); font:inherit; }

#page-booking .cal-toolbar-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; width:auto; min-width:0; max-width:100%; order:0; }
#page-booking .cal-toolbar-actions strong { min-width:150px; width:auto; order:0; font-size:18px; font-weight:700; text-align:center; color:var(--va-maroon-600); text-transform:none; font-variant-numeric:tabular-nums; }
#page-booking .cal-month-arrow { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:1px solid #CBD1D8; border-radius:7px; background:white; color:var(--text-primary); font-size:25px; line-height:1; cursor:pointer; }
#page-booking .cal-month-arrow:hover { background:#FCF1F4; border-color:var(--va-maroon-300); }
#page-booking .cal-current-month { min-height:44px; background:transparent; color:var(--text-muted); border:0; padding:8px 4px; font-size:12px; cursor:pointer; }
#page-booking .cal-current-month:hover { color:var(--va-maroon-600); }
#page-booking,#modal-detail-meal {
    --cal-skipped-bg:#FFF0D9; --cal-skipped-ink:#92400E; --cal-skipped-border:#F7B955;
    --cal-eaten-bg:#F3E8FF; --cal-eaten-ink:#6B21A8; --cal-eaten-border:#D8B4FE;
}
#page-booking .cal-legend { display:flex; grid-column:1 / -1; min-width:0; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px 14px; padding:0; font-size:11px; color:var(--text-muted); }
#page-booking .cal-legend > span { min-width:0; max-width:100%; gap:5px; }
#page-booking .cal-legend > span > :is(i,svg,[aria-hidden="true"]) { flex-shrink:0; }
#page-booking .cal-legend i { width:11px; height:11px; border-radius:3px; }
#page-booking .cal-legend .booked { background:#E1F6F1; border-color:#87CEC2; }
#page-booking .cal-legend .skipped { background:var(--cal-skipped-bg); border-color:var(--cal-skipped-border); }
#page-booking .cal-legend .eaten { background:var(--cal-eaten-bg); border-color:var(--cal-eaten-border); }
#page-booking .cal-legend .available { background:white; border-color:#CCD1D7; }
#page-booking .cal-legend .closed { border-style:dashed; background:repeating-linear-gradient(135deg,#F1F2F4,#F1F2F4 2px,white 2px,white 4px); }
#page-booking .cal-legend .locked { background:#EEF4FF; border-color:#B6CCF0; }
#page-booking .cal-legend .weekly-closed { background:white; border:2px solid var(--va-maroon-500); }
#page-booking .cal-frame-calendar-week { min-width:0; overflow-x:auto; padding:2px 2px 6px; }
#page-booking .cal-frame-calendar-week:focus-visible { outline:2px solid var(--va-teal-500); outline-offset:2px; }
#page-booking .cal-weekdays,#page-booking .cal-month-grid { min-width:860px; }
#page-booking .cal-weekdays { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; margin-bottom:10px; font-size:12px; font-weight:600; color:var(--va-maroon-700); }
#page-booking .cal-month-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); grid-auto-rows:1fr; gap:8px; }
#page-booking .cal-day { display:flex; flex-direction:column; padding:8px; border:1px solid #E4E7EB; border-radius:10px; background:white; min-width:0; }
#page-booking .cal-day.is-outside { background:#F3F4F6; border-color:#E7E9ED; }
#page-booking .cal-day.is-outside > header { opacity:.5; }
#page-booking .cal-day.is-outside .cal-meals { visibility:hidden; }
#page-booking .cal-day.is-today { border-color:var(--va-gold-400); box-shadow:0 0 0 1px var(--va-gold-400); }
#page-booking .cal-day > header { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:22px 22px; justify-content:stretch; align-items:center; gap:0; height:44px; flex:0 0 44px; margin-bottom:8px; font-size:16px; }
#page-booking .cal-date-label { display:flex; align-items:center; flex-wrap:nowrap; gap:6px; width:100%; min-width:0; }
#page-booking .cal-date-label > b { flex-shrink:0; line-height:1.25; }
#page-booking .cal-date-label .cal-mobile-weekday { flex-shrink:0; }
#page-booking .cal-day-indicators { display:flex; align-items:center; justify-content:center; width:100%; gap:3px; min-width:0; }
#page-booking .cal-day-lock { display:inline-flex; align-items:center; gap:4px; padding:2px 6px; border:1px solid #B6CCF0; border-radius:5px; background:#EEF4FF; color:#1750B5; font-size:10px; font-weight:500; line-height:1.4; white-space:nowrap; }
#page-booking .cal-day-lock[hidden] { display:none; }
#page-booking .cal-day-lock svg { width:12px; height:12px; flex-shrink:0; }
#page-booking .cal-lunar { background:#CCFFFF; color:#28545A; padding:1px 3px; font-size:9px; border-radius:3px; font-weight:400; white-space:nowrap; min-width:28px; overflow:hidden; text-overflow:ellipsis; }
#page-booking .cal-lunar.is-special { background:#FFCCCC; color:#000000; font-weight:400; }
#page-booking .cal-vegetarian { display:flex; align-items:center; gap:3px; margin-left:auto; flex-shrink:0; white-space:nowrap; border:1px solid #E7DBBD; background:#FCF9F1; color:#665738; border-radius:5px; padding:2px 4px; font-size:9px; font-weight:500; }
#page-booking .cal-mobile-weekday { display:none; }
#page-booking .cal-meals { display:grid; grid-template-rows:repeat(2,96px); gap:6px; margin-top:0; }
#page-booking .cal-meal { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:32px 16px 32px; align-content:center; align-items:stretch; gap:2px; width:100%; height:96px; min-width:0; padding:6px; font-size:11px; text-align:left; border:1px solid #E1E5E9; border-radius:8px; background:#FBFCFD; color:var(--text-muted); cursor:default; transform:none; transition:background-color .15s,border-color .15s; }
#page-booking .cal-meal-head { display:flex; justify-content:space-between; align-items:center; flex-wrap:nowrap; gap:4px; min-width:0; }
#page-booking .cal-meal-label { font-size:11px; font-weight:600; letter-spacing:.25px; text-transform:uppercase; }
#page-booking .cal-meal-state { display:inline-flex; align-items:center; justify-content:center; height:32px; min-height:32px; min-width:60px; max-width:calc(100% - 33px); font-size:10px; margin:0; padding:0; border:0; border-radius:6px; line-height:1.3; font-weight:600; color:#263246; background:transparent; white-space:nowrap; cursor:pointer; flex:0 1 auto; }
#page-booking .cal-state-label { display:block; min-width:60px; width:100%; height:28px; padding:0 6px; border:1px solid #CCD3DB; border-radius:5px; line-height:26px; overflow:hidden; text-overflow:ellipsis; background:#FFFFFF; color:inherit; pointer-events:none; }
#page-booking .cal-meal-state:hover:not(:disabled) .cal-state-label { border-color:var(--va-teal-500); background:#E4F6F2; color:#263246; }
#page-booking .cal-meal.is-booked .cal-meal-state:hover:not(:disabled) .cal-state-label { background:var(--va-teal-700); color:white; border-color:var(--va-teal-700); }
#page-booking .cal-meal.is-eaten .cal-meal-state:hover:not(:disabled) .cal-state-label { background:var(--cal-eaten-bg); color:var(--cal-eaten-ink); border-color:var(--cal-eaten-border); }
#page-booking .cal-meal-state:focus-visible,#page-booking button.cal-menu-line:focus-visible { outline:2px solid var(--va-teal-500); outline-offset:2px; }
#page-booking .cal-meal-state:active:not(:disabled) { transform:translateY(1px); }
#page-booking .cal-menu-line { display:flex; align-items:center; gap:4px; width:100%; height:32px; min-height:32px; min-width:0; padding:0; border:0; border-radius:4px; background:transparent; color:inherit; text-align:left; font-size:12px; line-height:1.5; }
#page-booking button.cal-menu-line { cursor:pointer; }
#page-booking button.cal-menu-line:hover:not(:disabled) { color:var(--va-teal-600); background:rgba(0,144,130,.05); }
#page-booking .cal-menu-text { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0; flex:1; }
#page-booking .cal-menu-arrow { flex:0 0 auto; font-size:15px; line-height:1; color:var(--text-secondary); }
#page-booking .cal-meal.is-booked, #page-booking .cal-meal.is-booked:disabled { background:#E4F6F2; border:1px solid #95D6CB; color:#346C63; }
#page-booking .cal-meal.is-booked .cal-state-label { background:var(--va-teal-600); color:white; border-color:var(--va-teal-600); }
#page-booking .cal-meal:hover:not(:disabled) { background:#F0FAF7; border-color:var(--va-teal-500); }
#page-booking .cal-meal.is-booked:hover:not(:disabled) { background:#D7F1EB; }
#page-booking .cal-meal.is-eaten,#page-booking .cal-meal.is-eaten:hover:not(:disabled) { background:#DDDDDD; border-color:#B8BEC5; color:#59616C; }
#page-booking .cal-meal:disabled { opacity:1; cursor:default; border-style:solid; }
#page-booking .cal-day.is-past-day { background:#FAFBFC; }
#page-booking .cal-day.is-past-day > header { opacity:.6; }
#page-booking .cal-day.is-registration-locked > header { opacity:1; }
#page-booking .cal-meal.is-locked,
#page-booking .cal-meal.is-locked:disabled,
#page-booking .cal-meal.is-locked:hover:not(:disabled),
#page-booking .cal-meal.is-past,
#page-booking .cal-meal.is-past:hover:not(:disabled) { background:#DDDDDD; border-color:#B8BEC5; color:#59616C; opacity:1; filter:none; border-style:solid; }
#page-booking .cal-meal.is-past .cal-state-label { background:#C5C9CE; color:#354151; border-color:#B8BEC5; }
#page-booking .cal-meal[data-state^="bo-an|"] .cal-state-label,
#page-booking .cal-meal[data-state^="bo-an|"] .cal-meal-state:hover:not(:disabled) .cal-state-label { background:var(--cal-skipped-bg); color:var(--cal-skipped-ink); border-color:var(--cal-skipped-border); }
#page-booking .cal-meal.is-eaten .cal-state-label { background:var(--cal-eaten-bg); color:var(--cal-eaten-ink); border-color:var(--cal-eaten-border); }
#page-booking .cal-meal.is-weekly-closed,#page-booking .cal-meal.is-weekly-closed:hover:not(:disabled) { border-color:var(--va-maroon-500); box-shadow:inset 0 0 0 1px var(--va-maroon-500); }
#page-booking .cal-meal.is-closed { background:#FCFCFD; border:1px dashed #E1E5E9; color:var(--text-secondary); }
#page-booking .cal-meal.is-closed .cal-menu-line { font-size:11px; }
#page-booking .cal-meal.is-closed.is-past { background:#DDDDDD; border-color:#B8BEC5; }
#page-booking .cal-menu-warning { font-size:12px; color:var(--va-gold-700); background:var(--va-gold-100); padding:10px 12px; border-radius:8px; margin-bottom:12px; }
#modal-detail-meal { z-index:2001; backdrop-filter:blur(4px); padding:24px; align-items:center; overflow:hidden; }
#modal-detail-meal .cal-detail-dialog { display:flex; flex-direction:column; width:100%; max-width:560px; min-height:0; max-height:100%; padding:0; overflow:hidden; border-radius:16px; }
.cal-detail-body { padding:20px 24px; min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
.cal-detail-tabs{display:flex;flex-shrink:0;padding:0 20px;border-bottom:1px solid var(--border-color);gap:12px}
.cal-detail-tabs button{flex:1;min-width:0;min-height:48px;padding:10px 8px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--text-secondary);font:inherit;font-size:13px;cursor:pointer}
.cal-detail-tabs button[aria-selected=true]{color:var(--text-brand);border-bottom-color:currentColor;font-weight:600}
.cal-detail-tabs button:focus-visible{outline:2px solid var(--color-primary);outline-offset:-4px}
.cal-detail-dialog [hidden]{display:none!important}
.cal-history-timeline{list-style:none;padding:0;margin:0}.cal-history-event{display:grid;grid-template-columns:30px minmax(0,1fr);gap:14px;position:relative;padding:0 0 24px;color:var(--text-primary)}
.cal-history-event:not(:last-child):before{content:'';position:absolute;left:14px;top:32px;bottom:2px;width:2px;background:var(--border-color)}
.cal-history-event:last-child{padding-bottom:0}.cal-history-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--card-bg-alt);color:var(--text-secondary);font-size:18px;font-weight:600}
.cal-history-event:is(.is-registered,.is-automatic) .cal-history-icon{background:var(--color-success-light);color:var(--color-success-text)}
#modal-detail-meal .cal-history-event.is-eaten .cal-history-icon{background:var(--cal-eaten-bg);color:var(--cal-eaten-ink)}
.cal-history-event.is-cancel .cal-history-icon{background:var(--color-primary-tint);color:var(--text-brand)}
.cal-history-event.is-transfer .cal-history-icon{background:var(--info-bg,#eaf2ff);color:var(--text-info,#1750b5)}
.cal-history-event h3{margin:2px 0 5px;font-size:14px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}.cal-history-event time,.cal-history-event p,.cal-history-event small{font-size:12px;line-height:1.65;color:var(--text-secondary);overflow-wrap:anywhere}.cal-history-event p{margin:5px 0 0;white-space:pre-wrap}.cal-history-event small{display:block;margin-top:5px;font-size:11px}
.cal-history-deadline{flex-shrink:0;border-top:1px solid var(--border-color);padding:12px 24px;margin:0;color:var(--text-secondary);font-size:12px;line-height:1.6;background:var(--card-bg-alt)}
.cal-history-message,.cal-history-legacy{font-size:12px;line-height:1.7;color:var(--text-secondary);padding:10px 0}.cal-history-message .btn{min-height:44px;margin-top:10px}.cal-history-message.is-error{color:var(--color-error-text)}.cal-history-legacy{margin:0 0 18px;border-bottom:1px solid var(--border-color);padding:0 0 12px}
.cal-cancel-reason{margin-top:14px;font-size:12px;color:var(--text-secondary)}.cal-cancel-reason summary{cursor:pointer;min-height:44px;display:flex;align-items:center;text-decoration:underline;text-underline-offset:3px}.cal-cancel-reason label{display:grid;gap:8px}.cal-cancel-reason textarea{width:100%;min-height:70px;max-height:160px;resize:vertical;font:inherit;padding:10px;border:1px solid var(--border-color);border-radius:6px;background:var(--card-bg);color:var(--text-primary)}
@media(max-width:480px){.cal-detail-tabs{padding:0 12px;gap:6px}.cal-detail-tabs button{font-size:12px}.cal-history-event{gap:10px}.cal-history-deadline{padding:10px 16px}}
.cal-detail-header { display:flex; align-items:center; gap:12px; padding:24px 24px 16px; margin:0; flex-shrink:0; border-bottom:1px solid #E5E7EB; }
.cal-detail-header > div { min-width:0; flex:1; }
.cal-detail-header h2 { color:var(--va-maroon-700); font-size:16px; font-weight:700; line-height:1.5; overflow-wrap:anywhere; }
.cal-detail-header p { margin-top:4px; color:var(--text-muted); font-size:12px; line-height:1.5; }
.cal-detail-header .modal-close { border:1px solid #D6DBE1; border-radius:8px; color:var(--text-primary); background:white; }
.cal-detail-feature { display:flex; align-items:flex-start; gap:14px; padding:16px; background:#FCF3F6; border:1px solid #E9CDD7; border-radius:9px; }
.cal-detail-feature > div { min-width:0; }
.cal-detail-eyebrow { display:block; margin-bottom:5px; color:var(--va-maroon-700); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.2px; }
.cal-detail-feature h3 { color:var(--va-maroon-700); font-size:18px; line-height:1.4; font-weight:700; overflow-wrap:anywhere; }
.cal-detail-feature p, .cal-detail-other p { color:var(--text-muted); font-size:12px; line-height:1.6; margin-top:5px; white-space:pre-line; overflow-wrap:anywhere; }
.cal-detail-other { padding:14px 16px; margin-top:12px; background:#F8F9FB; border:1px solid #E6E9EE; border-radius:8px; }
.cal-detail-other > h3 { color:var(--text-muted); font-size:11px; font-weight:600; margin-bottom:10px; }
.cal-detail-other ul { list-style:none; padding:0; margin:0; display:grid; gap:12px; }
.cal-detail-other li { display:flex; align-items:flex-start; gap:9px; }
.cal-detail-other li > div { min-width:0; }
.cal-detail-other h4 { color:var(--text-primary); font-size:13px; line-height:1.5; font-weight:600; overflow-wrap:anywhere; }
.cal-detail-info { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:16px 0 0; }
.cal-detail-info > div { padding:10px 8px; border:1px solid #E4E7EB; border-radius:5px; text-align:center; }
.cal-detail-info dt { color:var(--text-muted); font-size:10px; line-height:1.5; margin-bottom:4px; }
.cal-detail-info dd { color:var(--va-maroon-700); font-size:12px; line-height:1.5; font-weight:600; margin:0; overflow-wrap:anywhere; }
.cal-detail-note { margin:14px 0; color:var(--text-muted); font-size:12px; line-height:1.6; }
.cal-detail-error { padding:10px 12px; margin:12px 0; color:#991B1B; background:#FFF1F2; border:1px solid #F2CBD1; border-radius:6px; font-size:12px; line-height:1.6; }
.cal-detail-empty { padding:20px 16px; color:var(--text-muted); font-size:13px; line-height:1.6; background:#F8F9FB; border-radius:8px; }
.cal-qr-result { padding:16px; margin-bottom:16px; border:1px solid #9BD5CB; border-radius:9px; color:#006C60; background:#EFFAF7; overflow-wrap:anywhere; }
.cal-qr-result[hidden] { display:none; }
.cal-qr-result.is-failure { border-color:#F2CBD1; color:#991B1B; background:#FFF1F2; }
.cal-qr-result strong { display:block; font-size:17px; line-height:1.5; }
.cal-qr-result p { margin:6px 0 0; font-size:13px; line-height:1.6; }
.cal-qr-result .cal-qr-result-context { font-weight:600; }
.cal-detail-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:16px 24px; flex-shrink:0; background:var(--card-bg-alt); border-top:1px solid var(--border-color); }
.cal-detail-footer > p { flex:1; color:var(--va-teal-700); font-size:12px; font-weight:600; line-height:1.6; }
#modal-detail-meal #cal-detail-status[data-state="bo-an"] { color:var(--cal-skipped-ink); }
#modal-detail-meal #cal-detail-status[data-state="da-an"] { color:var(--cal-eaten-ink); }
.cal-detail-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:stretch; gap:8px; min-width:0; margin-left:auto; }
.cal-detail-actions .btn { min-width:0; min-height:44px; height:auto; max-width:100%; padding:10px 16px; font-size:14px; line-height:1.5; white-space:normal; overflow-wrap:anywhere; border-width:1px; font-weight:600; }
.cal-detail-actions .cal-detail-close { min-width:96px; }
#modal-detail-meal [hidden] { display:none!important; }
.cal-detail-actions .cal-detail-cancel:not(:disabled) { border-color:#AA4C6D; color:var(--va-maroon-600); }
.cal-detail-actions .cal-detail-cancel:hover:not(:disabled) { background:#FCF1F4; }
@media (max-width:640px) {
    #modal-detail-meal { padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
    #modal-detail-meal .cal-detail-dialog { padding:0; max-height:100%; }
    .cal-detail-header { gap:8px; padding:18px 16px 14px; }
    .cal-detail-body { padding:16px; }
    .cal-detail-footer { padding:14px 16px; }
    .cal-detail-actions { width:100%; }
    .cal-detail-actions .btn { flex:1 1 calc(50% - 4px); }
    .cal-detail-actions .cal-detail-close { flex-basis:100%; }
    .cal-detail-header h2 { font-size:16px; }
    .cal-detail-feature { padding:14px; gap:10px; }
    .cal-detail-info { grid-template-columns:1fr; }
    .cal-detail-info > div { display:flex; justify-content:space-between; align-items:center; text-align:left; gap:12px; padding:8px 10px; }
    .cal-detail-info dt { margin:0; }
    .cal-detail-info dd { text-align:right; }
    .cal-detail-footer { align-items:stretch; flex-direction:column; gap:10px; }
    .cal-detail-actions .btn { min-height:44px; width:100%; }
}
@media (max-width:1199px) and (min-width:641px) {
    #page-booking .cal-settings-grid { grid-template-columns:1fr; }
    #page-booking .cal-calendar-toolbar { grid-template-columns:minmax(0,1fr); }
    #page-booking .cal-calendar-meta { width:100%; justify-self:start; align-items:flex-start; }
    #page-booking .cal-view-controls,#page-booking .cal-legend { justify-content:flex-start; }
    #page-booking .cal-weekdays, #page-booking .cal-month-grid { min-width:860px; }
}
@media(max-height:480px){
 #modal-detail-meal{padding:8px}
 #modal-detail-meal .cal-detail-header{padding:10px 16px;gap:10px}
 #modal-detail-meal .cal-detail-tabs{padding:0 12px}
 #modal-detail-meal .cal-detail-tabs button{min-height:44px;padding:6px}
 #modal-detail-meal .cal-detail-body{padding:12px 16px}
 #modal-detail-meal .cal-history-deadline{padding:7px 16px}
 #modal-detail-meal .cal-detail-footer{padding:8px 16px;gap:6px}
}
@media (max-width:640px) {
    #page-booking .cal-settings-grid { grid-template-columns:1fr; gap:12px; margin-bottom:18px; }
    #page-booking .cal-auto-panel { padding:16px; }
    #page-booking .cal-page-actions { justify-content:flex-start; }
    #page-booking .cal-page-actions .btn { min-height:44px; }
    #page-booking .cal-cutoff-panel { padding:0; }
    #page-booking .cal-cutoff-main { padding:16px; }
    #page-booking .cal-cutoff-meta { padding:12px 16px; }
    #page-booking .cal-cutoff-panel strong { font-size:19px; }
    #page-booking .cal-auto-heading b { font-size:14px; }
    #page-booking .cal-auto-options { grid-template-columns:1fr; gap:10px; padding-top:12px; margin-top:12px; }
    #page-booking .cal-auto-options .cal-auto-register { padding:10px; }
    #page-booking .cal-auto-options > label + label { padding:10px; border:1px solid #EDF0F3; }
    #page-booking .cal-auto-session { font-size:13px; }
    #page-booking .cal-calendar-toolbar { grid-template-columns:minmax(0,1fr); gap:12px; }
    #page-booking .cal-calendar-meta { align-items:flex-start; justify-self:start; width:100%; }
    #page-booking .cal-toolbar-actions { width:100%; flex-wrap:nowrap; justify-content:space-between; gap:6px; }
    #page-booking .cal-toolbar-actions strong { min-width:0; font-size:17px; }
    #page-booking .cal-current-month { font-size:11px; }
    #page-booking .cal-legend { justify-content:flex-start; gap:8px 12px; font-size:10px; }
    #page-booking .cal-weekdays { display:none; }
    #page-booking .cal-month-grid { grid-template-columns:1fr; grid-auto-rows:1fr; min-width:0; gap:12px; }
    #page-booking .cal-day { padding:12px; }
    #page-booking .cal-day.is-outside { display:none; }
    #page-booking .cal-day > header { margin-bottom:8px; font-size:17px; }
    #page-booking .cal-mobile-weekday { display:inline; font-size:12px; font-weight:500; color:var(--text-muted); }
    #page-booking .cal-lunar { font-size:10px; }
    #page-booking .cal-meals { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:96px; gap:8px; }
    #page-booking .cal-meal-label { font-size:11px; }
    #page-booking .cal-menu-line { font-size:12px; }
}
/* Account popover: readable account details and reachable actions in both themes. */
.user-pill-topbar { min-width:44px; min-height:44px; }
.user-dropdown-menu { width:340px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 96px); overflow-y:auto; overscroll-behavior:contain; padding:0; border:1px solid var(--border-color); border-radius:14px; background:var(--card-bg); color:var(--text-primary); box-shadow:0 16px 40px -10px rgba(16,28,46,.22); }
.dropdown-user-header { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:12px; padding:20px; margin:0; border-bottom:1px solid var(--border-color); align-items:center; }
.dropdown-user-avatar-wrapper .va-avatar-initials { border:0; border-radius:14px; box-shadow:none; padding:0; }
.dropdown-user-name { color:var(--text-primary); font-size:15px; font-weight:600; line-height:1.5; white-space:normal; overflow-wrap:anywhere; text-wrap:pretty; }
.dropdown-role-badge { color:var(--text-brand,var(--color-primary)); border:1px solid var(--color-primary-border); background:var(--color-primary-tint); border-radius:6px; font-size:11px; font-weight:500; line-height:1.5; padding:3px 7px; margin-top:5px; }
.dropdown-close { display:grid; place-items:center; width:44px; height:44px; align-self:start; padding:0; border:0; border-radius:9px; background:transparent; color:var(--text-secondary); cursor:pointer; }
.dropdown-close:hover { background:var(--hover-bg); color:var(--text-primary); }
.dropdown-user-info-rows { display:grid; gap:16px; margin:0; padding:20px; border:0; border-radius:0; background:var(--card-bg); color:var(--text-primary); line-height:1.6; }
.dropdown-user-info-rows>div { min-width:0; }
.dropdown-user-info-rows dt { margin:0 0 3px; color:var(--text-secondary); font-size:12px; font-weight:400; }
.dropdown-user-info-rows dd { margin:0; color:var(--text-primary); font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.user-dropdown-menu .dropdown-actions { padding:12px; gap:8px; border-top:1px solid var(--border-color); background:var(--card-bg-alt); }
.user-dropdown-menu .dropdown-btn { min-height:44px; padding:11px 12px; border-radius:8px; font-size:12px; font-weight:500; line-height:1.6; color:var(--text-primary); }

.user-dropdown-menu .dropdown-btn.sign-out { margin:0; color:var(--color-error-text); background:var(--color-error-light); border:1px solid var(--color-error-border); }
.user-dropdown-menu .dropdown-btn.sign-out:hover { border-color:var(--color-error-text); }
@media (max-width:767px) {
    .user-dropdown-menu { position:fixed; top:72px; right:16px; max-height:calc(100dvh - 88px - var(--tab-bar-height,72px) - env(safe-area-inset-bottom,0px)); }
    .dropdown-user-header { padding:16px; gap:10px; }
    .dropdown-user-info-rows { padding:16px; }
}
/* Keep every header action reachable at the narrowest phone widths. */
@media (max-width:374px) {
    .top-bar { padding-inline:4px; gap:0; }
    .top-bar-right { gap:0; }
    .top-bar .va-lang { flex-basis:46px; width:46px; }
}
@media (prefers-reduced-motion:reduce) { .user-dropdown-menu { animation:none; } }

/* Registration views share the same meal renderer and business rules. */
#page-booking [data-view="tuan"] :is(.cal-weekdays,.cal-month-grid) { grid-template-columns:repeat(7,minmax(0,1fr)); min-width:1000px; }
#page-booking [data-view="thang"][data-sunday] :is(.cal-weekdays,.cal-month-grid) { grid-template-columns:repeat(7,minmax(0,1fr)); min-width:1000px; }
#page-booking [data-view="ngay"] .cal-month-grid { grid-template-columns:minmax(0,1fr); min-width:0; max-width:740px; margin-inline:auto; }
#page-booking [data-view="ngay"] .cal-meals { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:96px; }
#page-booking [data-view="ngay"] .cal-mobile-weekday { display:inline; font-size:12px; font-weight:500; color:var(--text-muted); }
#page-booking [data-view="ngay"] :is(.cal-meal-label,.cal-meal-state,.cal-menu-line) { font-size:13px; }
@media(max-width:767px) {
    #page-booking .cal-calendar-toolbar { grid-template-columns:minmax(0,1fr); }
    #page-booking .cal-view-controls { justify-content:flex-start; width:100%; gap:8px; }
    #page-booking .cal-calendar-meta { width:100%; align-items:flex-start; }
    #page-booking .cal-toolbar-actions { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; width:100%; gap:6px; }
    #page-booking .cal-toolbar-actions strong { min-width:0; font-size:15px; line-height:1.5; }
    #page-booking .cal-current-month { grid-column:1/-1; justify-self:center; padding:0 10px; }
    #page-booking [data-view="tuan"] .cal-weekdays { display:none; }
    #page-booking [data-view="tuan"] .cal-month-grid { grid-template-columns:minmax(0,1fr); min-width:0; }
    #page-booking [data-view="tuan"] .cal-mobile-weekday { display:inline; font-size:12px; color:var(--text-muted); }
    #page-booking [data-view="tuan"] .cal-meals { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:96px; }
}
@media(max-width:480px) {
    #page-booking [data-view="ngay"] .cal-meals { grid-template-columns:minmax(0,1fr); grid-template-rows:repeat(2,96px); }
}

/* Compact visuals retain larger hit areas on phones and touch devices. */
@media(max-width:767px), (pointer:coarse) {
    #page-booking .cal-meals { grid-template-rows:repeat(2,112px); }
    #page-booking .cal-meal { height:112px; padding:2px 6px; grid-template-rows:44px 16px 44px; }
    #page-booking .cal-meal-state, #page-booking .cal-menu-line { height:44px; min-height:44px; }
    #page-booking [data-view="ngay"] .cal-meals { grid-template-rows:112px; }
}
@media(max-width:767px) {
    #page-booking .cal-meals, #page-booking [data-view="tuan"] .cal-meals { grid-template-rows:112px; }
}
@media(max-width:480px) {
    #page-booking [data-view="ngay"] .cal-meals { grid-template-rows:repeat(2,112px); }
}

#page-booking .cal-branch { display:block; grid-row:2; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; line-height:16px; font-weight:500; color:inherit; }
#page-booking .cal-meal-head { grid-row:1; }
#page-booking .cal-menu-line { grid-row:3; }

/* Registration retains its ring; other forms highlight their existing border. */
#page-booking .group-input :is(input:not([type=checkbox]):not([type=radio]),select,textarea):is(:focus,:focus-visible){outline:none!important;border-color:var(--border-focus,var(--color-primary));box-shadow:0 0 0 2px color-mix(in srgb,var(--border-focus,var(--color-primary)) 22%,transparent)}
:where(.page-content:not(#page-booking),.modal-overlay,.rp-pdf-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=button]):not([type=submit]),select,textarea):focus-visible:where(:not(.va-search *)){outline:2px solid var(--text-brand,var(--color-primary))!important;outline-offset:2px;box-shadow:none!important}
@media (max-width:767px){
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px}
 button,[role=button]{min-height:24px}
}

/* Adapt to the available workspace, including an expanded/collapsed sidebar. */
@container va-page (min-width:1400px) {
    .grid-stats,.grid-2-column { gap:var(--va-wide-gap); }
    .frame-chart { height:clamp(260px,18cqi,360px); }
    .stat-card .tabular-value { font-size:clamp(30px,2cqi,36px); }
}

/* ===== KẾT THÚC: va-design-system.css ===== */

/* D-144: personal "booked but not collected" reminder on the overview page. */
.dashboard-missed { margin: 0 0 24px; border: 1px solid #dec89a; border-radius: 12px; background: #f6efe3; color: #765e34; }
.dashboard-missed summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; font-weight: 600; cursor: pointer; list-style: none; }
.dashboard-missed summary::-webkit-details-marker { display: none; }
.dashboard-missed summary::before { content: "⚠"; }
.dashboard-missed summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.dashboard-missed[open] summary::after { transform: rotate(180deg); }
.dashboard-missed-body { display: grid; gap: 8px; padding: 0 16px 12px; color: var(--text-primary, #4b5563); }
.dashboard-missed-body ul { display: grid; gap: 4px; margin: 0; padding-left: 20px; }
:root[data-va-theme="dark"] .dashboard-missed { border-color: #7f6a3f; background: #3d3424; color: #f1ce87; }

/* module-data-scope-map §1.4: shared region → campus filter; one campus shows its name, one region hides the region select. */
.org-region-filter[hidden], .org-report-region[hidden], select.va-scope-collapsed { display: none; }
.va-scope-single { display: block; min-height: 40px; padding: 9px 0; color: var(--text-primary); font-size: 14px; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
.va-scope-single[hidden] { display: none; }

/* D-207: personal overview (#page-dashboard). Colours from the shell tokens; dark mode below. */
#page-dashboard { --ov-brand: #A50034; --ov-green: #0F766E; --ov-amber: #A15C07; --ov-blue: #1D4ED8; --ov-missed: #B42318; }
#page-dashboard .ov-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
#page-dashboard .ov-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#page-dashboard .ov-status { margin: 16px 0; color: var(--text-secondary); font-size: 14px; }
#page-dashboard .ov-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 16px 0 24px; }
#page-dashboard .ov-metric { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-top: 3px solid currentColor; border-radius: 12px; }
#page-dashboard .ov-metric span { color: var(--text-secondary); font-size: 14px; font-weight: 600; }
#page-dashboard .ov-metric strong { color: var(--text-primary); font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
#page-dashboard .ov-metric small { color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
#page-dashboard .ov-brand { color: var(--ov-brand); } #page-dashboard .ov-green { color: var(--ov-green); }
#page-dashboard .ov-amber { color: var(--ov-amber); } #page-dashboard .ov-blue { color: var(--ov-blue); }
#page-dashboard .ov-panel { margin-bottom: 24px; padding: 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; min-width: 0; }
#page-dashboard .ov-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
#page-dashboard .ov-title { margin: 0 0 12px; color: var(--text-primary); font-size: 18px; font-weight: 700; }
#page-dashboard .ov-panel-head .ov-title { margin: 0; }
#page-dashboard .ov-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
#page-dashboard .ov-meal { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--border-color); border-radius: 12px; min-width: 0; }
#page-dashboard .ov-meal header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
#page-dashboard .ov-meal h3 { margin: 0; color: var(--text-primary); font-size: 16px; }
#page-dashboard .ov-meal-meta, #page-dashboard .ov-empty, #page-dashboard .ov-feedback p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
#page-dashboard .ov-dishes { margin: 0; padding-left: 20px; color: var(--text-primary); font-size: 14px; line-height: 1.6; }
#page-dashboard .ov-meal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
#page-dashboard .ov-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 14px; line-height: 1.4; white-space: nowrap; }
#page-dashboard .ov-chip b { font-weight: 600; }
#page-dashboard .ov-chip-attended { color: var(--ov-green); } #page-dashboard .ov-chip-registered { color: var(--ov-blue); }
#page-dashboard .ov-chip-missed { color: var(--ov-missed); } #page-dashboard .ov-chip-open { color: var(--ov-brand); }
#page-dashboard .ov-chip-off { color: var(--text-secondary); }
#page-dashboard .ov-week { display: flex; flex-direction: column; gap: 8px; }
#page-dashboard .ov-day { display: grid; grid-template-columns: minmax(150px, 200px) 1fr; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; }
#page-dashboard .ov-day-today { outline: 2px solid var(--ov-brand); outline-offset: -2px; }
#page-dashboard .ov-day-name { color: var(--text-primary); font-size: 14px; font-weight: 600; }
#page-dashboard .ov-day-meals { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
#page-dashboard .ov-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#page-dashboard .ov-columns .ov-panel { margin-bottom: 24px; }
#page-dashboard .ov-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
#page-dashboard .ov-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--text-primary); font-size: 14px; }
#page-dashboard .ov-list li span { color: var(--text-secondary); }
#page-dashboard .ov-missed-count { margin: 0 0 8px; color: var(--text-primary); font-size: 14px; font-weight: 600; }
#page-dashboard .ov-missed-count.ov-warning { color: var(--ov-missed); }
#page-dashboard .ov-feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
#page-dashboard .ov-feedback .ov-title { margin-bottom: 4px; }
#page-dashboard [hidden] { display: none; }
@media (max-width: 1023px) { #page-dashboard .ov-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } #page-dashboard .ov-columns { grid-template-columns: 1fr; } }
@media (max-width: 599px) {
    #page-dashboard .ov-metrics { grid-template-columns: 1fr; gap: 12px; }
    #page-dashboard .ov-actions, #page-dashboard .ov-actions .btn { width: 100%; }
    #page-dashboard .ov-day { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
    #page-dashboard .ov-chip { white-space: normal; }
}
:root[data-va-theme="dark"] #page-dashboard { --ov-brand: #FFAAC8; --ov-green: #7EE0CD; --ov-amber: #F1CE87; --ov-blue: #A8CBFF; --ov-missed: #FFB4AB; }

/* 20/11: shared pager (ui-kit.js vaPager*, Components/Shared/VaPager.vue) for every paged list. */
.va-pager { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 12px; }
.va-pager:empty { display:none; }
.va-pager__count { font-size:13px; color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.va-pager__pages { display:inline-flex; align-items:center; gap:4px; margin-left:auto; }
.va-pager__gap { min-width:20px; text-align:center; color:var(--text-secondary); }
.va-pager .va-pager__pages button.va-pager__btn, #content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn { display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; min-height:36px; padding:0 8px; border:1px solid var(--border-color); border-radius:8px; background:var(--card-bg); color:var(--text-primary); font:inherit; font-size:13px; font-weight:600; line-height:1; cursor:pointer; font-variant-numeric:tabular-nums; }
#content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn:hover:not(:disabled):not([aria-current]) { background:var(--hover-bg); }
#content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn:disabled { opacity:.45; cursor:default; }
#content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn[aria-current=page] { background:var(--va-maroon-600,#9A0036); border-color:var(--va-maroon-600,#9A0036); color:#fff; cursor:default; }
#content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn:focus-visible { outline:2px solid var(--va-maroon-600,#9A0036); outline-offset:2px; }
@media (max-width:767px), (pointer:coarse) {
  #content-main :is(nav,div,footer).va-pager .va-pager__pages button.va-pager__btn { min-width:44px; height:44px; min-height:44px; }
  .va-pager__count { flex-basis:100%; }
}
/* Page-level pager rules must not shift the shared parts. */
#content-main :is(nav,div,footer).va-pager > .va-pager__count { margin:0; font-size:13px; color:var(--text-secondary); }
#content-main :is(nav,div,footer).va-pager > .va-pager__pages { margin:0 0 0 auto; }
