/* ===== Thành phần bổ sung (v2) ===== */
.txt-danger { color: #ff9d97; } .txt-warn { color: #ffd28e; } .txt-ok { color: #8ff0b8; } .txt-leader { color: #ffd76a !important; }
.pill.leader { background: rgba(255, 210, 90, .2); color: #ffe08a; border: 1px solid rgba(255, 210, 90, .45); height: 24px; font-size: 12px; padding: 0 8px; }
.pill.ext { background: rgba(255, 181, 71, .25); color: #ffd28e; }
.taxi-chip { color: #ffe08a; }
.ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.ext-box { margin-top: 18px; padding: 18px; border-radius: var(--r-md); border: 1.5px solid rgba(255,181,71,.6); background: rgba(255,181,71,.1); }
.ext-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.opt-sec { padding: 16px; border-radius: var(--r-md); background: rgba(255,255,255,.05); border: 1px solid var(--line); margin-bottom: 12px; }
.opt-sec h4 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 18px; }
.sec-title.small { font-size: 14px; margin: 4px 4px 10px; color: var(--muted); }
.nreq { padding: 14px; border-radius: 16px; background: rgba(181, 140, 255, .12); border: 1px solid rgba(181, 140, 255, .35); }
.kpi-banner { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: var(--r-md); }
.kpi-banner b { font-size: 18px; }
.drv-admin { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,255,255,.06); border: 1px solid var(--line); flex-wrap: wrap; }
.drv-admin.off { opacity: .55; }
.drv-admin .ord { display: flex; flex-direction: column; gap: 4px; }
.drv-admin .ord .icon-btn { width: 34px; height: 30px; border-radius: 10px; }
.theme-float { position: fixed; top: 18px; right: 18px; z-index: 5; }

/* ===== GIAO DIỆN SÁNG ===== */
:root[data-theme="light"] {
  --text: #0b2545;
  --muted: rgba(11, 37, 69, .66);
  --faint: rgba(11, 37, 69, .42);
  --line: rgba(11, 37, 69, .12);
  --glass-a: rgba(255, 255, 255, .78);
  --glass-b: rgba(255, 255, 255, .5);
  --glass-brd: rgba(255, 255, 255, .95);
  --shadow: 0 14px 40px rgba(20, 60, 120, .14);
  --ok: #18a558; --warn: #d98400; --danger: #e0352b; --info: #0a7bbf; --purple: #7c4ddb;
}
:root[data-theme="light"] body {
  background: radial-gradient(1100px 700px at 85% -10%, #b9d8ff 0%, transparent 60%),
              radial-gradient(900px 700px at -10% 110%, #c7f0ec 0%, transparent 55%),
              linear-gradient(160deg, #f4f8ff, #e6f0fd 50%, #dbe8fa);
  background-attachment: fixed;
}
:root[data-theme="light"] .glass { box-shadow: inset 0 1px 0 #fff, var(--shadow); }
:root[data-theme="light"] .glass::before { background: linear-gradient(160deg, rgba(255,255,255,.9), transparent 30%, transparent 70%, rgba(255,255,255,.5)); }
:root[data-theme="light"] .btn { color: var(--text); background: linear-gradient(150deg, rgba(255,255,255,.95), rgba(255,255,255,.65)); border-color: rgba(11,37,69,.12); box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(20,60,120,.1); }
:root[data-theme="light"] .btn.primary, :root[data-theme="light"] .btn.ok, :root[data-theme="light"] .btn.danger { color: #fff; border-color: transparent; }
:root[data-theme="light"] .btn.primary { background: linear-gradient(150deg, #3ea2ff, #0a5fd0); }
:root[data-theme="light"] .btn.ok { background: linear-gradient(150deg, #3ee08a, #12a058); }
:root[data-theme="light"] .btn.danger { background: linear-gradient(150deg, #ff6b62, #d42a3c); }
:root[data-theme="light"] .btn.warn { background: linear-gradient(150deg, #ffc35c, #f0960f); color: #2a1800; border-color: transparent; }
:root[data-theme="light"] .btn.ghost { background: rgba(255,255,255,.45); }
:root[data-theme="light"] .icon-btn { background: rgba(255,255,255,.7); border-color: rgba(11,37,69,.12); }
:root[data-theme="light"] .icon-btn:hover { background: rgba(255,255,255,.95); }
/* Chỉ tô nền khi rê chuột thật (máy tính); điện thoại không giữ trạng thái hover sau khi chạm */
@media (hover: hover) { :root[data-theme="light"] .nav-item:not(.active):hover { background: rgba(255,255,255,.95); color: var(--text); } }
:root[data-theme="light"] .nav-item.active, :root[data-theme="light"] .nav-item.active:hover { color: #fff; background: linear-gradient(150deg, #3ea2ff, #0a5fd0); border-color: rgba(255,255,255,.7); box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 6px 16px rgba(10, 95, 208, .35); }
:root[data-theme="light"] .me-chip { background: rgba(255,255,255,.7); }
:root[data-theme="light"] .quick-btn { color: var(--text); background: linear-gradient(140deg, rgba(255,255,255,.85), rgba(255,255,255,.55)); border-color: #fff; }
:root[data-theme="light"] .inp, :root[data-theme="light"] .sel { background: rgba(255,255,255,.8); border-color: rgba(11,37,69,.16); }
:root[data-theme="light"] input[type=date].inp, :root[data-theme="light"] input[type=time].inp { color-scheme: light; }
:root[data-theme="light"] .sel option, :root[data-theme="light"] .sel optgroup { background: #fff; color: #0b2545; }
:root[data-theme="light"] .seg { background: rgba(255,255,255,.55); }
:root[data-theme="light"] .chip { background: rgba(255,255,255,.75); }
:root[data-theme="light"] .dept { background: hsla(var(--h), 85%, 55%, .16); border-color: hsla(var(--h), 70%, 45%, .35); color: hsl(var(--h), 75%, 28%); }
:root[data-theme="light"] .pill.st-planned { background: rgba(10, 110, 220, .12); color: #0a5fb8; }
:root[data-theme="light"] .pill.st-started { background: rgba(230, 140, 0, .16); color: #9a5a00; }
:root[data-theme="light"] .pill.st-done { background: rgba(20, 160, 80, .14); color: #0d7a3e; }
:root[data-theme="light"] .pill.st-cancelled, :root[data-theme="light"] .pill.danger { background: rgba(220, 50, 40, .12); color: #b3261e; }
:root[data-theme="light"] .pill.pending { background: rgba(124, 77, 219, .13); color: #5b2fb8; }
:root[data-theme="light"] .pill.backup, :root[data-theme="light"] .pill.warn, :root[data-theme="light"] .pill.ext { background: rgba(230, 140, 0, .14); color: #8a5000; border-color: rgba(200,120,0,.45); }
:root[data-theme="light"] .pill.leader { background: rgba(230, 170, 0, .16); color: #7a5600; border-color: rgba(200,150,0,.4); }
:root[data-theme="light"] .taxi-chip { color: #8a6400; }
:root[data-theme="light"] .txt-danger { color: #c62828; }
:root[data-theme="light"] .txt-warn { color: #9a5a00; }
:root[data-theme="light"] .txt-ok { color: #0d7a3e; }
:root[data-theme="light"] .txt-leader { color: #8a6400 !important; }
:root[data-theme="light"] .flag { color: #9a5a00; }
:root[data-theme="light"] .diff-from { color: #c62828; }
:root[data-theme="light"] .diff-to { color: #0d7a3e; }
:root[data-theme="light"] .tag.new { color: #0d7a3e; }
:root[data-theme="light"] .tag.update { color: #0a5fb8; }
:root[data-theme="light"] .tag.keep { color: #5b2fb8; }
:root[data-theme="light"] .tag.remove { color: #b3261e; }
:root[data-theme="light"] .trip, :root[data-theme="light"] .stop, :root[data-theme="light"] .req,
:root[data-theme="light"] .opt-sec, :root[data-theme="light"] .drv-admin, :root[data-theme="light"] .folder-note { background: rgba(255,255,255,.6); border-color: rgba(11,37,69,.1); }
:root[data-theme="light"] .trip:hover { background: rgba(255,255,255,.92); }
:root[data-theme="light"] .tile .ti { color: color-mix(in srgb, var(--c) 70%, #000); }
:root[data-theme="light"] .modal { background: linear-gradient(150deg, rgba(250,252,255,.96), rgba(232,241,253,.96)); }
:root[data-theme="light"] .modal-wrap { background: rgba(30, 50, 90, .28); }
:root[data-theme="light"] .notif-panel { background: linear-gradient(150deg, rgba(250,252,255,.97), rgba(232,241,253,.97)); }
:root[data-theme="light"] .notif:hover { background: rgba(11,37,69,.05); }
:root[data-theme="light"] .notif.unread { background: rgba(10, 110, 220, .08); }
:root[data-theme="light"] .nreq { background: rgba(124, 77, 219, .07); border-color: rgba(124, 77, 219, .3); }
:root[data-theme="light"] .toast { color: #0b2545; background: linear-gradient(140deg, rgba(255,255,255,.97), rgba(235,243,255,.97)); }
:root[data-theme="light"] .toast.t-error { color: #fff; background: linear-gradient(140deg, #e5484d, #b4232f); border-color: rgba(255,255,255,.5); }
:root[data-theme="light"] .toast.t-error .ic { color: #fff; }
:root[data-theme="light"] .toast.t-warn { border-color: rgba(220, 140, 0, .5); }
:root[data-theme="light"] .toast.t-warn .ic { color: #d98400; }
:root[data-theme="light"] .toast.t-ok .ic { color: #18a558; }
:root[data-theme="light"] .table th { background: rgba(240, 246, 255, .97); }
:root[data-theme="light"] .table td { border-bottom-color: rgba(11,37,69,.07); }
:root[data-theme="light"] .warn-box { background: rgba(230,140,0,.1); border-color: rgba(230,140,0,.4); }
:root[data-theme="light"] .danger-box { background: rgba(220,50,40,.08); border-color: rgba(220,50,40,.35); }
:root[data-theme="light"] .kbd { background: rgba(11,37,69,.08); }
:root[data-theme="light"] .dpick button { background: rgba(255,255,255,.6); }
:root[data-theme="light"] .dpick button.is-main { color: #fff; background: linear-gradient(150deg, #2f8cff, #1560c8); border-color: #1560c8; }
:root[data-theme="light"] .dpick button.is-main .txt-leader { color: #ffe08a !important; }
:root[data-theme="light"] .dpick button.is-main .role { background: rgba(255,255,255,.25); color: #fff; }
:root[data-theme="light"] .dpick button.is-backup .role { background: #b26a00; color: #fff; }
:root[data-theme="light"] .dpick button.is-main small { color: rgba(255,255,255,.85); }
:root[data-theme="light"] .ext-box, :root[data-theme="light"] .backup-box { background: rgba(230,140,0,.08); }
:root[data-theme="light"] .hero .count { color: #0a6fb0; }
:root[data-theme="light"] .avatar.none { background: rgba(11,37,69,.1); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(11,37,69,.2); background-clip: padding-box; }

/* ===== Chọn sheet khi import ===== */
.sheet-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sheet-opt { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); cursor: pointer; text-align: left; transition: .15s; }
.sheet-opt:hover { border-color: #67b6ff; background: rgba(90,170,255,.12); }
.sheet-opt .so-ic { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, #3ee08a, #12a058); }
.sheet-opt.bad .so-ic { background: linear-gradient(150deg, #8d9bb5, #4b5a78); }
.sheet-opt .so-txt { flex: 1; min-width: 0; }
.sheet-opt b { display: block; font-size: 17px; }
.sheet-opt small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.sheet-opt.bad small { color: var(--warn); }
:root[data-theme="light"] .sheet-opt { background: rgba(255,255,255,.65); }

/* ===== Rảnh từ / đến ===== */

/* ===== Cảnh báo mật khẩu mặc định ===== */
.pw-warn { display: flex; align-items: center; gap: 12px; margin: 10px 14px 0; padding: 10px 14px; border-radius: 16px; font-weight: 650;
  background: linear-gradient(140deg, rgba(255, 181, 71, .3), rgba(228, 138, 18, .18)); border: 1px solid rgba(255, 200, 120, .55); }
.pw-warn[hidden] { display: none; }
.pw-warn span { flex: 1; }
:root[data-theme="light"] .pw-warn { background: rgba(255, 180, 60, .18); border-color: rgba(220, 140, 0, .45); color: #6a4000; }
@media (max-width: 760px) { .pw-warn { margin: 8px 8px 0; font-size: 14px; padding: 8px 10px; } .pw-warn .btn { height: 36px; padding: 0 12px; font-size: 14px; } }

/* ===== Logo ứng dụng (ảnh) ===== */
.lg.has-img { background: none !important; padding: 0; overflow: hidden; box-shadow: 0 8px 22px rgba(0, 60, 160, .35) !important; }
.lg.has-img img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ===== Gợi ý cài ứng dụng ===== */
.install-slot:empty { display: none; }
.install-slot { margin: 10px 14px 0; }
.login-wrap .install-slot { width: min(520px, 100%); margin: 14px auto 0; }
.install-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; }
.install-banner img { width: 48px; height: 48px; border-radius: 13px; flex: none; box-shadow: 0 4px 12px rgba(0, 60, 160, .3); }
.install-banner .ib-txt { flex: 1; min-width: 0; }
.install-banner b { display: block; font-size: 15.5px; }
.install-banner small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.install-banner .btn { height: 40px; padding: 0 14px; font-size: 14.5px; }
.install-banner .icon-btn { width: 34px; height: 34px; }
.install-steps { margin: 4px 0; padding-left: 0; list-style: none; counter-reset: st; display: grid; gap: 10px; }
.install-steps li { counter-increment: st; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(90, 170, 255, .1); font-size: 16px; line-height: 1.4; }
.install-steps li::before { content: counter(st); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(150deg, #3ea2ff, #0a5fd0); }
@media (max-width: 760px) { .install-slot { margin: 8px 8px 0; } .install-banner small { display: none; } }

/* ===== Tour hướng dẫn ===== */
.tour { position: fixed; inset: 0; z-index: 120; animation: fade .2s; }
.tour.out { opacity: 0; transition: opacity .2s; }
.tour-block { position: absolute; inset: 0; }
.tour-hole { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(2, 12, 30, .62), 0 0 0 3px #4aa8ff, 0 0 24px 6px rgba(74, 168, 255, .55); transition: all .32s cubic-bezier(.3, .9, .3, 1); pointer-events: none; }
.tour-card { position: fixed; z-index: 2; width: min(400px, calc(100vw - 24px)); padding: 18px 18px 16px; border-radius: 22px; background: linear-gradient(150deg, rgba(40, 80, 140, .96), rgba(12, 32, 72, .97)); transition: top .3s, left .3s; }
.tour-card.center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tour-step { font-size: 12.5px; font-weight: 800; color: var(--info); letter-spacing: .05em; }
.tour-skip { background: none; border: 0; color: var(--muted); font-weight: 650; cursor: pointer; padding: 4px 6px; font-size: 14px; }
.tour-card h3 { margin: 0 0 8px; font-size: 19px; }
.tour-card p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--text); }
.tour-dots { display: flex; gap: 5px; flex-wrap: wrap; margin: 14px 0 12px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .25); transition: .2s; }
.tour-dots i.done { background: rgba(90, 170, 255, .6); }
.tour-dots i.on { width: 20px; background: #4aa8ff; }
.tour-btns { display: flex; justify-content: space-between; gap: 10px; }
.tour-btns .btn { height: 44px; }
:root[data-theme="light"] .tour-card { background: linear-gradient(150deg, rgba(255, 255, 255, .98), rgba(234, 243, 255, .98)); }
:root[data-theme="light"] .tour-dots i { background: rgba(11, 37, 69, .15); }
:root[data-theme="light"] .tour-dots i.done { background: rgba(10, 95, 208, .45); }
:root[data-theme="light"] .tour-dots i.on { background: #0a5fd0; }
:root[data-theme="light"] .tour-step { color: #0a5fd0; }
@media (max-width: 760px) { .tour-card { width: auto; } .tour-card.center { left: 10px; right: 10px; transform: translateY(-50%); } .tour-card h3 { font-size: 17px; } .tour-card p { font-size: 14.5px; } }

/* ===== Bật thông báo ===== */
.push-banner .pb-ic { width: 48px; height: 48px; border-radius: 13px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, #ffb547, #e8740c); box-shadow: 0 4px 12px rgba(230, 120, 0, .35); }

/* Sắp thứ tự người dùng */
.ord-btn { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; margin-right: 4px; }
.ord-btn[disabled] { opacity: .3; cursor: default; }
.table tr.grp-row td { background: rgba(90, 170, 255, .1); padding: 7px 12px; }
:root[data-theme="light"] .table tr.grp-row td { background: rgba(10, 95, 208, .06); }

/* ===== Ô nhập ngày dd/mm/yyyy ===== */
.date-field { position: relative; display: inline-flex; align-items: center; width: 100%; }
.date-field .df-text { padding-right: 48px; font-variant-numeric: tabular-nums; }
.date-field .df-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.date-field .df-btn:hover { background: rgba(90, 170, 255, .15); color: var(--text); }
.date-field .df-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.toolbar .date-field .df-text { min-height: 46px; }

/* ===== Chọn nhiều phòng ===== */
.ua-depts { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle { position: relative; height: 40px; padding: 0 16px; border-radius: 20px; border: 1.5px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); font-weight: 700; cursor: pointer; }
.chip-toggle:hover { border-color: #67b6ff; }
.chip-toggle.on { background: linear-gradient(150deg, #3ea2ff, #0a5fd0); color: #fff; border-color: transparent; padding-left: 34px; }
.chip-toggle.on::before { content: attr(data-order); position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.95); color: #0a5fd0; font-size: 12px; display: grid; place-items: center; }
.chip-toggle.add { border-style: dashed; color: var(--muted); }
:root[data-theme="light"] .chip-toggle { background: rgba(255,255,255,.75); }
:root[data-theme="light"] .chip-toggle.on { background: linear-gradient(150deg, #3ea2ff, #0a5fd0); color: #fff; }
.chip-toggle.plain.on { padding-left: 16px; }
.chip-toggle.plain.on::before { display: none; }

/* ===== Bảo trì ===== */
.maint-warn { background: linear-gradient(140deg, rgba(255, 140, 0, .28), rgba(228, 90, 18, .18)) !important; }

/* ---------- Gia hạn chờ duyệt ---------- */
.pill.ext.pend { background: repeating-linear-gradient(135deg, rgba(255,181,71,.35) 0 5px, rgba(255,181,71,.15) 5px 10px); }
.pill.ext.rej { background: rgba(255,90,82,.2); color: #ffb0ab; }
:root[data-theme="light"] .pill.ext.rej { color: #b3261e; border-color: rgba(200,40,30,.4); }
.ext-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ext-custom label { display: flex; align-items: center; gap: 6px; }
.ext-custom .inp { width: 84px; min-height: 52px; font-size: 20px; text-align: center; }
.info-box { padding: 14px 16px; border-radius: 16px; background: rgba(90,200,250,.12); border: 1px solid rgba(90,200,250,.4); }

/* ---------- Xác nhận đã xem ---------- */
.notif { align-items: center; }
.ack-btn { flex-shrink: 0; min-height: 40px; }
.ack-done { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ok, #34d17a); font-weight: 700; }
:root[data-theme="light"] .ack-done { color: #128a4a; }
.ack-st { display: inline-block; min-width: 22px; font-weight: 900; letter-spacing: -2px; margin-right: 4px; }
.ack-st.seen { color: #34d17a; } .ack-st.recv { color: #8a94a6; } .ack-st.none { color: #ff9f43; }
:root[data-theme="light"] .ack-st.seen { color: #128a4a; }
.ack-drv { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); }
.ack-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ack-head b { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ack-head .pill { flex: none; height: 24px; font-size: 12px; padding: 0 9px; }
.ack-line { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: baseline; column-gap: 6px; font-size: 13.5px; margin-top: 4px; text-align: left; }
.ack-line .al-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ack-line .al-t b { font-weight: 650; }
.ack-line .al-time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.ack-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: inherit; background: rgba(255,255,255,.06); }
.ack-chip span { font-weight: 700; } .ack-chip small { color: var(--muted); }
.ack-chip.late { border-color: #ff9f43; background: rgba(255,159,67,.14); }
.ack-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tbl-scroll { overflow-x: auto; }
.ack-table tr.ack-unseen td { background: rgba(255,159,67,.07); }
.seg-view { display: flex; max-width: 640px; }
.seg-view button { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: center; }
@media (max-width: 560px) { .seg-view button { font-size: 14px; padding-left: 6px; padding-right: 6px; } .seg-view button svg { display: none; } .ack-filters .sel, .ack-filters .inp { flex: 1 1 140px; width: auto !important; } }

/* ---------- Hoàn tác bấm nhầm ---------- */
.undo-box { margin-top: 16px; padding: 14px 16px; border-radius: var(--r-md); border: 1.5px solid rgba(255,159,67,.7); background: rgba(255,159,67,.12); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.undo-box > div { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; font-size: 16px; }

/* ---------- Bảo trì: khoá thao tác ---------- */
body.maint-lock .shell .big-btn, body.maint-lock .shell .btn.ok, body.maint-lock .shell .btn.primary, body.maint-lock .shell .btn.warn, body.maint-lock .shell .btn.danger,
body.maint-lock .modal-wrap .btn.ok, body.maint-lock .modal-wrap .btn.primary, body.maint-lock .modal-wrap .btn.warn, body.maint-lock .modal-wrap .btn.danger { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
body.maint-lock [data-maint-ok] .btn, body.maint-lock .btn[data-maint-ok], body.maint-lock .modal.acct .btn, body.maint-lock .modal.maint-pop .btn, body.maint-lock .notif-panel .btn, body.maint-lock .notif-pop .btn { opacity: 1; cursor: pointer; filter: none; }
.maint-warn { position: sticky; top: 0; z-index: 30; }
.maint-pop .maint-ic { width: 92px; height: 92px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(140deg, #ffb547, #e46a12); color: #fff; }
@media (max-width: 560px) {
  .ack-table tr:first-child { display: none; }
  .ack-table, .ack-table tbody, .ack-table tr, .ack-table td { display: block; width: 100%; }
  .ack-table tr { padding: 10px 4px; border-bottom: 1px solid var(--line); }
  .ack-table td { padding: 2px 0 !important; border: 0 !important; white-space: normal !important; }
  .ack-table td:nth-child(1) { font-size: 12.5px; color: var(--muted); }
  .ack-table td:nth-child(2) div { display: inline; margin-left: 6px; }
  .ack-table td:nth-child(5), .ack-table td:nth-child(6) { display: inline-block; width: auto; margin-right: 12px; font-size: 12.5px; color: var(--muted); }
  .ack-table td:nth-child(5)::before { content: 'Nhận: '; }
  .ack-table td:nth-child(6)::before { content: 'Xem: '; }
}
@media (max-width: 560px) { .tbl-scroll { overflow-x: visible; } .ack-table tr.ack-unseen { background: rgba(255,159,67,.08); } .ack-table tr.ack-unseen td { background: none !important; } }

/* ---------- Ô giờ: gõ tự do + bánh xe vuốt ---------- */
.time-field { position: relative; display: inline-flex; align-items: center; width: 100%; }
.time-field .tf-in { padding-right: 48px; font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; }
.time-field.open .tf-in { border-color: #3ea2ff; box-shadow: 0 0 0 3px rgba(62,162,255,.25); }
.time-field .tf-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.time-field .tf-pv { position: absolute; right: 48px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.time-field .tf-pv:empty { display: none; }
.tf-pv.ok { background: rgba(52,209,122,.18); color: #34d17a; }
.tf-pv.no { background: rgba(255,90,82,.18); color: #ff8a84; }
:root[data-theme="light"] .tf-pv.ok { color: #128a4a; } :root[data-theme="light"] .tf-pv.no { color: #c0281e; }
.tf-pop { position: fixed; z-index: 400; width: 230px; padding: 10px; border-radius: 20px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.28); }
:root[data-theme="light"] .tf-pop { background: rgba(255,255,255,.97); }
.tf-wheels { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; }
.tf-band { position: absolute; left: 6px; right: 6px; top: 44px; height: 44px; border-radius: 12px; background: rgba(62,162,255,.18); pointer-events: none; }
.tf-col { position: relative; z-index: 1; height: 132px; width: 76px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tf-col::-webkit-scrollbar { display: none; }
.tf-col div { height: 44px; line-height: 44px; text-align: center; font-size: 19px; color: var(--muted); scroll-snap-align: center; cursor: pointer; font-variant-numeric: tabular-nums; }
.tf-col div.on { color: var(--text); font-weight: 800; font-size: 24px; }
.tf-sep { position: relative; z-index: 1; font-size: 24px; }
.tf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }

/* ---------- Bản thử nghiệm ---------- */
.demo-ribbon { position: fixed; z-index: 1000; left: 50%; top: 0; transform: translateX(-50%); padding: 3px 14px; border-radius: 0 0 10px 10px; background: #e64a19; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; pointer-events: none; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

/* ---------- Trợ lý Điều Xe ---------- */
.ai-fab { position: fixed; z-index: 60; right: 22px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 18px 0 14px; border: 0; border-radius: 27px; cursor: pointer;
  background: linear-gradient(140deg, #3ea2ff, #0a5fd0); color: #fff; font-size: 16px; font-weight: 800; box-shadow: 0 10px 26px rgba(10,95,208,.45); }
.ai-fab:hover { filter: brightness(1.07); transform: translateY(-1px); }
.ai-panel { position: fixed; z-index: 70; right: 22px; bottom: 88px; width: 400px; max-width: calc(100vw - 24px); height: min(620px, calc(100dvh - 120px)); display: flex; flex-direction: column; border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; }
:root[data-theme="light"] .ai-panel { background: rgba(255,255,255,.97); }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.ai-head b { font-size: 16px; white-space: nowrap; }
.ai-head small { color: var(--muted); font-size: 11.5px; }
.ai-head .sp { flex: 1; }
.ai-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-msg { max-width: 92%; padding: 10px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg.me { align-self: flex-end; background: linear-gradient(140deg, #3ea2ff, #0a5fd0); color: #fff; border-bottom-right-radius: 6px; }
.ai-msg.bot { align-self: flex-start; background: rgba(255,255,255,.07); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
:root[data-theme="light"] .ai-msg.bot { background: #f2f7ff; }
.ai-day { margin: 8px 0 4px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.ai-trip { padding: 7px 9px; margin: 4px 0; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; background: rgba(255,255,255,.04); }
.ai-trip:hover { border-color: #3ea2ff; }
.ai-trip small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
:root[data-theme="light"] .ai-trip { background: #fff; }
.ai-free { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.ai-free:first-child { border-top: 0; }
.ai-free > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 120px; font-weight: 700; }
.ai-free b { color: #34d17a; } :root[data-theme="light"] .ai-free b { color: #128a4a; }
.ai-free.busy { opacity: .75; }
.ai-free .avatar { width: 22px; height: 22px; font-size: 10px; }
.ai-muted { color: var(--muted); font-size: 12.5px; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ai-chip { border: 1px solid rgba(62,162,255,.55); background: rgba(62,162,255,.1); color: inherit; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.ai-chip:hover { background: rgba(62,162,255,.2); }
.ai-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.ai-input .inp { flex: 1; min-height: 46px; }
.ai-input .btn { width: 50px; min-width: 50px; height: 46px; padding: 0; justify-content: center; }
@media (max-width: 760px) {
  .ai-fab { right: 14px; bottom: calc(92px + env(safe-area-inset-bottom)); height: 50px; padding: 0 14px 0 12px; font-size: 15px; }
  .ai-head small { display: none; }
  .ai-panel { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(88px + env(safe-area-inset-bottom)); height: calc(100dvh - 170px - env(safe-area-inset-bottom)); border-radius: 22px; }
}
.ai-msg ul { margin: 4px 0; padding-left: 18px; } .ai-msg li { margin: 2px 0; }
.ai-ref { display: inline-block; padding: 0 7px; border-radius: 7px; background: rgba(62,162,255,.18); border: 1px solid rgba(62,162,255,.5); font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ai-note { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ai-wait { color: var(--muted); font-style: italic; }
.ai-set { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }

/* Thanh bản quyền – nền sáng */
:root[data-theme="light"] .app-foot { background: rgba(255, 255, 255, .82); color: #5b6b82; border-top-color: rgba(10,40,90,.12); }

/* Thanh / bảng nổi phủ lên nội dung: nền đặc để chữ bên dưới không lộ lên (không dùng kính mờ cho nhẹ máy) */
.side.glass, .tf-pop { background: linear-gradient(150deg, #173f78, #0c2a57); }
.modal { background: linear-gradient(150deg, rgb(30, 66, 122), rgb(10, 30, 70)); }
.notif-panel { background: linear-gradient(150deg, rgb(30, 66, 122), rgb(10, 30, 70)); }
.toast { background: linear-gradient(140deg, rgb(32, 76, 140), rgb(15, 40, 90)); }
.ai-panel { background: rgb(14, 40, 82); }
:root[data-theme="light"] .side.glass, :root[data-theme="light"] .tf-pop { background: linear-gradient(150deg, #ffffff, #eef4fd); }
:root[data-theme="light"] .modal, :root[data-theme="light"] .notif-panel { background: linear-gradient(150deg, #fafcff, #e8f1fd); }
:root[data-theme="light"] .toast { background: linear-gradient(140deg, #ffffff, #ebf3ff); }
:root[data-theme="light"] .ai-panel { background: #ffffff; }

/* Quản trị – Phòng ban & tên gọi: mỗi phòng / tài xế 1 dòng */
.dept-list { display: grid; gap: 6px; }
.dept-row { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.2fr) 40px; gap: 10px; align-items: center; }
.dept-row .chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dept-row .inp { min-height: 40px; height: 40px; }
.dept-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 2px; }
.dept-row.drv-al { grid-template-columns: 32px 150px minmax(0, 1fr); }
.dept-row.drv-al b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .dept-head { display: none; }
  .dept-row { grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 6px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .dept-row > .chip { grid-column: 1; grid-row: 1; }
  .dept-row [data-dn] { grid-column: 2; grid-row: 1; }
  .dept-row [data-ddel] { grid-column: 3; grid-row: 1; width: 36px; height: 36px; }
  .dept-row [data-da] { grid-column: 2 / 4; grid-row: 2; }
  .card-head .btn:not(.btn-lg) { height: auto; min-height: 36px; padding: 4px 12px; font-size: 14px; gap: 6px; }
  .dept-row.drv-al { grid-template-columns: 32px minmax(0, 1fr); }
  .dept-row.drv-al [data-dra] { grid-column: 1 / -1; }
  .dept-row .inp { min-height: 38px; height: 38px; font-size: 14px; }
}

/* Hộp thoại chuyển tài xế trống sang lịch đang đi Taxi */
.taxi-swap { display: grid; gap: 8px; }
.ts-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; }
.ts-item input { width: 22px; height: 22px; margin-top: 14px; }
.ts-item:has(input:checked) { border-color: var(--info); background: rgba(90, 170, 255, .1); }
.ts-item.off { opacity: .45; cursor: not-allowed; }
.ts-item .trip { cursor: inherit; margin: 0; }
.ts-act { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
:root[data-theme="light"] .ts-item:has(input:checked) { border-color: #1560c8; background: rgba(21, 96, 200, .06); }
