/* ===== 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-mark { position: absolute; right: 6px; bottom: 4px; font-style: normal; font-size: 11px; font-weight: 800; background: rgba(0,0,0,.35); padding: 1px 5px; border-radius: 6px; }
.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"] .bg-blobs i:nth-child(1) { background: #7fb6ff; opacity: .45; }
:root[data-theme="light"] .bg-blobs i:nth-child(2) { background: #6fe0d5; opacity: .3; }
:root[data-theme="light"] .bg-blobs i:nth-child(3) { background: #ff9aa8; opacity: .2; }
: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"] .next-card, :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, :root[data-theme="light"] .next-card: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.main { color: #fff; }
:root[data-theme="light"] .dpick button.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; }
:root[data-theme="light"] .ext-mark { background: rgba(255,255,255,.85); color: #8a5000; }

/* ===== 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 ===== */
.free-line { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 12px; font-size: 14px; font-weight: 700; background: rgba(52, 209, 122, .14); color: #8ff0b8; }
.free-line.busy { background: rgba(90, 170, 255, .14); color: #a9d4ff; }
:root[data-theme="light"] .free-line { color: #0d7a3e; background: rgba(20, 160, 80, .1); }
:root[data-theme="light"] .free-line.busy { color: #0a5fb8; background: rgba(10, 110, 220, .08); }

/* ===== 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; } }
