/* =====================================================================================================================
   [MỚI 30/10/2026 - theo yêu cầu anh Tân] Chấm công GPS - giao diện mới ĐỒNG BỘ với app QLTS (nạp CUỐI CÙNG, sau
   site.css/GpsAttendance.styles.css; KHÔNG sửa các file đó). Port gần như nguyên vẹn từ wwwroot/css/qlts-ui.css của
   QLTS (cùng dòng Bootstrap 5 + class .app-card/.app-header/.app-sidebar/.app-nav-link/.page-heading/.app-btn-* vốn đã
   dùng chung từ site.css - xem ghi chú trong gps-login.css "bản copy nguyên từ Overtime để đồng bộ giao diện chung").
   Phối màu: XANH DƯƠNG (chủ đạo) → CAM (điểm nhấn) → VÀNG (nhãn/cảnh báo nhẹ) → TRẮNG (nền thẻ, chữ trên nền xanh).
   Mọi quy tắc đặt dưới `body.ui` để thắng các lớp cũ mà không cần !important (trừ .badge vì Bootstrap dùng !important).
   Nguyên tắc: nút/ô nhập cùng chiều cao theo cỡ (md 40px · sm 34px), chữ Inter, nội dung full chiều rộng màn hình PC,
   xếp dọc/đủ chạm trên điện thoại.

   [PHẠM VI] Khung trang (header/sidebar/content/footer), thẻ/nút/ô nhập/bảng/badge/alert/tab/phân trang/modal và
   toàn bộ hệ thống responsive (PC rộng/tablet/điện thoại, bảng tự "xếp thẻ" trên điện thoại - xem gps-ui.js) áp dụng
   cho MỌI view, KỂ CẢ các màn hình dành cho NV hiện trường (Chấm công/Lịch sử/Kế hoạch làm việc/In Biểu mẫu/Hướng
   dẫn sử dụng).
   [SỬA 30/10/2026 - anh Tân báo các màn này "chưa giống style tổng thể, chưa full trang ở PC"] TRƯỚC ĐÂY cố ý loại
   trừ khung "thẻ LED cam" .gps-form-card/.gps-form-page (coi là nhận diện riêng của GPS, giống .login-gps-badge ở
   trang đăng nhập) - NAY ĐỔI LẠI theo đúng phản hồi: .gps-form-card đổi sang đúng tông .app-card (nền trắng/viền
   nhạt/bóng mờ, bỏ viền LED cam phát sáng) và .gps-form-page bỏ giới hạn 640px căn giữa cũ (site.css) để dùng được
   nhiều chiều rộng màn hình PC hơn - xem khối "TRANG GPS-FORM-PAGE/GPS-FORM-CARD" bên dưới. CHỈ gps-login.css (trang
   Đăng nhập) là còn giữ nguyên LED xanh/GPS badge riêng - đó vẫn là quyết định có chủ đích (xem ADR-0001 mục 138),
   không đổi theo phản hồi lần này vì anh Tân chỉ nhắc tới 5 màn hình NV hiện trường, không nhắc trang Đăng nhập.
   ===================================================================================================================== */

:root {
    --ui-blue-950: #082a66;
    --ui-blue-900: #0a3a8c;
    --ui-blue-700: #0b57d0;
    --ui-blue-600: #1a6cf0;
    --ui-blue-100: #dbe8ff;
    --ui-blue-50: #eef4ff;
    --ui-orange: #f97316;
    --ui-orange-600: #ea580c;
    --ui-orange-50: #fff3e6;
    --ui-yellow: #ffc928;
    --ui-yellow-50: #fff8dc;
    --ui-white: #ffffff;
    --ui-bg: #f4f6fb;
    --ui-surface: #ffffff;
    --ui-border: #e3e8f1;
    --ui-border-strong: #cfd8e6;
    --ui-text: #101828;
    --ui-text-2: #344054;
    --ui-muted: #667085;
    --ui-success: #067647;
    --ui-danger: #b42318;
    --ui-radius: 14px;
    --ui-radius-sm: 10px;
    --ui-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --ui-shadow-md: 0 6px 18px rgba(16, 40, 90, .10);
    --ui-header-h: 60px;
    --ui-sidebar-w: 264px;
    /* Nền menu trái: sọc dọc + ánh sáng xanh/cam trên nền xanh */
    --ui-sidebar-bg:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .10) 0 2px, rgba(0, 0, 0, .06) 2px 4px, rgba(255, 255, 255, .025) 4px 18px),
        linear-gradient(110deg, rgba(255, 151, 41, .20), rgba(255, 151, 41, 0) 62%) left bottom / 130% 42% no-repeat,
        linear-gradient(110deg, rgba(63, 176, 255, .28), rgba(63, 176, 255, 0) 58%) left bottom / 130% 42% no-repeat,
        radial-gradient(120% 70% at 10% -10%, rgba(110, 182, 255, .28), transparent 55%),
        radial-gradient(90% 60% at 100% 110%, rgba(255, 145, 32, .22), transparent 58%),
        linear-gradient(180deg, #0a4ea7 0%, #0b63bc 52%, #0a55af 100%);
    --ui-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

    /* đồng bộ biến cũ của site.css (--app-*) để các luật cũ dùng var(--app-*) cũng đổi màu theo */
    --app-primary: var(--ui-blue-700);
    --app-primary-dark: var(--ui-blue-900);
    --app-primary-light: var(--ui-blue-50);
    --app-blue: var(--ui-blue-700);
    --app-blue-2: var(--ui-blue-600);
    --app-orange: var(--ui-orange);
    --app-yellow: var(--ui-yellow);
    --app-bg: var(--ui-bg);
    --app-text: var(--ui-text);
    --app-muted: var(--ui-muted);
    --app-border: var(--ui-border);
}

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

/* Trang đăng nhập (_AuthLayout, body "login-page ui") GIỮ NGUYÊN nền gradient + khung
   .login-card LED xanh/GPS-badge riêng của nó (gps-login.css) - chỉ hưởng phần chữ Inter
   và các luật nút/ô nhập/alert chung dưới đây, không bị nền/màu chữ mặc định ở đây đè lên
   (body.ui color/background có độ ưu tiên CAO hơn .login-page vì nhiều hơn 1 thành phần
   chọn - xem specificity - nên phải loại trừ rõ bằng :not(.login-page)). */
body.ui:not(.login-page) {
    background: var(--ui-bg);
    color: var(--ui-text);
}

body.ui {
    font-family: var(--ui-font);
    line-height: 1.5;
    letter-spacing: -.003em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.ui button, body.ui input, body.ui select, body.ui textarea, body.ui .btn, body.ui .form-control, body.ui .form-select { font-family: var(--ui-font); }

body.ui h1, body.ui h2, body.ui h3, body.ui h4, body.ui h5, body.ui h6 { font-family: var(--ui-font); color: var(--ui-text); letter-spacing: -.012em; }
body.ui a { color: var(--ui-blue-700); }
body.ui a:hover { color: var(--ui-blue-900); }
body.ui ::selection { background: var(--ui-yellow); color: var(--ui-blue-950); }
body.ui :focus-visible { outline: 3px solid rgba(26, 108, 240, .45); outline-offset: 2px; }

/* ===================================================== HEADER ===================================================== */
/* [SỬA 31/10/2026 - anh Tân gửi ảnh biển hiệu + ảnh trong cửa hàng] Đổi nền header từ cam sang
   XANH DƯƠNG đúng tông biển hiệu thật của cửa hàng co.op smile (biển hiệu nền xanh, chữ trắng) -
   trước đây mượn tông cam/vàng của QLTS, giờ đổi hẳn sang xanh cho đúng thương hiệu GPS. */
body.ui .app-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    height: var(--ui-header-h);
    overflow: visible;
    /* [SỬA 31/10/2026 - anh Tân yêu cầu "như có đèn LED/đèn cao áp đang rọi vào lúc ban đêm"] nền
       đậm hơn 1 chút (blue-700 -> blue-900, thay vì blue-600 -> blue-700) để giống biển hiệu BAN
       ĐÊM (nền tối hơn) - làm nền cho mấy quầng sáng đèn rọi ở .app-header::before bên dưới nổi
       bật rõ, nếu nền vẫn sáng như cũ thì quầng sáng trắng sẽ "chìm" không thấy khác biệt. */
    background: linear-gradient(180deg, var(--ui-blue-700) 0%, var(--ui-blue-900) 100%);
    border-bottom: 0;
    box-shadow: 0 6px 18px rgba(16, 40, 90, .22);
}

/* [MỚI 31/10/2026 - anh Tân yêu cầu header "như có các đèn LED/đèn soi cao áp đang rọi vào lúc
   ban đêm"] Mô phỏng ánh đèn pha rọi từ trên xuống: mỗi "đèn" gồm 2 lớp radial-gradient chồng
   nhau - 1 chấm sáng NHỎ/ĐẬM ngay sát mép trên (bóng đèn) + 1 quầng sáng LỚN/MỜ lan toả xuống
   (vùng ánh sáng chiếu tới). 3 đèn đặt rải đều (trái/giữa/phải) - đèn giữa ngả vàng ấm (đúng tông
   đèn cao áp Sodium thật), 2 đèn 2 bên trắng lạnh (đúng tông đèn LED) cho khác biệt, giống dàn
   đèn chiếu sáng biển hiệu thật không chỉ 1 loại đèn. `mix-blend-mode: screen` để ánh sáng CỘNG
   vào nền xanh (giống ánh sáng thật chiếu lên bề mặt) thay vì che phủ/làm đục màu nền. Nhấp nháy
   rất nhẹ, không đều nhịp (nhiều mốc lệch nhau trong 1 vòng lặp) để giống ánh đèn LED/cao áp
   thật hơi "rung" sáng chứ không phải 1 khối sáng tĩnh. [SỬA] ban đầu định tách 2 animation lệch
   pha cho 2 nhóm đèn (giữa/2 bên) - PHÁT HIỆN LỖI: cả 2 animation cùng đổi `opacity` của CHÍNH
   pseudo-element này (chỉ 1 phần tử `::before`, không tách riêng được "2 nhóm đèn" bên trong nó)
   nên animation khai báo SAU ghi đè hoàn toàn animation khai báo TRƯỚC (CSS chỉ giữ animation
   cuối cho 1 thuộc tính trùng) - animation đầu vô tác dụng. Sửa lại dùng ĐÚNG 1 animation nhiều
   mốc không đều nhịp thay vì cố lệch pha 2 nhóm đèn (muốn làm đúng cần 2 phần tử DOM thật riêng,
   không chỉ dùng được 1 pseudo-element `::before` sẵn có). `pointer-events: none` + đặt DƯỚI
   `.header-inner` (xem z-index của `.header-inner` bên dưới) để không che mất logo/chữ/nút bấm
   thật trong header. */
body.ui .app-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(70px 55px at 16% -55%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
        radial-gradient(90px 70px at 50% -60%, rgba(255, 238, 190, .92), rgba(255, 238, 190, 0) 70%),
        radial-gradient(70px 55px at 84% -55%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%),
        radial-gradient(230px 150px at 16% -15%, rgba(255, 255, 255, .28), transparent 72%),
        radial-gradient(300px 190px at 50% -15%, rgba(255, 238, 190, .30), transparent 72%),
        radial-gradient(230px 150px at 84% -15%, rgba(255, 255, 255, .28), transparent 72%);
    mix-blend-mode: screen;
    animation: uiFloodlightFlicker 3.2s ease-in-out infinite;
}

@keyframes uiFloodlightFlicker {
    0%, 100% { opacity: 1; }
    38% { opacity: .9; }
    46% { opacity: 1; }
    72% { opacity: .84; }
    80% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    body.ui .app-header::before { animation: none; }
}

/* [SỬA 31/10/2026 - anh Tân gửi ảnh dải sọc ở trần cửa hàng, yêu cầu thêm "viền 3 sọc màu tượng
   trưng cho style cửa hàng"] Đổi hẳn từ hiệu ứng đèn LED chạy (trừu tượng, không gắn với thương
   hiệu cụ thể) sang ĐÚNG dải 3 sọc ngang như dải trang trí thật ở trần/kệ hàng các cửa hàng
   co.op smile - đặt ngay dưới header, là điểm nhận diện xuất hiện ở MỌI trang (vì header dùng
   chung mọi view) thay vì phải sửa từng view riêng lẻ. Tĩnh (không animate) - đúng tinh thần 1
   dải sơn/decal thật trên tường, không phải hiệu ứng đèn điện tử.
   [SỬA 31/10/2026 lần 2 - anh Tân xem ảnh chụp lại, báo đúng màu phải là CAM + XANH LÁ + XANH
   DƯƠNG (thiếu xanh lá) - ĐỔI sọc giữa từ trắng/kem sang xanh lá, dùng ĐÚNG màu xanh lá đã có
   sẵn trong logo co.op smile (chấm xanh lá trên chữ "i" của "smile" - #94c83d, lấy mẫu trực
   tiếp từ logo_coopsmile_small.png) để đồng bộ màu với logo, không bịa màu xanh lá mới.
   [SỬA 31/10/2026 lần 3 - anh Tân khoanh đỏ ảnh chụp, yêu cầu "bỏ bớt 1 line xanh dương, chỉ giữ
   lại line xanh lá + cam"] Sọc xanh dương (1/3 đầu) đứng ngay sát dưới chính header (cũng nền
   xanh dương, mục 144) nên nhìn như 2 dải xanh chồng lên nhau - thừa, không cần thiết. Bỏ hẳn
   phần xanh dương, chỉ còn CHIA ĐÔI xanh lá + cam.
   [SỬA 01/11/2026 - anh Tân gửi ảnh biển hiệu thật (dải trang trí trần cửa hàng), báo "nhầm rồi"]
   Thử hiệu ứng đèn LED chạy (đoạn màu xen kẽ trượt ngang) ở lần sửa trước - anh Tân xem ảnh thật
   gửi kèm, xác nhận KHÔNG phải ý đó: vẫn CHỈ 2 dải TĨNH xanh lá + cam như ảnh (1 dải sơn/decal
   thật trên trần, không nhấp nháy) - CHỈ cần đổi lại TỈ LỆ bề dày, cam dày hơn xanh lá (giống ảnh:
   dải màu trên dày, dải accent dưới mỏng hơn hẳn). Quay lại linear-gradient chia dọc TĨNH (180deg)
   như mục ngay trên, đổi mốc chia từ 50/50 thành cam 75% (dày) + xanh lá 25% (mỏng) - không
   animate, không repeating-gradient nữa.
   [SỬA 01/11/2026 lần 2 - anh Tân báo "sai vị trí, line cam phải ở dưới cùng rồi tới line xanh
   lá"] Đổi NGƯỢC thứ tự: xanh lá (mỏng, 25%) ở TRÊN - sát mép header, cam (dày, 75%) ở DƯỚI CÙNG
   - sát mép trên của nội dung trang. */
body.ui .app-header::after {
    content: "";
    position: absolute;
    inset: auto 0 -15px 0;
    height: 15px;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        #94c83d 0%, #94c83d 25%,
        var(--ui-orange) 25%, var(--ui-orange) 100%
    );
    box-shadow: 0 2px 6px rgba(16, 40, 90, .18);
}

/* position+z-index để logo/chữ/nút thật luôn nổi trên quầng sáng đèn mô phỏng ở .app-header::before */
body.ui .app-header .header-inner { position: relative; z-index: 1; height: var(--ui-header-h); gap: 10px; }

body.ui .app-brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
/* [SỬA 31/10/2026] BỎ nền trắng cũ - logo_coopsmile_signage_menu.png (mặc định mới) vẽ chữ
   "co.op" MÀU TRẮNG để nổi trên header xanh (xem SystemSettingsService.DefaultLogoPath), đặt
   trong khung nền trắng sẽ làm chữ trắng biến mất (trắng trên trắng) - để logo nằm thẳng trên
   header, đúng kiểu "biển hiệu" không viền hộp. */
body.ui .header-logo-wrap { height: 42px; padding: 2px 6px; border-radius: 10px; background: transparent; box-shadow: none; }
/* [SỬA 31/10/2026] Đổi từ xanh đậm (var(--ui-blue-950), đọc tốt trên nền CAM cũ) sang TRẮNG - nền
   header giờ là xanh dương, chữ xanh đậm trên nền xanh sẽ không đủ tương phản để đọc. */
body.ui .app-brand-title { color: #fff; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }

/* [MỚI 31/10/2026 - anh Tân yêu cầu "chữ logo co.opsmile và chữ Chấm công GPS v2.0 cũng sáng đèn
   LED nhấp nháy (như đèn LED chữ hộp)"] Mô phỏng biển hiệu chữ nổi đèn LED thật: quầng sáng toả
   quanh NÉT CHỮ (không phải quầng sáng chiếu TỪ TRÊN XUỐNG như `.app-header::before`/
   `.login-logo-wrap::after` ở các mục trước - đây là loại hiệu ứng khác, ánh sáng phát ra TỪ
   CHÍNH con chữ). Logo là ẢNH (PNG nền trong suốt) nên dùng `filter: drop-shadow(...)` (bám đúng
   theo biên dạng alpha của chữ trong ảnh, không phải hình chữ nhật bao quanh như `box-shadow`);
   "Chấm công GPS v2.0" là CHỮ THẬT nên dùng `text-shadow` (tương đương, nhưng cho text). Cả 2
   dùng CHUNG 1 animation (`uiLedTextGlow`) để nhấp nháy ĐỒNG BỘ - giống như logo và dòng tiêu đề
   là 2 cụm đèn LED của CÙNG 1 biển hiệu, được cấp điện cùng lúc. */
/* [SỬA 31/10/2026 - anh Tân báo sáng quá, yêu cầu "giảm độ sáng xuống còn 50% thôi và thời gian
   nhấp nháy cũng cách nhau lâu hơn"] Giảm ĐÚNG MỘT NỬA mọi độ mờ đục (opacity) của quầng sáng ở
   cả 2 mốc keyframe (không đổi bán kính lan toả - giữ nguyên hình dạng quầng sáng, chỉ giảm độ
   sáng/độ đậm) + nới chu kỳ animation từ 2.4s lên 5s (hơn gấp đôi) để khoảng cách giữa 2 lần sáng
   rực xa nhau hơn hẳn, bớt "nhấp nháy liên tục". */
body.ui .header-logo-wrap img {
    animation: uiLedTextGlow 5s ease-in-out infinite;
}
body.ui .app-brand-title {
    animation: uiLedTextGlow 5s ease-in-out infinite;
}
@keyframes uiLedTextGlow {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, .28)) drop-shadow(0 0 8px rgba(255, 255, 255, .15));
        text-shadow: 0 1px 2px rgba(5, 25, 60, .25), 0 0 4px rgba(255, 255, 255, .3), 0 0 10px rgba(255, 255, 255, .18);
    }
    50% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, .48)) drop-shadow(0 0 16px rgba(255, 255, 255, .33)) drop-shadow(0 0 26px rgba(255, 210, 130, .23));
        text-shadow: 0 1px 2px rgba(5, 25, 60, .25), 0 0 8px rgba(255, 255, 255, .5), 0 0 20px rgba(255, 255, 255, .38), 0 0 32px rgba(255, 210, 130, .25);
    }
}
@media (prefers-reduced-motion: reduce) {
    body.ui .header-logo-wrap img, body.ui .app-brand-title { animation: none; }
}

body.ui .header-user { line-height: 1.25; }
body.ui .header-user .fw-semibold { color: #fff; font-size: .88rem; font-weight: 700 !important; }
body.ui .header-user-role { color: rgba(255, 255, 255, .82); font-size: .76rem; font-weight: 500; }
body.ui .header-divider { width: 1px; height: 28px; background: rgba(255, 255, 255, .32); }

body.ui .header-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 1px solid var(--ui-border); border-radius: var(--ui-radius-sm);
    background: var(--ui-white); color: var(--ui-blue-900); font-size: 1.15rem;
    transition: background .15s, border-color .15s, color .15s;
}
body.ui .header-icon-btn:hover { background: var(--ui-blue-50); border-color: var(--ui-blue-100); color: var(--ui-blue-700); }

body.ui .app-btn-logout { height: 40px; }
/* nút ẩn/hiện menu chỉ có ý nghĩa trên PC */
body.ui #sidebarToggle { display: none !important; }
@media (min-width: 992px) { body.ui #sidebarToggle { display: inline-flex !important; } }

/* ===================================================== KHUNG TRANG ===================================================== */
/* site.css đặt overflow-x:hidden lên html/body: cả hai thành "vùng cuộn" nên position:sticky của thanh trên/menu trái
   không dính vào khung nhìn. clip vẫn chặn tràn ngang nhưng không tạo vùng cuộn. */
html, body.ui { overflow-x: clip; overflow-y: visible; }

body.ui .app-frame { min-height: calc(100dvh - var(--ui-header-h)); display: flex; flex-direction: column; }
body.ui .app-shell { flex: 1 1 auto; display: grid; grid-template-columns: var(--ui-sidebar-w) minmax(0, 1fr); width: 100%; max-width: none; transition: grid-template-columns .2s ease; }
body.ui.sidebar-collapsed .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
body.ui.sidebar-collapsed .app-sidebar { visibility: hidden; transform: translateX(-12px); }

/* [SỬA 31/10/2026 - anh Tân khoanh đỏ ảnh chụp, yêu cầu "tăng khoảng cách giữa nội dung ở tiêu đề
   view và các viền xanh lá + cam"] Dải 2 sọc dưới header (`.app-header::after`, cao 15px) đặt
   tuyệt đối NGAY SÁT mép dưới header, đè lên phần trên của khoảng đệm này - đệm cũ 26px nên
   khoảng cách THẬT giữa đáy dải sọc và tiêu đề trang chỉ còn ~11px (26-15), quá sát. Nới đệm trên
   từ 26px lên 44px (và tương ứng ở các mốc điện thoại/tablet bên dưới) để khoảng cách thật rộng
   rãi hơn hẳn, không còn cảm giác tiêu đề "dính" ngay vào dải sọc. */
body.ui .app-content { min-width: 0; width: 100%; max-width: none; padding: 44px clamp(16px, 2.2vw, 36px) 40px; animation: none; }

/* [SỬA 31/10/2026 - anh Tân yêu cầu "chỉnh luôn bottom layout màu xanh dương như header layout"]
   Đổi nền chân trang từ trắng sang ĐÚNG gradient xanh dương của header (mục 144) cho đồng bộ -
   chữ xám cũ (var(--ui-muted)) không đủ tương phản trên nền xanh nên đổi sang trắng/trắng-mờ,
   cùng cách đã làm cho chữ trong header (.app-brand-title/.header-user...). */
body.ui .app-footer {
    padding: 14px clamp(16px, 2.2vw, 36px);
    background: linear-gradient(180deg, var(--ui-blue-700) 0%, var(--ui-blue-900) 100%);
    border-top: 0;
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
}
body.ui .app-footer a, body.ui .app-footer span { color: rgba(255, 255, 255, .85); }
body.ui .app-footer a:hover { color: #fff; }

/* ===================================================== SIDEBAR (xanh thương hiệu) ===================================================== */
body.ui .app-sidebar {
    position: relative;
    align-self: stretch;
    width: var(--ui-sidebar-w);
    min-width: 0;
    overflow: visible;
    background: var(--ui-sidebar-bg);
    border: 0;
    box-shadow: none;
    transition: transform .2s ease;
}
body.ui .app-sidebar::before, body.ui .app-sidebar::after { content: none; display: none; }
body.ui .app-sidebar .sidebar-content {
    position: sticky;
    top: var(--ui-header-h);
    min-height: 0;
    max-height: calc(100dvh - var(--ui-header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 12px 24px;
}
body.ui .app-sidebar .sidebar-content::-webkit-scrollbar { width: 8px; }
body.ui .app-sidebar .sidebar-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .25); border-radius: 8px; }

body.ui .app-nav-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    min-height: 42px; margin: 2px 0; padding: 0 12px;
    border: 0; border-radius: var(--ui-radius-sm); background: transparent; box-shadow: none;
    color: rgba(255, 255, 255, .88);
    font-size: .92rem; font-weight: 500; line-height: 1.25;
    text-decoration: none;
    transition: background .15s, color .15s;
}
body.ui .app-nav-link > i { flex: 0 0 22px; font-size: 1.12rem; text-align: center; color: rgba(255, 255, 255, .8); }
body.ui .app-nav-link span, body.ui .app-nav-link:hover span, body.ui .app-nav-link.active span { white-space: normal; color: inherit; text-shadow: none; }
body.ui .app-nav-link, body.ui .app-nav-link > i { text-shadow: none; }
body.ui .app-nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; border: 0; box-shadow: none; }
body.ui .app-nav-link.active {
    background: rgba(255, 255, 255, .18); color: #fff; font-weight: 700; border: 0; box-shadow: none;
}
body.ui .app-nav-link.active::before {
    content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--ui-orange), var(--ui-yellow));
}
body.ui .app-nav-link.active > i { color: var(--ui-yellow); }

body.ui .nav-section-label {
    margin: 14px 0 4px; padding: 10px 12px 2px; border-top: 1px solid rgba(255, 255, 255, .14);
    color: var(--ui-yellow); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
body.ui .nav-section-label:first-child { border-top: 0; margin-top: 4px; }

body.ui .mobile-sidebar { width: min(300px, 86vw); background: var(--ui-sidebar-bg); color: #fff; }
body.ui .mobile-sidebar .offcanvas-header { background: transparent; border-bottom: 3px solid var(--ui-orange); color: #fff; }
body.ui .mobile-sidebar .offcanvas-title { color: #fff; text-shadow: none; font-size: 1rem; }
body.ui .mobile-sidebar .offcanvas-body { padding: 12px; }

/* ===================================================== TIÊU ĐỀ TRANG ===================================================== */
body.ui .page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin: 0 0 20px; }
body.ui .page-heading > :first-child { flex: 1 1 280px; min-width: 0; }
body.ui .page-title { margin: 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; color: var(--ui-blue-950); line-height: 1.25; }
body.ui .page-title::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--ui-orange), var(--ui-yellow)); }
body.ui .page-subtitle { margin: 8px 0 0; max-width: 78ch; color: var(--ui-muted); font-size: .92rem; line-height: 1.55; }
body.ui .page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; white-space: normal; color: var(--ui-muted); font-size: .85rem; }

/* ===================================================== THẺ ===================================================== */
body.ui .app-card, body.ui .card {
    background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-sm);
}
body.ui .app-card.p-3, body.ui .app-card.p-4 { padding: 18px !important; }
body.ui .app-card > .app-card-header, body.ui .card > .card-header {
    padding: 14px 18px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-border); border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}
body.ui .app-card > .app-card-header .app-card-title { font-size: 1rem; font-weight: 700; color: var(--ui-text); }
body.ui .app-card > .app-card-header .app-card-title > i { color: var(--ui-orange); }
body.ui .app-card h2.h6, body.ui .app-card .h6.fw-bold { font-size: .98rem; font-weight: 700; color: var(--ui-text); }

/* Thẻ số liệu Tổng quan (Home/Index) - đổi tông theo .stat-card/.stat-icon/.stat-blue|orange|yellow|green đã có của
   site.css, không cần sửa view. */
body.ui .stat-card {
    background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow-sm);
}
body.ui .stat-card::after { display: none; }
body.ui .stat-icon { border-radius: 12px; background: var(--ui-blue-50); color: var(--ui-blue-700); }
body.ui .stat-orange .stat-icon { background: var(--ui-orange-50); color: var(--ui-orange-600); }
body.ui .stat-yellow .stat-icon { background: var(--ui-yellow-50); color: #a16207; }
body.ui .stat-green .stat-icon { background: #e7f6ee; color: var(--ui-success); }
body.ui .stat-label { color: var(--ui-muted); }
body.ui .stat-value { color: var(--ui-blue-950); }
body.ui .stat-note { color: var(--ui-muted); }

/* ===================================================== TRANG GPS-FORM-PAGE / GPS-FORM-CARD (Chấm công, Lịch sử, Kế
   hoạch làm việc, In Biểu mẫu, Hướng dẫn sử dụng) ===================================================== */
/* site.css giới hạn .gps-form-page tối đa 640px + tự căn giữa trang - trên màn hình PC rộng, trang bị dồn vào 1 cột
   hẹp giữa khoảng trống lớn 2 bên, khác hẳn mọi trang admin khác (page-heading/app-card tràn hết .app-content).
   Bỏ căn giữa, nới rộng lên 960px (đủ rộng để không còn thấy "bó hẹp" nhưng KHÔNG kéo dài vô hạn ô nhập/nút 1 cột
   như Chấm công/Lịch sử/Kế hoạch làm việc ra cả màn hình - kéo dài thật rộng 1 ô ngày/1 nút bấm sẽ xấu hơn, không
   phải "full" theo đúng nghĩa UX). Trang nào thật sự có LƯỚI nhiều cột (vd "In Biểu mẫu" - 4 thẻ biểu mẫu) nên dùng
   thêm class .gps-form-page-grid để bỏ hẳn giới hạn, tận dụng đúng chiều rộng PC cho lưới nhiều cột thật. */
body.ui .gps-form-page { max-width: 960px; width: 100%; margin-inline: 0; }
body.ui .gps-form-page.gps-form-page-grid { max-width: none; }
/* [MỚI 30/10/2026 - anh Tân yêu cầu riêng Chấm công/Lịch sử/Kế hoạch làm việc căn giữa trang] */
body.ui .gps-form-page.gps-form-page-center { margin-inline: auto; }

/* .gps-form-card đổi từ khung viền LED cam phát sáng (site.css, nhận diện riêng trước đây) sang đúng tông .app-card
   dùng chung toàn hệ thống - giữ nguyên các luật con khác của site.css (.form-control/.form-select bên trong,
   .btn-outline-danger...) vì những luật đó đã dùng tông xanh dương tương thích sẵn, không cần đổi. */
body.ui .gps-form-card {
    border: 1px solid var(--ui-border);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
}

/* ===================================================== NÚT: cùng chiều cao theo cỡ ===================================================== */
body.ui .btn, body.ui .app-btn-primary, body.ui .app-btn-outline, body.ui .app-btn-outline-danger, body.ui .app-btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    height: 40px; min-height: 0; padding: 0 16px;
    border-radius: var(--ui-radius-sm);
    font-size: .9rem; font-weight: 600; line-height: 1; letter-spacing: 0; white-space: nowrap;
    box-shadow: none; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
body.ui .btn:active { transform: translateY(1px); }
body.ui .btn > i, body.ui .app-link-btn > i { font-size: 1.05em; margin: 0 !important; line-height: 1; }
body.ui .btn-sm { height: 34px; padding: 0 12px; font-size: .84rem; border-radius: 9px; gap: .4rem; }
body.ui .btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; }
body.ui .btn-close { height: auto; padding: .5rem; }
body.ui .btn-link { height: auto; min-height: 0; padding: .15rem 0; border: 0; background: transparent; color: var(--ui-blue-700); font-weight: 600; text-decoration: none; }
body.ui .btn-link:hover { color: var(--ui-blue-900); text-decoration: underline; }

body.ui .app-btn-primary, body.ui .btn-primary {
    background: var(--ui-blue-700); border: 1px solid var(--ui-blue-700); color: #fff;
    box-shadow: 0 1px 2px rgba(11, 87, 208, .25);
}
body.ui .app-btn-primary:hover, body.ui .btn-primary:hover, body.ui .app-btn-primary:focus-visible { background: var(--ui-blue-900); border-color: var(--ui-blue-900); color: #fff; }
body.ui .app-btn-primary:disabled, body.ui .btn-primary:disabled { opacity: .55; }

body.ui .app-btn-outline, body.ui .btn-outline-secondary, body.ui .btn-outline-primary, body.ui .btn-light {
    background: var(--ui-white); border: 1px solid var(--ui-border-strong); color: var(--ui-blue-900);
}
body.ui .app-btn-outline:hover, body.ui .btn-outline-secondary:hover, body.ui .btn-outline-primary:hover, body.ui .btn-light:hover {
    background: var(--ui-blue-50); border-color: var(--ui-blue-600); color: var(--ui-blue-700);
}

body.ui .app-btn-outline-danger, body.ui .btn-outline-danger { background: var(--ui-white); border: 1px solid #f3b8b3; color: var(--ui-danger); }
body.ui .app-btn-outline-danger:hover, body.ui .btn-outline-danger:hover { background: #fef3f2; border-color: var(--ui-danger); color: var(--ui-danger); }
body.ui .btn-danger, body.ui .app-btn-danger { background: #d92d20; border: 1px solid #d92d20; color: #fff; }
body.ui .btn-danger:hover, body.ui .app-btn-danger:hover { background: #b42318; border-color: #b42318; color: #fff; }
body.ui .btn-warning { background: var(--ui-yellow); border: 1px solid #f2b705; color: #4a3200; }
body.ui .btn-warning:hover { background: #f5b800; border-color: #e0a800; color: #3a2700; }
body.ui .btn-success { background: #079455; border: 1px solid #079455; color: #fff; }
body.ui .btn-accent { background: var(--ui-orange); border: 1px solid var(--ui-orange); color: #fff; }
body.ui .btn-accent:hover { background: var(--ui-orange-600); border-color: var(--ui-orange-600); color: #fff; }

/* nút liên kết nhỏ trong bảng/thẻ */
body.ui .app-link-btn {
    display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
    border: 1px solid var(--ui-blue-100); border-radius: 8px; background: var(--ui-blue-50); color: var(--ui-blue-700);
    font-size: .8rem; font-weight: 600; line-height: 1;
}
body.ui .app-link-btn:hover, body.ui .app-link-btn:focus-visible { background: var(--ui-blue-700); border-color: var(--ui-blue-700); color: #fff; }
body.ui .app-link-btn.is-primary { background: var(--ui-blue-700); border-color: var(--ui-blue-700); color: #fff; }
body.ui .app-link-btn.is-primary:hover { background: var(--ui-blue-900); border-color: var(--ui-blue-900); }

body.ui .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.ui .form-actions .btn { min-width: 104px; height: 40px; padding: 0 16px; font-size: .9rem; font-weight: 600; border-radius: var(--ui-radius-sm); }

/* ===================================================== Ô NHẬP LIỆU ===================================================== */
body.ui .form-label { margin-bottom: .35rem; color: var(--ui-text-2); font-size: .82rem; font-weight: 600; }
body.ui .form-control, body.ui .form-select {
    height: 40px; min-height: 0; padding: 0 12px;
    border: 1px solid var(--ui-border-strong); border-radius: var(--ui-radius-sm); background-color: var(--ui-white);
    color: var(--ui-text); font-size: .92rem; line-height: 38px; box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
body.ui textarea.form-control { height: auto; min-height: 88px; padding: 9px 12px; line-height: 1.5; }
body.ui .form-select { padding-right: 2.2rem; line-height: 38px; }
body.ui .form-control-sm, body.ui .form-select-sm { height: 34px; padding: 0 10px; font-size: .86rem; line-height: 32px; border-radius: 9px; }
body.ui textarea.form-control-sm { height: auto; min-height: 64px; line-height: 1.45; padding: 7px 10px; }
body.ui .form-control::placeholder { color: #98a2b3; }
body.ui .form-control:focus, body.ui .form-select:focus {
    border-color: var(--ui-blue-600); box-shadow: 0 0 0 4px rgba(26, 108, 240, .16); outline: 0; background-color: #fff;
}
body.ui .form-control:disabled, body.ui .form-select:disabled, body.ui .form-control[readonly] { background: #f2f4f7; color: var(--ui-muted); }
body.ui .input-group > .btn { height: 40px; }
body.ui .input-group-sm > .btn, body.ui .input-group-sm > .form-control { height: 34px; }
/* [SỬA 30/10/2026 - anh Tân báo ô icon tài khoản/mật khẩu ở màn Đăng nhập cao hơn ô nhập]
   site.css có luật `.app-input-group .input-group-text, .form-control, .password-toggle { min-height: 48px }`
   gộp chung 3 phần tử - .form-control/.btn (password-toggle) đã được body.ui đặt lại `min-height: 0`
   ở trên nên co về đúng 40px, nhưng .input-group-text (ô icon) CHƯA bị huỷ min-height 48px nên vẫn
   cao 48px, lệch hẳn so với ô nhập 40px bên cạnh. Thêm `min-height: 0` để cả 3 phần tử lại cao bằng nhau. */
body.ui .input-group-text { height: 40px; min-height: 0; border-color: var(--ui-border-strong); background: #f8fafc; color: var(--ui-muted); border-radius: var(--ui-radius-sm); }
body.ui .form-check-input { width: 1.1em; height: 1.1em; margin-top: .2em; border-color: var(--ui-border-strong); }
body.ui .form-check-input:checked { background-color: var(--ui-blue-700); border-color: var(--ui-blue-700); }
body.ui .form-check-input:focus { box-shadow: 0 0 0 4px rgba(26, 108, 240, .16); border-color: var(--ui-blue-600); }
body.ui .form-text { color: var(--ui-muted); font-size: .78rem; }
body.ui .invalid-feedback, body.ui .text-danger.field-validation-error { font-size: .8rem; }

/* ===================================================== BẢNG ===================================================== */
body.ui .table-responsive { -webkit-overflow-scrolling: touch; border-radius: inherit; }
body.ui .table { --bs-table-bg: transparent; color: var(--ui-text); margin-bottom: 0; }
body.ui .table > :not(caption) > * > * { padding: 12px 14px; border-bottom-color: var(--ui-border); vertical-align: middle; }
body.ui .app-table thead th, body.ui .table thead th {
    background: #f1f5fb; color: var(--ui-text-2); border-bottom: 1px solid var(--ui-border-strong);
    font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
}
/* [SỬA 31/10/2026] Nút sắp xếp cột (vd .sta-sort-btn, .wpl-sort-btn...) ở khắp các bảng đang
   gán cứng ".text-white" (Bootstrap, có "!important") - còn sót lại từ trước khi đổi nền tiêu
   đề bảng sang SÁNG (#f1f5fb ở trên) theo giao diện QLTS, làm chữ gần như vô hình trên nền
   sáng. Ép lại đúng màu chữ tiêu đề bảng khi nằm trong thead - KHÔNG đụng ".text-white" ở mọi
   nơi khác (header/footer xanh dương...) vẫn cần chữ trắng như cũ. */
body.ui .app-table thead th .text-white, body.ui .table thead th .text-white { color: var(--ui-text-2) !important; }
body.ui .app-table thead th .text-white:hover, body.ui .table thead th .text-white:hover { color: var(--ui-text) !important; }
body.ui .app-card > .table-responsive:first-child .app-table thead tr:first-child th:first-child { border-top-left-radius: var(--ui-radius); }
body.ui .app-card > .table-responsive:first-child .app-table thead tr:first-child th:last-child { border-top-right-radius: var(--ui-radius); }
body.ui .table-hover > tbody > tr:hover > * { --bs-table-hover-bg: var(--ui-blue-50); background-color: var(--ui-blue-50); }
body.ui .table-sm > :not(caption) > * > * { padding: 8px 12px; }
body.ui .app-table tbody td { font-size: .9rem; }

/* Bảng cho phép xuống dòng trong ô (vd nhiều nhãn trong 1 ô): thêm class .wrap-cells thì ô tự xuống dòng, không cắt chữ. */
body.ui .app-table.wrap-cells th, body.ui .app-table.wrap-cells td { white-space: normal; }
body.ui .app-table.wrap-cells td { max-width: none; overflow: visible; text-overflow: clip; }
body.ui .badge-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.ui .app-table.wrap-cells .badge { white-space: normal; text-align: left; }

/* ===================================================== NHÃN / BADGE ===================================================== */
body.ui .badge { display: inline-flex; align-items: center; gap: 4px; padding: .32em .7em; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; vertical-align: middle; }
body.ui .badge.text-bg-primary, body.ui .badge.text-bg-info { background: var(--ui-blue-50) !important; color: var(--ui-blue-700) !important; box-shadow: inset 0 0 0 1px var(--ui-blue-100); }
body.ui .badge.text-bg-success { background: #e7f6ee !important; color: var(--ui-success) !important; box-shadow: inset 0 0 0 1px #bfe6d0; }
body.ui .badge.text-bg-warning { background: var(--ui-yellow-50) !important; color: #8a5a00 !important; box-shadow: inset 0 0 0 1px #f5dd85; }
body.ui .badge.text-bg-danger { background: #fef3f2 !important; color: var(--ui-danger) !important; box-shadow: inset 0 0 0 1px #f9c5c0; }
body.ui .badge.text-bg-secondary, body.ui .badge.text-bg-light { background: #f2f4f7 !important; color: #475467 !important; box-shadow: inset 0 0 0 1px var(--ui-border); }
body.ui .badge.text-bg-dark { background: #1d2939 !important; color: #fff !important; }
body.ui .badge.bg-warning.text-dark { background: var(--ui-yellow-50) !important; color: #8a5a00 !important; box-shadow: inset 0 0 0 1px #f5dd85; }

/* ===================================================== THÔNG BÁO ===================================================== */
body.ui .alert { border: 1px solid; border-left-width: 4px; border-radius: var(--ui-radius-sm); padding: 11px 14px; font-size: .9rem; box-shadow: none; }
body.ui .alert-success { background: #ecfdf3; border-color: #a6e4c1; color: #05603a; }
body.ui .alert-danger { background: #fef3f2; border-color: #f9c5c0; color: #912018; }
body.ui .alert-warning { background: var(--ui-yellow-50); border-color: #f5dd85; color: #6b4600; }
body.ui .alert-info { background: var(--ui-blue-50); border-color: var(--ui-blue-100); color: var(--ui-blue-900); }

/* ===================================================== TAB / PHÂN TRANG ===================================================== */
body.ui .nav-tabs { gap: 4px; border-bottom: 1px solid var(--ui-border-strong); flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
body.ui .nav-tabs::-webkit-scrollbar { display: none; }
body.ui .nav-tabs .nav-link { flex: 0 0 auto; height: 42px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; color: var(--ui-muted); font-size: .9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
body.ui .nav-tabs .nav-link:hover { color: var(--ui-blue-700); background: var(--ui-blue-50); border-bottom-color: transparent; }
body.ui .nav-tabs .nav-link.active { color: var(--ui-blue-700); background: transparent; border-bottom-color: var(--ui-orange); }

body.ui .page-link { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px !important; color: var(--ui-blue-700); border-color: var(--ui-border); }
body.ui .page-item.active .page-link { background: var(--ui-blue-700); border-color: var(--ui-blue-700); color: #fff; }
body.ui .page-item.disabled .page-link { color: var(--ui-muted); background: #f8fafc; }

/* ===================================================== TRANG ĐĂNG NHẬP - LOGO =====================================================
   [SỬA 31/10/2026 - anh Tân xem lại, đổi ý: CHỈ giữ chữ "co.opsmile", BỎ HẲN nền xanh sọc nổi của
   banner (mục 145-148 - toàn bộ hướng "banner lấp đầy phần trên thẻ" không dùng nữa). Quay lại
   đúng kiểu hiển thị gốc của site.css (`.login-logo-wrap`: khung nhỏ 210x78px, nền trắng, nằm
   giữa trang, `object-fit: contain`) - không cần override gì thêm ở đây nữa, vì nền trắng của
   khung trùng màu với nền trắng của `.login-card` nên gần như vô hình, chỉ còn thấy đúng chữ logo
   nổi trên nền trắng của thẻ. Ảnh dùng: `logo_coopsmile_text.png` (cắt riêng "co.op smile" từ
   logo gốc `logo_coopsmile_small.png`, giữ ĐÚNG màu xanh dương/cam gốc - không đổi màu trắng như
   bản dùng cho header, vì ở đây nền là TRẮNG chứ không phải xanh - xem SystemSettingsService.cs). */

/* ===================================================== MODAL ===================================================== */
body.ui .modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(16, 24, 40, .28); overflow: hidden; }
body.ui .modal-header { padding: 16px 20px; border-bottom: 1px solid var(--ui-border); background: var(--ui-white); }
body.ui .modal-header::after { content: none; }
body.ui .modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 700; color: var(--ui-blue-950); }
body.ui .modal-title > i, body.ui .modal-title .bi { color: var(--ui-orange); }
body.ui .modal-body { padding: 18px 20px; }
body.ui .modal-footer { padding: 14px 20px; border-top: 1px solid var(--ui-border); background: #fafbfd; }
body.ui .app-modal-dialog .modal-content { border: 0; box-shadow: 0 24px 60px rgba(16, 24, 40, .28); }
body.ui .app-modal-dialog .modal-header { background: var(--ui-white); border-radius: 0; }
body.ui .app-modal-dialog.app-modal-lg, body.ui .modal-dialog.app-modal-lg { max-width: min(960px, 96vw); }
body.ui .modal-backdrop.show { opacity: .5; }

/* Modal đổi mật khẩu (_Layout): icon + ô nhập + nút mắt cùng chiều cao 40px như mọi ô nhập khác của app. */
body.ui #changePasswordModal .app-input-group > .input-group-text,
body.ui #changePasswordModal .app-input-group > .form-control,
body.ui #changePasswordModal .app-input-group > .password-toggle { min-height: 0; height: 40px; }
body.ui #changePasswordModal .app-input-group > .input-group-text { width: 42px; justify-content: center; padding: 0; font-size: 1rem; line-height: 1; }
body.ui #changePasswordModal .app-input-group > .password-toggle { width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

body.ui .text-muted { color: var(--ui-muted) !important; }
body.ui .bg-body-tertiary { background: #f8fafc !important; }
body.ui hr { border-color: var(--ui-border); opacity: 1; }
body.ui dl.row dt { color: var(--ui-muted); font-weight: 600; font-size: .86rem; }
body.ui dl.row dd { font-weight: 500; }

/* ===================================================== MÀN HÌNH LỚN: tận dụng toàn bộ chiều rộng ===================================================== */
@media (min-width: 1600px) {
    body.ui { --ui-sidebar-w: 280px; }
    html { font-size: 15.5px; }
}

/* ===================================================== TABLET / ĐIỆN THOẠI ===================================================== */
@media (max-width: 991.98px) {
    :root { --ui-header-h: 56px; }
    body.ui .app-shell { grid-template-columns: minmax(0, 1fr); }
    body.ui .app-sidebar { display: none; }
    body.ui .app-content { padding: 32px 14px 32px; }
    body.ui .app-brand-title { display: none; }
    body.ui .page-title { font-size: 1.4rem; }
    /* xếp dọc: flex-basis của khối tiêu đề không được tính theo chiều cao */
    body.ui .page-heading { flex-direction: column; align-items: stretch; }
    body.ui .page-heading > :first-child { flex: 0 0 auto; }
}

@media (max-width: 575.98px) {
    html { font-size: 15px; }
    :root { --ui-header-h: 54px; }
    body.ui .header-logo-wrap { height: 34px; }
    body.ui .app-btn-logout { width: 40px; padding: 0; }
    body.ui .app-content { padding: 28px 12px 28px; }
    body.ui .page-heading { margin-bottom: 14px; }
    body.ui .page-title { font-size: 1.3rem; }
    body.ui .page-subtitle { font-size: .86rem; }

    /* nhóm nút của trang: dàn đều thành lưới 2 cột, cao bằng nhau, đủ lớn để chạm */
    body.ui .page-meta { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    body.ui .page-meta > .btn, body.ui .page-meta > a, body.ui .page-meta > form, body.ui .page-meta > div { width: 100%; min-width: 0; }
    body.ui .page-meta > form .btn { width: 100%; }
    body.ui .page-meta .btn { white-space: normal; height: 42px; text-align: center; }
    body.ui .page-meta > :only-child { grid-column: 1 / -1; }

    body.ui .btn { height: 44px; }
    body.ui .btn-sm { height: 38px; }
    /* hàng nút tự do trong thẻ: giãn đều theo bề ngang, cao bằng nhau */
    body.ui .app-card .d-flex.flex-wrap > .btn, body.ui .app-card .d-flex.flex-wrap > form { flex: 1 1 auto; }
    body.ui .app-card .d-flex.flex-wrap > form > .btn { width: 100%; }
    body.ui .form-actions .btn { flex: 1 1 calc(50% - 8px); min-width: 0; height: 44px; }
    /* chữ 16px để iOS không tự phóng to khi chạm vào ô nhập */
    body.ui .form-control, body.ui .form-select { height: 44px; font-size: 16px; line-height: 42px; }
    body.ui .form-control-sm, body.ui .form-select-sm { height: 40px; font-size: 16px; line-height: 38px; }
    body.ui textarea.form-control, body.ui textarea.form-control-sm { font-size: 16px; line-height: 1.45; }
    body.ui .input-group > .btn { height: 44px; }
    /* [SỬA 01/11/2026 - lặp lại đúng bug đã sửa ở mục "Ô NHẬP LIỆU" phía trên nhưng cho
       riêng mốc điện thoại này] .form-control/.input-group > .btn vừa được nâng lên 44px
       ở trên nhưng quên nâng .input-group-text (ô icon) theo - ô icon vẫn giữ 40px từ luật
       gốc nên lệch hẳn so với ô nhập 44px bên cạnh (ô icon thấp hơn, ô nhập nhô ra 2px mỗi
       đầu) - ảnh chụp màn Đăng nhập trên điện thoại thật cho thấy rõ lệch này. */
    body.ui .input-group-text { height: 44px; }
    body.ui .input-group-sm > .btn, body.ui .input-group-sm > .form-control, body.ui .input-group-sm > .form-select { height: 40px; }
    body.ui .input-group-sm > .btn { padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
    body.ui .app-card.p-3, body.ui .app-card.p-4 { padding: 14px !important; }

    body.ui .table > :not(caption) > * > * { padding: 10px 11px; }
    body.ui .app-table tbody td { font-size: .86rem; }
    body.ui .row > .col-auto { flex: 1 1 100%; width: 100%; }
    body.ui .row > .col-auto > .btn { width: 100%; }

    /* bảng → thẻ: mỗi dòng một khối, "NHÃN  giá trị" từng ô (nhãn do gps-ui.js lấy từ tiêu đề cột) */
    body.ui table.is-stackable, body.ui table.is-stackable > tbody, body.ui table.is-stackable > tbody > tr, body.ui table.is-stackable > tbody > tr > td, body.ui table.is-stackable > tfoot, body.ui table.is-stackable > tfoot > tr, body.ui table.is-stackable > tfoot > tr > td { display: block; width: 100%; }
    body.ui table.is-stackable > thead { display: none; }
    body.ui table.is-stackable > tbody > tr { position: relative; padding: 10px 14px; border-bottom: 1px solid var(--ui-border); }
    body.ui table.is-stackable > tbody > tr:last-child { border-bottom: 0; }
    body.ui table.is-stackable > tbody > tr > td { display: flex; align-items: flex-start; justify-content: space-between; white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: anywhere; max-width: none !important; gap: 12px; padding: 5px 0 !important; border: 0 !important; text-align: right; background: transparent !important; }
    body.ui table.is-stackable > tbody > tr > td::before { content: attr(data-label); flex: 0 0 34%; max-width: 40%; text-align: left; color: var(--ui-muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
    body.ui table.is-stackable > tbody > tr > td:not([data-label])::before { content: none; }
    body.ui table.is-stackable > tbody > tr > td:not([data-label]) { justify-content: flex-end; flex-wrap: wrap; }
    body.ui table.is-stackable > tbody > tr > td.stack-full { display: block; text-align: center; }
    body.ui table.is-stackable > tbody > tr > td.stack-full::before { content: none; }
    body.ui table.is-stackable > tbody > tr > td > * { text-align: left; }
    body.ui table.is-stackable > tbody > tr > td > * { min-width: 0; }
    body.ui table.is-stackable > tbody > tr > td > .stack-val, body.ui table.is-stackable > tbody > tr > td > .badge-list { flex: 1 1 0; text-align: left; }
    /* nhãn (badge) dài: cho xuống dòng theo từng phần chứ không bẻ giữa chừng một ngày hay một từ */
    body.ui table.is-stackable .badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; white-space: normal; text-align: left; max-width: 100%; border-radius: 14px; overflow-wrap: normal; }
    body.ui table.is-stackable .badge .text-muted, body.ui table.is-stackable .badge .app-link-btn { white-space: nowrap; }
    /* ô có form nhập: nhãn trên, form chiếm cả bề ngang */
    body.ui table.is-stackable > tbody > tr > td.stack-field { flex-direction: column; align-items: stretch; gap: 6px; }
    body.ui table.is-stackable > tbody > tr > td.stack-field::before { flex: 0 0 auto; max-width: none; }
    body.ui table.is-stackable > tbody > tr > td.stack-field > form { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
    body.ui table.is-stackable > tbody > tr > td.stack-field > form > select { flex: 1 1 100%; min-width: 0; }
    body.ui table.is-stackable > tbody > tr > td.stack-field > form > input:not([type=hidden]) { flex: 1 1 0; min-width: 0; max-width: none !important; }
    body.ui table.is-stackable > tbody > tr > td.stack-field > form > .btn { flex: 0 0 auto; width: 52px; }
    body.ui table.is-stackable > tfoot > tr > td { text-align: right !important; padding: 4px 14px !important; }
    body.ui .table-responsive:has(> table.is-stackable) { overflow: visible; max-height: none !important; }

    /* cửa sổ modal: toàn màn hình, nút cố định cuối cửa sổ */
    body.ui .modal-dialog { margin: 0; max-width: none; min-height: 100dvh; }
    body.ui .modal-content { min-height: 100dvh; border-radius: 0; }
    body.ui .modal-dialog-scrollable .modal-content { max-height: 100dvh; }
    body.ui .modal-footer { position: sticky; bottom: 0; flex-wrap: nowrap; }
    body.ui .modal-footer > .btn { flex: 1 1 0; }
    body.ui .nav-tabs .nav-link { height: 44px; padding: 0 14px; }

    body.ui .stat-card { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    body.ui .app-shell, body.ui .app-sidebar, body.ui .btn { transition: none; }
}

@media print {
    body.ui .app-header, body.ui .app-sidebar, body.ui .app-footer { display: none !important; }
    body.ui .app-shell { display: block; }
    body.ui .app-content { padding: 0; }
}

/* ===================================================== SỬA LỖI HIỂN THỊ (kế thừa từ QLTS) ===================================================== */
/* Mũi tên của <select> nằm ở mép phải: luật `padding: 0 12px` ở trên làm mất chỗ chừa cho mũi tên nên số/chữ bị mũi tên đè. */
body.ui .form-select, body.ui .form-select-sm, body.ui .form-select-lg { padding-right: 2.1rem; background-position: right .7rem center; background-size: 14px 10px; }
body.ui .input-group-sm > .form-select { height: 34px; padding: 0 2.1rem 0 10px; font-size: .86rem; line-height: 32px; }
body.ui .input-group > .form-select { height: 40px; }
/* Công tắc (form-switch): luật `.form-check-input { width: 1.1em }` biến nó thành vòng tròn; trả lại kích thước công tắc. */
body.ui .form-switch .form-check-input { width: 2em; height: 1.1em; margin-top: .2em; border-radius: 2em; }
body.ui .input-group-sm > .input-group-text { height: 34px; min-height: 0; padding: 0 10px; font-size: .95rem; line-height: 1; align-items: center; }
body.ui .input-group-sm > .input-group-text .bi { font-size: 1rem; line-height: 1; }
/* Màu chủ đạo của Bootstrap (#0d6efd) còn sót ở các linh kiện dùng giá trị cố định: đồng bộ với xanh của app (#0b57d0). */
body.ui { --bs-primary: #0b57d0; --bs-primary-rgb: 11, 87, 208; --bs-link-color: #0b57d0; --bs-link-color-rgb: 11, 87, 208; --bs-link-hover-color: #083e99; --bs-link-hover-color-rgb: 8, 62, 153; }
body.ui .progress { --bs-progress-bar-bg: #0b57d0; --bs-progress-border-radius: 999px; }
body.ui .list-group { --bs-list-group-active-bg: #0b57d0; --bs-list-group-active-border-color: #0b57d0; }
body.ui .dropdown-menu { --bs-dropdown-link-active-bg: #e8f1ff; --bs-dropdown-link-active-color: #0b57d0; --bs-dropdown-border-color: var(--ui-border); --bs-dropdown-border-radius: 12px; }
body.ui .dropdown-item.active { font-weight: 700; }
body.ui .nav-pills { --bs-nav-pills-link-active-bg: #0b57d0; }
body.ui .accordion { --bs-accordion-active-bg: #e8f1ff; --bs-accordion-active-color: #0b57d0; --bs-accordion-btn-focus-box-shadow: 0 0 0 4px rgba(26, 108, 240, .16); --bs-accordion-border-color: var(--ui-border); }
