/* Công Việc Bình Minh — giao diện theo KHUÔN 4C (tai-lieu/PROJECT-INSTRUCTIONS-BINHMINHAI-QD-A-V4.md mục 4C)
   + ngoại lệ a–e đã duyệt (GIAO-DIEN-4C.md). Font + icon tự lưu (NGUON-TAI-NGUYEN.txt). */

/* ---------- CHỮ: Be Vietnam Pro tự lưu, latin + vietnamese, 400/500/600/700, swap ---------- */
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url(/font/be-vietnam-pro-vietnamese-400-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 400; font-display: swap; src: url(/font/be-vietnam-pro-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 500; font-display: swap; src: url(/font/be-vietnam-pro-vietnamese-500-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 500; font-display: swap; src: url(/font/be-vietnam-pro-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 600; font-display: swap; src: url(/font/be-vietnam-pro-vietnamese-600-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 600; font-display: swap; src: url(/font/be-vietnam-pro-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url(/font/be-vietnam-pro-vietnamese-700-normal.woff2) format('woff2'); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: 'Be Vietnam Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url(/font/be-vietnam-pro-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- MÀU 4C: Tối (mặc định) ---------- */
:root {
  --nen: #071C31; --the: #0E2E4D; --the-phu: #0A2540; --ke: #1B4770; --chu: #FFFFFF; --chu-phu: #8FA6BD;
  --cam: #E88031; --chu-cam: #F0A15F; --navy: #071C31; --loi: #FF8A8A; --tot: #6FD39A;
  --vien-nut: #FFFFFF; --o-nen: #0A2540; --o-vien: #8FA6BD;
  --bo: 14px; --cao-thanh: 64px;
  --vien-the: transparent; --bong-the: none;   /* Tối: thẻ tách nền bằng màu thẻ, không viền (thoáng hơn, 04/10/2026) */
  color-scheme: dark;
}
/* Sáng */
:root[data-theme="sang"] {
  --nen: #F7F9FC; --the: #FFFFFF; --the-phu: #EEF2F8; --ke: #DCE4EF; --chu: #101A28; --chu-phu: #5B6475;
  --chu-cam: #A8541A; --loi: #C0392B; --tot: #1E7D4A; --vien-nut: #071C31; --o-nen: #FFFFFF; --o-vien: #5B6475;
  --vien-the: #DCE4EF; --bong-the: 0 1px 3px rgba(16, 26, 40, .06);   /* Sáng: thẻ trắng trên nền sáng cần viền mảnh */
  color-scheme: light;
}
/* Theo máy */
@media (prefers-color-scheme: light) {
  :root[data-theme="may"] {
    --nen: #F7F9FC; --the: #FFFFFF; --the-phu: #EEF2F8; --ke: #DCE4EF; --chu: #101A28; --chu-phu: #5B6475;
    --chu-cam: #A8541A; --loi: #C0392B; --tot: #1E7D4A; --vien-nut: #071C31; --o-nen: #FFFFFF; --o-vien: #5B6475;
    --vien-the: #DCE4EF; --bong-the: 0 1px 3px rgba(16, 26, 40, .06);
    color-scheme: light;
  }
}

/* ---------- Nền tảng ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--nen); color: var(--chu); font-family: 'Be Vietnam Pro', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 100%; line-height: 1.5; }
body { padding: 12px 16px calc(var(--cao-thanh) + 24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
body.rong { max-width: 1400px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 1.25rem; } h2 { font-size: 1.125rem; } h3 { font-size: 1rem; }
p { margin: 8px 0; }
[hidden] { display: none !important; }
.phu { color: var(--chu-phu); font-size: 0.875rem; }
.so { font-variant-numeric: tabular-nums; }
.gach { text-decoration: line-through; color: var(--chu-phu); }
.trong-rong { color: var(--chu-phu); font-size: 0.9375rem; }
a { color: var(--chu-cam); text-decoration: underline; }

/* Icon nét SVG (icon.svg, Lucide) */
.ic { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.25em; }
.ic-to { width: 1.75em; height: 1.75em; }

/* ---------- NÚT: mọi button viền 1,5px (Tối trắng · Sáng navy), vùng bấm ≥ 44px ----------
   Viền vẽ bằng box-shadow inset 1.5px: Chromium (Chrome Android) làm tròn border 1,5px xuống 1px,
   đo bằng điểm ảnh 03/10/2026 — box-shadow inset hiện đúng 1,5px (3 điểm ảnh ở DPR 2, 4,5 ở DPR 3). */
button { --vien: inset 0 0 0 1.5px var(--vien-nut);
  -webkit-tap-highlight-color: transparent;   /* bỏ ô xanh mặc định khi chạm (Chrome Android); vòng focus cam vẫn giữ */
  font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; border-radius: var(--bo); border: 0; box-shadow: var(--vien); background: transparent; color: var(--chu);
  padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.3; text-align: center; }
button.chinh, button.tot { background: var(--cam); color: var(--navy); }          /* nút chính: nền cam, chữ/icon navy */
button.xau { background: transparent; color: var(--loi); }                       /* nút nguy hiểm: nền trong suốt, chữ màu lỗi */
button.nho { padding: 8px 12px; font-size: 0.9375rem; }
button:disabled { opacity: .6; cursor: not-allowed; }
/* Nút icon (con mắt, chuông…): 44×44 cố định, KHÔNG bao giờ phình theo kiểu nút khối */
button.nut-icon { width: 44px !important; height: 44px; min-width: 44px; max-width: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; gap: 0; }                            /* khoá: giữ viền, mờ 60% */
button[aria-busy="true"] { cursor: progress; }
:is(button, input, select, textarea, a, [tabindex]):focus-visible { outline: 2px solid #E88031; outline-offset: 2px; }   /* focus vòng cam, ngoài viền 2px */

/* ---------- Ô NHẬP: nhãn luôn trên ô, chữ ≥ 16px, cao ≥ 44px ---------- */
input, select, textarea { font: inherit; font-size: 1rem; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--o-vien); background: var(--o-nen); color: var(--chu); margin: 4px 0 12px; }
input::placeholder, textarea::placeholder { color: var(--chu-phu); opacity: 1; }
input:disabled, select:disabled, textarea:disabled { background: var(--the-phu); }
label { display: block; font-size: 0.875rem; color: var(--chu-phu); font-weight: 500; }
/* Ô PIN có nút con mắt: nút icon 44×44 nằm BÊN PHẢI TRONG ô; ô chừa chỗ bên phải.
   Lỗi 2.0.7: quy tắc nút khối rộng 100% đè lên nút con mắt -> che kín ô PIN. Nay nút icon có kích thước cố định, độ ưu tiên cao. */
.o-pin { position: relative; margin: 4px 0 12px; }                 /* lề nằm ở khung -> khung cao đúng bằng ô, con mắt căn giữa ô */
.o-pin > input { padding-right: 56px; margin: 0; display: block; }
.o-pin > button.hien-an.nut-icon { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); margin: 0; border-radius: 10px; }
.loi-o { color: var(--loi); font-size: 0.875rem; display: flex; gap: 6px; align-items: flex-start; margin: -6px 0 10px; }

/* ---------- Thẻ, hộp, thông báo (không phải button -> viền mảnh) ---------- */
.the { background: var(--the); border: 1px solid var(--ke); border-radius: 14px; padding: 14px; margin: 10px 0; }
.hop { background: var(--the); border: 1px solid var(--ke); border-radius: 14px; padding: 14px; margin: 10px 0; }
.hop .nut { display: flex; gap: 8px; margin-top: 4px; }
.hop .nut button { flex: 1; }
.dau { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb { white-space: pre-line; border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--the); border: 1px solid var(--ke); display: flex; gap: 10px; align-items: flex-start; }
.tb.ok { border-color: var(--tot); }  .tb.ok .ic { color: var(--tot); }
.tb.loi { border-color: var(--loi); } .tb.loi .ic { color: var(--loi); }
.tb.cho .ic { color: var(--chu-phu); }
.canh-do { background: var(--the); border: 1px solid var(--loi); border-left-width: 4px; border-radius: 12px; padding: 12px; margin: 10px 0; }
.canh-vang { background: var(--the); border: 1px solid var(--chu-cam); border-left-width: 4px; border-radius: 12px; padding: 12px; margin: 10px 0; }
.trang-thai { text-align: center; padding: 20px 12px; color: var(--chu-phu); }
.trang-thai .ic { width: 2em; height: 2em; display: block; margin: 0 auto 8px; }
.trang-thai.loi { color: var(--loi); }

/* Nhãn trạng thái: luôn có chữ + chấm (không chỉ dùng màu) */
.nhan { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 500; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.nhan::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.n-tot { color: var(--tot); } .n-canh { color: var(--chu-cam); } .n-xau { color: var(--loi); } .n-tt { color: var(--chu); } .n-xam { color: var(--chu-phu); }

.doan { border-top: 1px dashed var(--ke); padding: 8px 0; }
.doan:first-child { border-top: 0; }
.dong { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--ke); }
.dong:last-child { border-bottom: 0; }

/* ---------- Đầu trang app ---------- */
.dau-app { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; min-height: 48px; }
.dau-app h1 { margin: 0; font-size: 1.125rem; }
.nut-tron { border-radius: 50%; position: relative; }
.cham-so { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--cam); color: var(--navy); font-size: 0.75rem; font-weight: 700; line-height: 20px; text-align: center; }

/* ---------- Màn chấm công ---------- */
.luoi { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.luoi .to { min-height: 72px; font-size: 1.125rem; font-weight: 700; flex-direction: column; gap: 4px; }
.luoi-phu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ly-do-khoa { font-size: 0.875rem; color: var(--chu-phu); margin: 4px 0 0; }
.ds-don { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.ds-don button { justify-content: flex-start; text-align: left; font-weight: 500; }
.chon-diem { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.chon-diem button { min-height: 48px; justify-content: flex-start; text-align: left; }
.ca-nghi label { display: flex; gap: 10px; align-items: center; color: var(--chu); font-size: 1rem; min-height: 44px; }
.ca-nghi input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--cam); }

/* Nút chọn (khoảng ngày, giao diện): đang chọn = nền cam, chữ navy */
.chon-khoang { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chon-khoang button { padding: 8px 12px; font-weight: 500; }
.chon-khoang button[aria-pressed="true"] { background: var(--cam); color: var(--navy); font-weight: 700; }

/* ---------- Thanh điều hướng dưới: cố định, 5 mục, mục giữa là nút cam nổi ---------- */
.dieu-huong { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--nen); border-top: 1px solid var(--ke); padding: 4px 8px env(safe-area-inset-bottom); }
.dieu-huong .trong { display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; max-width: 560px; margin: 0 auto; height: var(--cao-thanh); }
.dieu-huong .muc { border: 0; box-shadow: none; background: transparent; border-radius: 10px; color: var(--chu-phu); font-size: 0.75rem; font-weight: 500; flex-direction: column; gap: 2px; padding: 6px 2px; min-height: 56px; }
.dieu-huong .muc .ic { width: 24px; height: 24px; }
.dieu-huong .muc[aria-current="page"] { color: var(--chu-cam); font-weight: 600; }   /* đang chọn: chỉ đổi chữ + icon cam */
.dieu-huong .giua { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.75rem; color: var(--chu-phu); padding-bottom: 6px; }
.dieu-huong .giua[data-chon] { color: var(--chu-cam); font-weight: 600; }
.dieu-huong .noi { width: 60px; height: 60px; border-radius: 50%; padding: 0; margin-top: -26px; background: var(--cam); color: var(--navy); box-shadow: var(--vien), 0 4px 14px rgba(0,0,0,.25); }
.dieu-huong .noi .ic { width: 28px; height: 28px; }

/* ---------- Đăng nhập — bố cục học theo Chấm Công V2 (logo · tên · bàn phím số PIN), nét theo 4C ---------- */
.dang-nhap { max-width: 400px; margin: 4vh auto 0; }
.dang-nhap .the button[type=submit] { width: 100%; }
.hieu { text-align: center; margin: 0 0 20px; }
.hieu .logo { width: 96px; height: 96px; border-radius: 24px; background: #FFFFFF; border: 1px solid var(--ke); display: block; margin: 0 auto 14px; object-fit: contain; }
.hieu h1 { font-size: 1.5rem; margin: 0 0 2px; }
.hieu .phu { margin: 0; }
.dau-pin { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.nhan-o { font-size: 0.875rem; color: var(--chu-phu); font-weight: 500; }
.an-mat { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; }
/* 6 chấm PIN: không phải button -> không viền 1,5px; chấm đã gõ tô màu chữ, chưa gõ chỉ có vòng màu chữ phụ (không chỉ dựa vào màu: số chấm đặc = số đã gõ, có chữ cho máy đọc màn hình) */
.cham-pin { display: flex; justify-content: center; gap: 14px; min-height: 28px; align-items: center; margin: 6px 0 14px; }
.cham-pin i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--chu-phu); font-style: normal; display: inline-flex; align-items: center; justify-content: center; }
.cham-pin i.day { background: var(--chu); border-color: var(--chu); }
.cham-pin.hien i { width: auto; height: auto; min-width: 18px; border: 0; border-radius: 0; background: none; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cham-pin.hien i:not(.day)::before { content: '–'; color: var(--chu-phu); }
.ban-so { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ban-so .phim { min-height: 56px; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ban-so .phim .ic { width: 26px; height: 26px; }
.ban-so .phim.chinh { font-size: 1.0625rem; gap: 6px; }
.ban-so .phim.chinh .ic { width: 22px; height: 22px; }

/* ---------- Màn đầu (Trang chủ) — bố cục màn HÔM NAY của Chấm Công V2 ---------- */
.dau-app .ai { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dau-app .ai > div { min-width: 0; }
.chu-dau { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--the); border: 1px solid var(--ke); color: var(--chu-cam); font-weight: 700; font-size: 1.125rem; display: inline-flex; align-items: center; justify-content: center; }
.chu-dau:empty { display: none; }
.the-gio { text-align: center; }
.dong-ho { font-size: 2.75rem; font-weight: 700; line-height: 1.1; letter-spacing: 0; }
.the-gio .nhan { margin: 8px 0 4px; }
/* Vòng giờ công nằm CẠNH ô thông tin (không xếp chồng) để nút chấm hiện ngay màn đầu, không bị thanh dưới che */
.tt-hang { display: grid; grid-template-columns: 124px 1fr; gap: 14px; align-items: center; margin: 10px 0 0; text-align: left; }
.vong:empty { display: none; }
.vong svg { width: 124px; height: 124px; display: block; }
.the-gio > .phu#vongGhi { margin: 8px 0 0; }
.vong .vong-giua { fill: var(--chu); font-family: inherit; font-weight: 700; font-size: 26px; }
.vong .vong-phu { fill: var(--chu-phu); font-family: inherit; font-size: 13px; }
.luoi-tt { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; text-align: left; min-width: 0; }
.luoi-tt div { min-width: 0; }
.luoi-tt dt { font-size: 0.8125rem; color: var(--chu-phu); }
.luoi-tt dd { margin: 2px 0 0; font-weight: 600; white-space: pre-line; font-variant-numeric: tabular-nums; }
.luoi-ba { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.luoi-ba button { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: 0.9375rem; min-height: 64px; }
.o-thang { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.o-thang .rong-het { grid-column: 1 / -1; }
.o-thang > div { background: var(--the-phu); border: 1px solid var(--ke); border-radius: 12px; padding: 10px; min-width: 0; }
.o-thang b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.o-thang span { font-size: 0.8125rem; color: var(--chu-phu); }
.dong-viec { width: 100%; justify-content: space-between; text-align: left; font-weight: 500; margin: 6px 0 0; }
.dong-viec > span { display: inline-flex; align-items: center; gap: 10px; }
.dong-thoi-gian { list-style: none; margin: 4px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--ke); }
.dong-thoi-gian li { position: relative; padding: 8px 0; }
.dong-thoi-gian li::before { content: ''; position: absolute; left: -25px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--chu-phu); border: 2px solid var(--the); }
.dong-thoi-gian li.co-phat::before { background: var(--loi); }
.dong-thoi-gian .nhan { margin-top: 4px; }

/* ---------- Cài đặt ---------- */
.cai-dat .dong { align-items: center; }
.cai-dat h3 { margin-top: 4px; }
.cot-nut { display: flex; flex-direction: column; gap: 10px; }
.mo-rong { width: 100%; justify-content: space-between; }
.mo-rong > span { display: inline-flex; align-items: center; gap: 10px; }
.mo-rong[aria-expanded="true"] > .ic { transform: rotate(90deg); }
#fDoiPin2 { margin-top: 16px; }

/* ---------- THOÁNG HƠN (anh Chung 04/10/2026: "chưa thoáng, hiện đại") ----------
   Vẫn đúng 4C: nút giữ viền 1,5px; thẻ không phải nút -> Tối bỏ viền (tách nền bằng màu thẻ), Sáng viền mảnh màu đường kẻ.
   Khoảng cách theo bậc 8 · 12 · 16 · 24; bo góc thẻ 18px; tiêu đề trang to hơn, nhãn mục màu chữ phụ. */
.the, .hop { border: 1px solid var(--vien-the); box-shadow: var(--bong-the); border-radius: 18px; padding: 18px; margin: 0 0 16px; }
.tb { border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; border-color: var(--vien-the); box-shadow: var(--bong-the); }
.tb.ok { border-left: 4px solid var(--tot); } .tb.loi { border-left: 4px solid var(--loi); }
.canh-do, .canh-vang { border-width: 0 0 0 4px; border-radius: 14px; padding: 14px 16px; margin: 0 0 16px; box-shadow: var(--bong-the); }
.dau-app { margin: 4px 0 20px; }
section > h2 { font-size: 1.375rem; margin: 4px 0 16px; }
section > h3 { color: var(--chu-phu); font-size: 0.9375rem; font-weight: 600; margin: 24px 0 10px; }
.the h3, .hop h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 12px; }
.the > .dau, .hop > .dau { margin-bottom: 4px; }
.dong { padding: 12px 0; }
.doan { padding: 12px 0; }
.the-gio { padding: 22px 18px 18px; }
.luoi { gap: 12px; margin: 0 0 12px; }
.luoi .to { min-height: 76px; border-radius: 18px; }
.luoi-ba { gap: 10px; }
.luoi-ba button { border-radius: 16px; }
.ly-do-khoa { margin: 10px 2px 16px; }
.o-thang { gap: 10px; margin: 4px 0 12px; }
.o-thang > div { border: 0; border-radius: 14px; padding: 12px 14px; }
.o-thang b { font-size: 1.375rem; }
.dong-viec { border-radius: 14px; }
/* Gửi đơn mới: 8 loại thành ô biểu tượng 4 cột (thay 8 nút khối 2 cột) */
.ds-don { grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 8px; }
.ds-don button { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 12px 4px; min-height: 84px; font-size: 0.875rem; font-weight: 500; line-height: 1.25; border-radius: 16px; }
.ds-don button .ic { width: 24px; height: 24px; color: var(--chu-cam); }
.ds-don button > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* Chọn khoảng ngày (Giờ công): một dòng, vuốt ngang TRONG khung (thân trang không cuộn ngang) */
#gcKhoang { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 4px 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#gcKhoang::-webkit-scrollbar { display: none; }
#gcKhoang button { flex: 0 0 auto; border-radius: 999px; padding: 8px 16px; }
.so-lon { font-size: 2.5rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.gc-dau { padding: 4px 0 12px; }
/* Thanh dưới: nền thẻ, chữ nhãn đủ chỗ một dòng */
.dieu-huong { background: var(--the); }   /* 4C: thanh dưới giữ 1 đường kẻ mảnh phía trên (var(--ke)) */
/* Đang gõ chữ (bàn phím ảo bật) -> ẩn thanh dưới: trên Android thanh cố định bị đẩy lên trên bàn phím và che ô / nút đang dùng */
body:has(#khung :is(input:not([type=checkbox]):not([type=radio]), textarea, select):focus) .dieu-huong { display: none; }
.dieu-huong .muc, .dieu-huong .giua { white-space: nowrap; }

/* ---------- Trang quản lý ---------- */
.bo-cuc { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.menu { position: sticky; top: 12px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.menu button { justify-content: flex-start; font-weight: 500; }
.menu button[aria-current="page"] { background: var(--cam); color: var(--navy); font-weight: 700; }
.bang { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.bang th, .bang td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--ke); vertical-align: top; }
.bang th { color: var(--chu-phu); font-weight: 600; font-size: 0.8125rem; }
.bang tr.bam { cursor: pointer; }
.bang tr.bam:hover td { background: var(--the-phu); }
.tong-quan { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.o-so { background: var(--the); border: 1px solid var(--ke); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.o-so .gt { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.phu-nen { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; z-index: 20; overflow: auto; }
.phu-nen .hop { max-width: 720px; width: 100%; background: var(--nen); }
.hang { display: flex; gap: 8px; flex-wrap: wrap; }
.hang > * { flex: 1; min-width: 140px; }
.dau-trang { min-height: 48px; }

@media (max-width: 820px) {
  .bo-cuc { grid-template-columns: 1fr; }
  .menu { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .menu button { white-space: nowrap; padding: 8px 12px; font-size: 0.875rem; }
  .an-hep { display: none; }
}
/* ---------- Điện thoại: bảng thành thẻ, form một cột ---------- */
@media (max-width: 640px) {
  body { padding-left: 16px; padding-right: 16px; }
  body.rong { padding-left: 12px; padding-right: 12px; }
  .dau-trang h1 { font-size: 1rem; }
  .dau-trang .phu { font-size: 0.8125rem; }
  .the, .hop { padding: 12px; }
  .bang thead { display: none; }
  .bang, .bang tbody, .bang tr, .bang td { display: block; width: 100%; }
  .bang tr { padding: 10px 0; border-bottom: 1px solid var(--ke); }
  .bang tr:last-child { border-bottom: 0; }
  .bang td { border: 0; padding: 3px 0; }
  .bang td[data-nhan] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; }
  .bang td[data-nhan]::before { content: attr(data-nhan); color: var(--chu-phu); font-size: 0.8125rem; text-align: left; flex: 0 0 auto; max-width: 45%; }
  .bang td:first-child { font-size: 1rem; padding-bottom: 6px; }
  .bang td:empty { display: none; }
  .tong-quan { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .o-so { padding: 8px 10px; }
  .o-so .gt { font-size: 1.25rem; }
  .o-so .phu { font-size: 0.8125rem; }
  .phu-nen .hang > div { flex-basis: 100%; }
  .phu-nen { padding: 3vh 8px; }
}
