/* VT37 App — giao diện vận hành cho điện thoại. Chữ lớn, nút to, tương phản cao. */
:root {
  /* Tông giản dị kiểu Google (Material): nền sáng, viền mảnh, không đổ bóng nặng */
  --bg: #f8f9fa;
  --surface: #ffffff;
  --ink: #1f1f1f;
  --muted: #5f6368;
  --line: #e0e3e7;
  --road: #0b57d0;       /* xanh chủ đạo (nút chính, link) */
  --road-dark: #041e49;
  --navy: #0f2747;       /* navy VT37 */
  --tonal: #e8f0fe;      /* nền mục đang chọn */
  --hover: #f1f3f4;
  --orange: #f29900;     /* cam thương hiệu — chỉ dùng cho chữ VT37 */
  --shadow: none;
  --side-w: 232px;
  /* Màu ngữ nghĩa dùng chung toàn hệ thống:
     xanh dương = thông tin / đang hoạt động; xanh lá = hoàn thành / tốt;
     cam = chờ / cần chú ý; đỏ = lỗi / quá hạn / khóa */
  --info: #0b57d0;
  --info-bg: #e8f0fe;
  --ok: #137333;
  --ok-bg: #e6f4ea;
  --warn: #b06000;
  --warn-bg: #fef7e0;
  --bad: #c5221f;
  --bad-bg: #fce8e6;
  --radius: 12px;
  --tap: 48px;
  font-size: 17px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Roboto, "Segoe UI", -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
}
a { color: var(--road); }
:focus-visible { outline: 3px solid #f2a900; outline-offset: 2px; }

/* Nội dung */

h1 { font-size: 1.5rem; line-height: 1.25; margin: 8px 0 16px; }
h2 { font-size: 1.15rem; margin: 24px 0 8px; }
.lead { color: var(--muted); margin-top: -8px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
}
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.head h1 { margin-bottom: 8px; }

/* Thông báo */
.flash { border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; border: 1px solid; }
.flash.success { background: var(--ok-bg); border-color: #a9d8b6; color: #10431f; }
.flash.error { background: var(--bad-bg); border-color: #f1b5af; color: #6e1510; }
.flash.warn { background: var(--warn-bg); border-color: #edd28a; color: #5a3b00; }
.flash.secret { background: var(--warn-bg); border: 2px solid #d99a00; color: #3d2800; }
.secret-value {
  display: block; margin-top: 8px; font-size: 1.4rem; font-weight: 700; letter-spacing: .08em;
  background: #fff; border: 1px dashed #b98500; border-radius: 8px; padding: 8px 12px;
  font-family: "Consolas", "Menlo", monospace; user-select: all; word-break: break-all;
}

/* Nút */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 18px; border-radius: var(--radius);
  border: 2px solid var(--road); background: var(--road); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--road); }
.btn.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 40px; padding: 0 12px; font-size: .92rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.inline { display: inline; margin: 0; }

/* Form */
.field { margin-bottom: 16px; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { display: block; color: var(--muted); font-size: .88rem; margin-top: 4px; }
.field .err { display: block; color: var(--bad); font-size: .9rem; margin-top: 4px; font-weight: 600; }
input[type=text], input[type=url], input:not([type]), input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select {
  width: 100%; min-height: var(--tap); padding: 8px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
}
input:focus, select:focus { border-color: var(--road); outline: none; }
.has-err input, .has-err select { border-color: var(--bad); }
.check { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); }
.check input { width: 24px; height: 24px; margin-top: 2px; flex: none; }
.suffix { display: flex; align-items: stretch; }
.suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.suffix span { display: flex; align-items: center; padding: 0 12px; background: #e3e9ed; border: 2px solid var(--line); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); white-space: nowrap; }
.grid2 { display: grid; gap: 0 16px; }
@media (min-width: 720px) { .grid2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px 0; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }

/* Bảng → thẻ trên điện thoại */
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 2px solid var(--line); }
.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 719px) {
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 6px 12px; }
  .list td { border: 0; padding: 6px 0; display: flex; gap: 12px; justify-content: space-between; text-align: right; }
  .list td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; flex: none; }
  .list td.row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .list td.row-actions::before { display: none; }
}
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.muted { background: #f1f3f4; color: var(--muted); }
.tag.info { background: var(--info-bg); color: var(--info); }
.mono { font-family: "Consolas", "Menlo", monospace; }
.empty { color: var(--muted); padding: 12px 0; }

/* Số liệu tổng quan */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--road); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--ink); }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; }
.stat.warn { border-left-color: #d99a00; }
.stat.ok { border-left-color: #1e8e3e; }
.stat.bad { border-left-color: var(--bad); }

/* Phân trang */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }

/* Trang đăng nhập */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 420px; }
.login-box .plate { margin: 0 auto 20px; align-items: center; display: flex; width: max-content; max-width: 100%; }
.login-box h1 { text-align: center; }
.login-box .btn { width: 100%; }

/* Bộ lọc */
.filters { display: grid; gap: 0 12px; }
@media (min-width: 720px) { .filters { grid-template-columns: repeat(3, 1fr); } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 0.2.0 */
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.detail { display: grid; gap: 4px 16px; grid-template-columns: max-content 1fr; margin: 0; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .detail { grid-template-columns: 1fr; } .detail dd { margin-bottom: 8px; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photos figure { margin: 0; }
.photos img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.photos figcaption { font-size: .8rem; color: var(--muted); }
textarea { width: 100%; min-height: 96px; padding: 8px 12px; font: inherit; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
textarea:focus { border-color: var(--road); outline: none; }
input[type=file] { font: inherit; max-width: 100%; }
input[type=datetime-local] { width: 100%; min-height: var(--tap); padding: 8px 12px; font: inherit; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; }
.lane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; }
.lane > header { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lane > header b { font-size: 1.05rem; }
.lane ul { list-style: none; margin: 0; padding: 4px 14px 10px; }
.lane li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.lane li:last-child { border-bottom: 0; }
.lane.over { border-color: var(--bad); }
.trip { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--road); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.trip.done { border-left-color: var(--ok); opacity: .8; }
.big-action { width: 100%; min-height: 60px; font-size: 1.15rem; }
.daynav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.daynav input { width: auto; }
.audit-detail { font-size: .9rem; }
.audit-detail dd { font-weight: 500; }
@media (max-width: 719px) { .list td .audit-detail { text-align: left; } }
.muted { color: var(--muted); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* 0.5.0: thông báo + cài app */
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { background: #fff; border: 1px solid var(--line, #dfe5ea); border-radius: var(--radius); margin-bottom: 8px; }
.notif-list li.unread { border-left: 4px solid #0b5394; }
.notif-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: inherit; text-decoration: none; }
.notif-list li.read b { font-weight: 600; color: var(--muted); }
.readonly-bar { background: #fff4d6; border-bottom: 1px solid #edd28a; color: #5a3b00; padding: 10px 16px; }
table.list td, table.list td .mono { overflow-wrap: anywhere; word-break: break-word; }

/* ===================== 0.6: khung giao diện kiểu Google ===================== */
[x-cloak] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }
.m-only { display: none !important; }
@media (max-width: 899px) { .m-only { display: flex !important; } .d-only { display: none !important; } }
.plate { display: inline-flex; flex-direction: column; justify-content: center; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; line-height: 1.15; min-width: 0; }
.plate b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
.plate small { font-size: .72rem; color: var(--muted); }

/* Nút, ô nhập, thẻ — giản dị */
.btn { border-radius: 999px; border-width: 1px; font-weight: 500; padding: 0 22px; }
.btn.ghost { border-color: var(--line); color: var(--road); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { border-color: var(--line); }
input[type=text], input[type=url], input:not([type]), input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input[type=datetime-local], select, textarea { border-width: 1px; border-color: #c4c7c5; border-radius: 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--road); box-shadow: 0 0 0 1px var(--road); }
.panel, .lane, .trip, .stat, .notif-list li { border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.stat { border-left: 1px solid var(--line); }
.trip { border-left-width: 1px; }
fieldset { border-color: var(--line); border-radius: 12px; }
.flash { border-radius: 8px; }
h1 { font-weight: 500; letter-spacing: 0; }
h2 { font-weight: 500; }

/* Thanh bên: nền sáng, mục đang chọn là viên thuốc xanh nhạt */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); overflow-x: hidden; background: #fff; border-right: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; z-index: 40; overflow-y: auto; transition: width .15s ease, transform .2s ease; }
.brand { display: flex; flex-direction: column; align-self: flex-start; max-width: calc(100% - 40px); margin: 0 16px 8px 28px; min-height: 64px; justify-content: center; text-decoration: none; line-height: 1.1; }
.brand b { color: var(--orange); font-size: 1.45rem; font-weight: 800; letter-spacing: .01em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--muted); font-size: .78rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand.long b, .brand-m.long b { font-size: 1.1rem; }
.side ul { list-style: none; margin: 0; padding: 4px 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.side nav a, .side .logout { position: relative; display: flex; align-items: center; gap: 16px; min-height: 40px; padding: 0 16px; border-radius: 12px; color: #3c4043; text-decoration: none; font: inherit; font-size: .9rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.side nav a:hover, .side .logout:hover { background: var(--hover); }
.side nav a[aria-current="page"] { background: var(--tonal); color: var(--road); font-weight: 600; }
.side .ic { width: 20px; height: 20px; }
.side form { margin: 0; }
.side .badge { margin-left: auto; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #d93025; color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; }
.side-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .32); z-index: 35; }
.frame { min-height: 100vh; }
/* Dùng bộ chọn anh em thay cho class trên <body>: htmx (hx-boost) giữ nguyên thuộc tính <body> của trang trước
   (vd. trang đăng nhập không có menu) → trước đây nội dung bị thanh bên che sau khi đăng nhập. */
.side ~ .frame { margin-left: var(--side-w); transition: margin .15s ease; }
html.side-mini { --side-w: 72px; }
html.side-mini .side span, html.side-mini .side .brand small { display: none; }
html.side-mini .brand { margin: 0 auto 8px; align-self: center; }
html.side-mini .brand b { font-size: 0; }
html.side-mini .brand b::before { content: "VT"; font-size: 1.2rem; }
html.side-mini .side nav a, html.side-mini .side .logout { justify-content: center; padding: 0; }
html.side-mini .side .badge { position: absolute; top: 2px; right: 10px; margin: 0; }
@media (max-width: 899px) {
  .side ~ .frame { margin-left: 0; }
  .side { transform: translateX(-105%); width: 290px; background: #fff; border-radius: 0 16px 16px 0; }
  .drawer-open .side { transform: none; }
  html.side-mini .side span, html.side-mini .side .brand small { display: initial; }
  html.side-mini .brand { margin: 0 16px 8px 28px; align-self: flex-start; }
  html.side-mini .brand b { font-size: 1.45rem; }
  html.side-mini .brand b::before { content: none; }
  html.side-mini .side nav a, html.side-mini .side .logout { justify-content: flex-start; padding: 0 16px; }
}

/* Thanh trên */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px 0 12px; background: #fff; border-bottom: 1px solid var(--line); }
.top .spacer { flex: 1; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: #444746; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .badge { position: absolute; top: 4px; right: 2px; }
.search { display: flex; align-items: center; gap: 10px; width: min(560px, 46vw); min-height: 44px; padding: 0 16px; background: #f1f3f4; border-radius: 999px; color: #444746; }
.search:focus-within { background: #fff; box-shadow: 0 1px 3px rgba(60,64,67,.3); }
.search .ic { width: 20px; height: 20px; color: var(--muted); }
.search input[type=search] { border: 0; background: transparent; min-height: 40px; padding: 0; font-size: .95rem; box-shadow: none; }
.search input:focus { outline: none; box-shadow: none; }
.brand-m { flex-direction: column; text-decoration: none; line-height: 1.05; min-width: 0; }
.brand-m b { color: var(--orange); font-size: 1.35rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
.brand-m small { color: var(--muted); font-size: .72rem; }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 2px 10px 2px 2px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.account-btn:hover { background: var(--hover); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 500; font-size: 1rem; }
.account-name { font-weight: 500; font-size: .95rem; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 18px; height: 18px; color: var(--muted); }
.account-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: #fff; border-radius: 16px; box-shadow: 0 2px 6px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.3); padding: 8px; z-index: 50; }
.account-who { display: flex; flex-direction: column; padding: 8px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: .9rem; }
.account-who span { color: var(--muted); font-size: .8rem; }
.account-menu a, .account-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 8px; color: var(--ink); text-decoration: none; font: inherit; font-size: .95rem; cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--hover); }
.account-menu form { margin: 0; }
@media (max-width: 899px) { .top { height: 56px; padding: 0 8px 0 4px; gap: 4px; } }

/* Vùng nội dung: nền trắng bo góc như Gmail / Drive, dùng hết bề ngang */
main { max-width: none; margin: 0; padding: 24px 32px 40px; }
@media (min-width: 1700px) { main { padding: 28px 48px 40px; } }
@media (max-width: 899px) { main { padding: 16px 16px 24px; } body:has(.tabbar) main { padding-bottom: 96px; } }
.readonly-bar { margin: 0; border-radius: 0; border: 0; }
@media (max-width: 899px) { .readonly-bar { margin: 0; border-radius: 0; } }

/* Thanh dưới (điện thoại) — kiểu thanh điều hướng Material 3 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 56px; justify-content: center; border: 0; background: none; color: #444746; font: inherit; font-size: .74rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.tab-ic { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 32px; border-radius: 999px; }
.tabbar a[aria-current="page"] { color: var(--road-dark); font-weight: 700; }
.tabbar a[aria-current="page"] .tab-ic { background: var(--tonal); }
.tab-ic .badge { position: absolute; top: -4px; right: 8px; }

/* Đầu trang */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; margin-bottom: 4px; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.page-head .lead { font-size: .92rem; color: var(--muted); }
.page-head .lead { margin: 0; }
.date-card { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .85rem; }
.date-card .ic-wrap { display: inline-flex; }
.date-card .ic-wrap .ic { width: 18px; height: 18px; }
.date-card b { font-weight: 400; color: var(--muted); }
.date-card > span:last-child { display: flex; gap: 8px; }
@media (max-width: 899px) { .page-head h1 { font-size: 1.6rem; } }

/* Nhóm số liệu */
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.sec-title h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.sec-title h2 .ic { width: 20px; height: 20px; }
.sec-title h2 .ic { color: var(--muted); }
.sec-title a { font-size: .9rem; font-weight: 500; text-decoration: none; }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.kpi { position: relative; display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; color: var(--ink); text-decoration: none; transition: background .12s, border-color .12s; }
.kpi:hover { background: #f8f9fa; border-color: #c4c7c5; }
.kpi:focus-visible { outline: 2px solid var(--road); outline-offset: 2px; }
.kpi .kpi-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tone-bg, #e8f0fe); color: var(--tone, var(--road)); }
.kpi .kpi-ic .ic { width: 20px; height: 20px; }
.kpi b { display: block; font-size: 2rem; line-height: 1.1; font-weight: 500; }
.kpi .kpi-label { display: block; color: var(--muted); font-size: .82rem; line-height: 1.35; margin-top: 2px; }
.t-blue { --tone: var(--info); --tone-bg: var(--info-bg); }
.t-red { --tone: var(--bad); --tone-bg: var(--bad-bg); }
.t-orange { --tone: var(--warn); --tone-bg: var(--warn-bg); }
.t-green { --tone: var(--ok); --tone-bg: var(--ok-bg); }
@media (max-width: 899px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi { flex-direction: column; gap: 8px; padding: 14px 12px; }
  .kpi { align-items: flex-start; }
  .kpi .kpi-ic { width: 34px; height: 34px; }
  .kpi b { font-size: 1.5rem; }
  .kpi .kpi-label { font-size: .8rem; }
  .kpis:not(.k3) .kpi { flex-direction: row; align-items: center; gap: 12px; }
}

/* Thao tác nhanh: chỉ là hàng nút, không nền trang trí */
.quick { margin: 24px 0; }
.quick h2 { margin: 0 0 10px; font-size: 1rem; }
.quick .eyebrow, .quick-art { display: none; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qa .ic { width: 18px; height: 18px; }
.qa { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px 0 14px; font-size: .92rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--road); font-weight: 500; text-decoration: none; }
.qa:hover { background: var(--hover); }
.qa.primary { background: var(--road); border-color: var(--road); color: #fff; }
.qa.primary:hover { background: #0842a0; }
.qa .arr { display: none; }
@media (max-width: 899px) { .quick-actions { flex-direction: column; } .qa { width: 100%; justify-content: center; min-height: 44px; } }

/* Thẻ nội dung + hoạt động + biểu đồ */
.cards2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 1099px) { .cards2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .95rem; font-weight: 500; }
.card-head h3 .ic { width: 20px; height: 20px; }
.card-head h3 .ic { color: var(--muted); }
.card-head > span { display: flex; gap: 6px; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; font-weight: 500; color: #444746; text-decoration: none; background: #fff; }
.chip:hover { background: var(--hover); }
.chip[aria-current="true"] { background: var(--tonal); border-color: var(--tonal); color: var(--road-dark); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity { margin: 0 -8px; }
.activity li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; font-size: .9rem; }
.activity li:hover { background: #f8f9fa; }
.activity .a-ic { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--tone-bg); color: var(--tone); flex: none; }
.activity .a-ic .ic { width: 16px; height: 16px; }
.activity .a-text { flex: 1; min-width: 0; }
.activity time { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.tn-ok { --tone: var(--ok); --tone-bg: var(--ok-bg); } .tn-bad { --tone: var(--bad); --tone-bg: var(--bad-bg); } .tn-info { --tone: var(--info); --tone-bg: var(--info-bg); }
.tn-warn { --tone: var(--warn); --tone-bg: var(--warn-bg); } .tn-muted { --tone: var(--muted); --tone-bg: #f1f3f4; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #f1f3f4; stroke-width: 1; }
.chart .axis { fill: #80868b; font-size: 11px; }
.chart .bar-new { fill: var(--info); }
.chart .bar-done { fill: #1e8e3e; }
.legend { display: flex; justify-content: center; gap: 22px; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* Bảng & liên kết gọn kiểu Google */
main a { text-decoration: none; }
main a:hover { text-decoration: underline; }
main a.btn:hover, main a.kpi:hover, main a.qa:hover, main a.chip:hover { text-decoration: none; }
td .mono, td.mono { white-space: nowrap; }
th { font-weight: 500; color: var(--muted); }
td form { display: inline-block; }

/* ===== Tổng quan nhà xe: tập trung đơn của mình ===== */
.quick-carrier { margin: 16px 0 20px; }
.cards2.one { grid-template-columns: 1fr; }
@media (min-width: 1100px) { .cards2:not(.one) { grid-template-columns: 3fr 2fr; } }
@media (max-width: 899px) {
  /* Điện thoại: bớt chữ phụ cho người dùng phổ thông */
  .page-head .eyebrow { display: none; }
  .carrier-kpis .kpi { align-items: center; text-align: center; padding: 12px 8px; }
  .carrier-kpis .kpi .kpi-ic { display: none; }
  .carrier-kpis .kpi b { font-size: 1.7rem; }
  .carrier-kpis .kpi .kpi-label { font-size: .82rem; }
  .quick-carrier { flex-direction: row; }
  .quick-carrier .qa { flex: 1; padding: 0 12px; }
  .card { padding: 14px 16px; }
}
.carrier-kpis { margin-top: 16px; }
@media (max-width: 899px) { .d-inline { display: none; } .quick-carrier .qa { white-space: nowrap; } }

/* ===== Thẻ đơn hàng (mẫu A): mỗi đơn 1 thẻ, Tuyến → Loại hàng → phụ ===== */
.orders-block .sec-title { margin-top: 0; }
.ocards { display: grid; gap: 8px; }
@media (min-width: 900px) { .cards2:not(.one) .ocards { grid-template-columns: 1fr; } .cards2.one .ocards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.ocard { display: grid; gap: 6px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.ocard:hover { border-color: #c4c7c5; background: #fcfcfd; text-decoration: none; }
.ocard:active { background: var(--hover); }
.ocard.need { border-left: 3px solid var(--warn); }
.oc-route { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.oc-route b { font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.oc-route .tag { flex: none; }
.oc-cargo { display: flex; align-items: flex-start; gap: 6px; font-size: .92rem; color: #3c4043; }
.oc-cargo .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); flex: none; }
.oc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--muted); }
.oc-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.oc-meta .ic { width: 14px; height: 14px; }
.oc-meta .mono { font-family: ui-monospace, Consolas, monospace; }
.oc-need { color: var(--warn); font-weight: 600; }
/* Nhóm đơn trên Tổng quan nhà xe */
.og-title { margin: 18px 0 8px; }
.og-title h2 { font-size: .95rem; font-weight: 600; }
.og-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: #e8eaed; color: #3c4043; font-size: .78rem; font-weight: 700; }
.og-title.tone-warn h2 { color: var(--warn); }
.og-title.tone-warn .og-count { background: var(--warn-bg); color: var(--warn); }
.og-all { margin: 14px 0 0; text-align: center; font-size: .9rem; }
.orders-block > .og-title:first-child { margin-top: 0; }
.orders-block .og-title { margin: 22px 0 8px; }
.orders-block .og-title:first-of-type { margin-top: 4px; }

/* ===== Trang Đơn hàng: tab + nút Lọc + nút tạo tròn ===== */
.orders-head { margin-bottom: 8px; }
.orders-head h1 { margin: 0; }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; }
.filter-btn .ic { width: 18px; height: 18px; }
.filter-btn .badge { margin-left: 2px; background: var(--road); }
.search-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.search-note .chip .ic { width: 14px; height: 14px; }
.otabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; overflow-x: auto; scrollbar-width: none; }
.otabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 12px; color: var(--muted); font-weight: 500; font-size: .95rem; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.otabs a:hover { color: var(--ink); text-decoration: none; background: var(--hover); }
.otabs a[aria-current="page"] { color: var(--road); border-bottom-color: var(--road); font-weight: 600; }
.otabs a[aria-current="page"] .og-count { background: var(--info-bg); color: var(--road); }
@media (min-width: 900px) { .otabs a { flex: 0 0 auto; padding: 0 20px; } }
.m-cards-wrap .og-title:first-child { margin-top: 0; }
.m-cards-wrap { display: none; }
@media (max-width: 899px) { .m-cards-wrap { display: block; } .d-table { display: none; } }

/* Nút tạo đơn tròn, góc dưới phải */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 25; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--road); color: #fff; box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); text-decoration: none; }
.fab:hover { background: #0842a0; text-decoration: none; }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.2; }
@media (max-width: 899px) { .fab { border-radius: 50%; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); } }
main:has(.fab) { padding-bottom: 96px; }
@media (max-width: 899px) { body:has(.tabbar) main:has(.fab) { padding-bottom: 160px; } }

/* Bảng lọc: điện thoại trượt từ dưới, máy tính hiện giữa màn hình */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 60; }
.sheet { position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; background: #fff; border-radius: 20px; padding: 8px 20px 20px; display: grid; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 1.1rem; font-weight: 500; }
.sheet .field { margin: 0; }
.sheet label, .sheet legend { font-size: .85rem; font-weight: 500; color: var(--muted); }
.sheet-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { margin-bottom: 6px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; color: #3c4043; font-size: .9rem; cursor: pointer; }
.seg input:checked + span { background: var(--tonal); border-color: var(--tonal); color: var(--road); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--road); outline-offset: 2px; }
.sheet-link { margin: 0; font-size: .9rem; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; }
.sheet-actions .btn { min-width: 110px; }
@media (max-width: 899px) {
  .sheet { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 88vh; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .sheet-actions .btn { flex: 1; }
}

/* Thanh trên điện thoại: ☰ | ô tìm | chuông — tài khoản chuyển vào menu bên */
@media (max-width: 899px) {
  .top .search { flex: 1; width: auto; min-width: 0; min-height: 42px; padding: 0 12px; }
  .top .search input[type=search] { font-size: 16px; } /* 16px để iPhone không tự phóng to */
  .top .spacer { display: none; }
}
.side-user { align-items: center; gap: 12px; margin: 0 16px 8px; padding: 12px; border-radius: 12px; background: var(--bg); }
.side-user-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.side-user-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-name small { color: var(--muted); font-size: .8rem; }
.m-only-li { display: none; }
@media (max-width: 899px) { .m-only-li { display: list-item; } }
.sheet { grid-template-columns: minmax(0, 1fr); }
.sheet input[type=date], .sheet select { width: 100%; min-width: 0; max-width: 100%; }
.sheet-row > * { min-width: 0; }
@media (max-width: 899px) {
  .otabs { gap: 0; }
  .otabs a { flex: 1 1 0; min-width: 0; padding: 0 4px; gap: 5px; font-size: .9rem; }
}

/* ===== Form tạo / sửa đơn: phẳng, không lồng khung ===== */
.of-title { margin: 0 0 12px; }
.oform { max-width: 760px; }
.of-sec { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.of-sec > h2 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.of-sec .field, .of-sec > div[class*="field"] { margin-bottom: 14px; }
.of-sec > :last-child { margin-bottom: 0; }
.oform label { font-weight: 500; font-size: .9rem; }
.oform .req { color: var(--bad); }
.oform textarea { width: 100%; }
.grid2.keep2 { grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 899px) {
  .oform { max-width: none; margin: 0 -16px; }
  .of-title { margin-left: 0; }
  .of-sec { border-radius: 0; border-left: 0; border-right: 0; margin-bottom: 8px; padding: 16px; }
}
/* Chọn khách */
.cust { position: relative; }
.cust-search { display: flex; align-items: center; gap: 8px; border: 1px solid #c4c7c5; border-radius: 10px; padding: 0 12px; background: #fff; }
.cust-search:focus-within { border-color: var(--road); box-shadow: 0 0 0 1px var(--road); }
.cust-search .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.cust-search input { border: 0 !important; box-shadow: none !important; padding: 0; min-height: 48px; flex: 1; min-width: 0; font-size: 16px; }
.cust-list { list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; left: 0; right: 0; z-index: 20; background: #fff; border-radius: 12px; box-shadow: 0 2px 6px rgba(60,64,67,.15), 0 1px 2px rgba(60,64,67,.3); max-height: 320px; overflow-y: auto; }
.cust-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; background: none; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.cust-list button:hover, .cust-list button:focus { background: var(--hover); }
.cust-list small { color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.cust-new button { flex-direction: row; align-items: center; gap: 8px; color: var(--road); font-weight: 600; border-top: 1px solid #f1f3f4; border-radius: 0 0 8px 8px; }
.cust-new .ic { width: 18px; height: 18px; }
.cust-picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--info-bg); }
.cust-who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cust-who small { color: var(--muted); font-family: ui-monospace, Consolas, monospace; }
.avatar.sm { width: 34px; height: 34px; font-size: .95rem; background: var(--road); }
.of-new { border: 1px dashed #c4c7c5; border-radius: 10px; padding: 12px; }
.of-new-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
/* Điểm lấy / giao */
.place { border: 1px solid var(--line); border-radius: 10px; }
.place + .place { margin-top: 10px; }
.place > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; cursor: pointer; }
.place > summary::-webkit-details-marker { display: none; }
.place-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 3px solid var(--road); }
.place-dot.delivery { border-color: var(--warn); background: var(--warn); }
.place-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.place-sum b { font-size: .95rem; }
.place-sum > span { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place .chev { transition: transform .15s; color: var(--muted); }
.place[open] .chev { transform: rotate(180deg); }
.place[open] > summary { border-bottom: 1px solid #f1f3f4; }
.place-body { padding: 12px 14px 4px; }
.place-body > div { margin-bottom: 14px; }
.reuse { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.reuse .chip { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row { display: flex; gap: 8px; }
.map-row input { flex: 1; min-width: 0; }
.map-row .btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.map-row .btn .ic { width: 16px; height: 16px; }
@media (max-width: 480px) { .map-row { flex-direction: column; } }
.maplink { font-size: .88rem; }
.checks { display: grid; gap: 4px; }
/* Thanh nút cuối form */
.of-actions { position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 0; background: var(--bg); }
.of-actions .btn { min-height: 46px; }
.btn.text { background: transparent; border-color: transparent; color: var(--muted); }
.btn.text:hover { background: var(--hover); }
.btn.primary-lg { min-width: 150px; font-size: 1rem; }
@media (max-width: 899px) {
  .of-actions { bottom: calc(64px + env(safe-area-inset-bottom)); padding: 10px 16px; margin: 0; border-top: 1px solid var(--line); background: #fff; }
  .of-actions .btn.primary-lg { flex: 1; min-width: 0; }
}
.toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 70; background: #303134; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: .9rem; }
.of-draft { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Ô chọn tỉnh + bảng chọn */
.prov-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #c4c7c5; border-radius: 8px; background: #fff; font: inherit; font-size: 1rem; color: var(--ink); cursor: pointer; text-align: left; }
.prov-btn:focus-visible { outline: 2px solid var(--road); outline-offset: 1px; }
.prov-btn .ph { color: var(--muted); }
.has-err .prov-btn { border-color: var(--bad); }
.prov-sheet { gap: 10px; padding-bottom: 0; grid-template-rows: auto auto 1fr; height: min(640px, calc(100vh - 48px)); overflow: hidden; }
.prov-sheet .sheet-head h2 { flex: 1; text-align: center; }
.prov-sheet .cust-search input { font-size: 16px; }
.prov-scroll { overflow-y: auto; margin: 0 -20px; padding: 0 20px 20px; min-height: 0; }
.prov-group h3 { margin: 14px 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.prov-hot { display: flex; flex-wrap: wrap; gap: 8px; }
.prov-hot .chip { min-height: 38px; padding: 0 14px; font-size: .92rem; }
.prov-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 52px; padding: 6px 4px; border: 0; border-bottom: 1px solid #f1f3f4; background: none; font: inherit; font-size: 1rem; color: var(--ink); text-align: left; cursor: pointer; }
.prov-row:hover { background: #f8f9fa; }
.prov-row > span:first-child { display: flex; flex-direction: column; }
.prov-row small { color: var(--muted); font-size: .8rem; }
.prov-radio { flex: none; width: 22px; height: 22px; border: 2px solid #c4c7c5; border-radius: 50%; }
.prov-row[aria-current="true"] { color: var(--road); font-weight: 600; }
.prov-row[aria-current="true"] .prov-radio { border-color: var(--road); box-shadow: inset 0 0 0 4px #fff; background: var(--road); }
@media (max-width: 899px) { .prov-sheet { height: 88vh; max-height: 88vh; } }
.ton-hint { color: var(--road); font-weight: 600; }
.hint.ton-hint { color: var(--road); font-weight: 600; }
.place[open] .prov-btn .chev { transform: none; }

/* ===== Chi tiết đơn hàng ===== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.od-top { display: flex; align-items: center; gap: 8px; margin: -4px 0 8px -8px; }
.od-top h1 { flex: 1; margin: 0; font-size: 1.25rem; font-weight: 600; }
.od-menu { position: relative; }
.od-menu .account-menu { min-width: 200px; }
.account-menu .danger-item { color: var(--bad); }
.stepper { list-style: none; display: flex; margin: 4px 0 16px; padding: 0; }
.stepper li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--road); }
.stepper .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.stepper .dot .ic { width: 22px; height: 22px; color: #fff; }
.stepper li.done .dot { background: var(--road); border-color: var(--road); }
.stepper li.now .dot { border-color: var(--road); box-shadow: inset 0 0 0 5px #fff; background: var(--road); }
.stepper li.done, .stepper li.now { color: var(--ink); }
.stepper li.now { font-weight: 700; color: var(--road); }
.od-grid { display: grid; gap: 12px; }
@media (min-width: 1000px) { .od-grid { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); align-items: start; } .od-side { position: sticky; top: 80px; } }
.od-main, .od-side { display: grid; gap: 12px; min-width: 0; }
.od-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.od-card small { display: block; color: var(--muted); font-size: .78rem; font-weight: 500; }
.od-route { padding: 6px 16px 14px; }
.rt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.rt + .rt::after { content: ""; position: absolute; left: 6px; top: -16px; height: 28px; border-left: 2px dashed #c4c7c5; }
.rt-dot { flex: none; width: 14px; height: 14px; margin-top: 18px; border-radius: 50%; border: 3px solid var(--road); background: #fff; }
.rt-dot.to { border-color: var(--warn); background: var(--warn); }
.rt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rt-body b { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.rt-body span { color: #3c4043; font-size: .92rem; }
.rt .btn { flex: none; margin-top: 14px; }
.btn.small .ic, .od-btns .ic { width: 16px; height: 16px; }
.btn.small { display: inline-flex; align-items: center; gap: 6px; }
.od-cargo { margin-top: 6px; padding: 12px 14px; border-radius: 10px; background: #f8f9fa; }
.od-cargo p { margin: 2px 0 0; font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.od-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.od-chips span { padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .82rem; }
.od-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.od-row > div { display: flex; flex-direction: column; min-width: 0; }
.od-row b { font-size: 1rem; }
.od-btns { display: flex; gap: 6px; flex: none; }
.od-need { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 600; }
.od-need .ic { width: 18px; height: 18px; }
.od-money { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f1f3f4; }
.od-money b { font-size: 1.05rem; }
.od-line { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin-top: 10px; font-size: .92rem; align-items: baseline; }
.od-card .hint { margin: 8px 0 0; }
.od-fold { padding: 0; }
.od-fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; cursor: pointer; font-weight: 600; }
.od-fold > summary::-webkit-details-marker { display: none; }
.od-fold[open] > summary .chev { transform: rotate(180deg); }
.od-fold > :not(summary) { margin: 0 16px 14px; }
.od-photo { margin: -4px 0 0; }
.od-photo > label.btn { width: 100%; justify-content: center; }
.od-log { list-style: none; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.od-log li { position: relative; padding: 0 0 12px 8px; display: flex; flex-direction: column; font-size: .9rem; }
.od-log li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--road); }
.od-next .btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.od-closed { margin-bottom: 12px; }
@media (max-width: 899px) {
  /* Nút việc tiếp theo ghim đáy màn hình (trên thanh điều hướng) */
  .od-next { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 15; padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); }
  main:has(.od-next) { padding-bottom: 170px !important; }
}
/* Điểm cũ + người liên hệ */
.reuse-btn { margin-bottom: 12px; }
.reuse-btn .ic { width: 16px; height: 16px; }
.contact-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 6px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.linkbtn { border: 0; background: none; color: var(--road); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 4px 0; }
.place-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid #f1f3f4; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.place-row:hover { background: #f8f9fa; }
.place-row span { font-size: .92rem; }
.place-row small { color: #3c4043; font-size: .85rem; }
.place-row em { font-style: normal; color: var(--muted); font-size: .78rem; }
.rt-contact { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .88rem; color: #3c4043; }
.rt-contact a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.rt-contact .ic { width: 15px; height: 15px; }
.rt-contact { flex-wrap: wrap; gap: 4px 12px; }
.rt-contact > span { display: inline-flex; align-items: center; gap: 4px; }
.avatar.sm .ic { width: 18px; height: 18px; }
.small-hint { font-size: .8rem; margin: 6px 0 0; }

/* Chi tiết đơn — v2 gọn hơn */
.stepper { margin: 0 0 12px; }
.stepper li { font-size: .74rem; gap: 4px; }
.stepper li::before { top: 7px; }
.stepper .dot { width: 16px; height: 16px; border-width: 2px; }
.stepper .dot .ic { width: 14px; height: 14px; }
.stepper li.now .dot { box-shadow: inset 0 0 0 3px #fff; }
.od-top { margin-bottom: 4px; }
.od-top h1 { font-size: 1.1rem; }
.od-route { padding: 12px 16px 14px; }
.od-date { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.od-date .ic { width: 16px; height: 16px; }
.od-date b { color: var(--ink); font-weight: 600; }
.pts { position: relative; }
.pt { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; }
.pt + .pt::before { content: ""; position: absolute; left: 5px; top: -12px; height: 26px; border-left: 2px dotted #c4c7c5; }
.pt-dot { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 50%; border: 3px solid var(--road); background: #fff; }
.pt-dot.to { border-color: var(--warn); background: var(--warn); }
.pt-body { flex: 1; min-width: 0; }
.pt-addr { margin: 0; font-size: .95rem; line-height: 1.4; color: #3c4043; }
.pt-addr b { font-size: 1.05rem; color: var(--ink); }
.pt-who { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.pt-act { display: flex; gap: 6px; flex: none; }
.rbtn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--road); flex: none; }
.rbtn:hover { background: var(--hover); text-decoration: none; }
.rbtn .ic { width: 18px; height: 18px; }
.od-cargo { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: #fff8e1; border: 1px solid #fde7a9; }
.od-cargo-h { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .78rem; font-weight: 600; color: #8a5a00; text-transform: uppercase; letter-spacing: .03em; }
.od-cargo-h .ic { width: 15px; height: 15px; }
.od-cargo-t { margin: 4px 0 0; font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
.od-cargo .od-chips span { background: #fff; border-color: #fde7a9; }
.od-cust { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-cust-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.od-cust-b b { font-size: .98rem; }
.od-cust-b .mono { font-size: .85rem; color: var(--muted); }
.od-cust-note { flex-basis: 100%; margin: 0 !important; font-size: .8rem; }
.od-sec-h { margin: 0 0 8px; font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.od-money { margin-top: 0; padding-top: 0; border-top: 0; }
.od-note { margin: 0; font-size: .92rem; }
.confirm-sheet h2 { margin: 6px 0 0; font-size: 1.1rem; font-weight: 600; }
.confirm-sheet p { margin: 0; }
.confirm-route { padding: 10px 12px; border-radius: 10px; background: #f8f9fa; font-weight: 600; }
.primary-lg .ic { width: 20px; height: 20px; }
.od-cargo .od-cargo-h { margin: 0; font-size: .75rem; font-weight: 700; }
.od-cargo .od-cargo-t { margin: 4px 0 0; }

/* ---------- Tải ảnh có tiến trình ---------- */
.up-file { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.up-thumb { position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--hover); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }
.up-thumb img:not([src]) { visibility: hidden; }
.up-done-ic { position: absolute; inset: 0; display: none; place-items: center; background: rgba(19,115,51,.72); color: #fff; }
.up-done-ic .ic, .up-done-ic svg { width: 28px; height: 28px; }
.up-meta { flex: 1; min-width: 0; display: grid; gap: 4px; }
.up-meta b { font-size: .95rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-meta small { font-size: .82rem; color: var(--muted); }
.up-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity .2s; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--info); border-radius: inherit; transition: width .2s ease; }
.up-err { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad); font-size: .9rem; }
form.is-busy .up-bar, form.is-done .up-bar { opacity: 1; }
form.is-busy .up-thumb img { filter: brightness(.85); }
form.is-saving .up-bar i { background: linear-gradient(90deg, var(--info) 0 40%, #8ab4f8 50%, var(--info) 60% 100%); background-size: 200% 100%; animation: up-shine 1s linear infinite; }
@keyframes up-shine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
form.is-done .up-bar i { background: var(--ok); }
form.is-done .up-meta small { color: var(--ok); font-weight: 500; }
form.is-done .up-done-ic { display: grid; }
form.is-error .up-meta small { color: var(--bad); }
form.is-busy .up-hide-busy, form.is-done .up-hide-busy { display: none; }
form.is-busy [data-up-cancel], form.is-done [data-up-cancel], form.is-done [data-up-submit] { display: none; }
.up-inline { margin: 12px 0; }

/* ---------- Xem ảnh trong app ---------- */
html.lb-open, html.lb-open body { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.94); display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; }
.lb-cnt { font-size: .9rem; opacity: .85; }
.lb-x, .lb-nav { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-x:hover, .lb-nav:hover { background: rgba(255,255,255,.22); }
.lb-stage { min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; user-select: none; -webkit-user-drag: none; transition: opacity .15s; }
.lb.loading .lb-stage img { opacity: .35; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb.single .lb-nav { display: none; }
.lb-cap { margin: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); text-align: center; font-size: .9rem; opacity: .9; }
@media (max-width: 899px) { .lb-nav { width: 40px; height: 40px; background: rgba(255,255,255,.1); } .lb-prev { left: 6px; } .lb-next { right: 6px; } }
.photos a[data-lightbox] { display: block; cursor: zoom-in; }

/* ---------- Lịch xe: 3 tab theo tình trạng ---------- */
.sch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sch-head h1 { margin: 0; }
.sch-nav { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.sch-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--road); }
.sch-arrow:hover { background: var(--hover); }
.sch-date { position: relative; display: block; cursor: pointer; padding: 0 6px; text-align: center; min-width: 70px; }
.sch-date span { display: grid; line-height: 1.15; }
.sch-date small { font-size: .72rem; color: var(--muted); }
.sch-date b { font-size: 1rem; color: var(--ink); }
.sch-date input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer; }
.sch-date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.sch-back { margin: -4px 0 10px; font-size: .9rem; }
.sch-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.sch-tabs button { flex: 1; min-height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; padding: 0 6px; }
.sch-tabs button b { display: inline-block; min-width: 20px; margin-left: 2px; padding: 0 6px; border-radius: 99px; background: var(--hover); font-size: .8rem; }
.sch-tabs button.on { background: var(--tonal); border-color: var(--tonal); color: var(--road); }
.sch-tabs button.on b { background: #fff; }
.sch-tabs button.warn b { background: var(--warn-bg); color: var(--warn); }
.sch-hint { margin: 0 2px 8px; font-size: .85rem; color: var(--muted); }
.sch-empty { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 28px 12px; margin: 0; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.sch-empty .ic { color: var(--ok); }
.sch-card { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
.sch-card.need { border-left: 4px solid var(--orange); }
.sch-card.over { border-color: var(--bad); }
.sch-main { flex: 1; min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.sch-main b { font-size: 1rem; }
.sch-main small, .sch-sub { font-size: .82rem; color: var(--muted); }
.sch-code { font-size: .75rem !important; }
.sch-late { color: var(--bad); font-weight: 500; }
.sch-card.veh { display: block; }
.sch-vh { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sch-vh b { font-size: 1.02rem; }
.sch-bar { height: 6px; border-radius: 99px; background: #e8eaed; margin: 10px 0 4px; overflow: hidden; }
.sch-bar i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.sch-card.over .sch-bar i { background: var(--bad); }
.sch-trips { list-style: none; margin: 10px 0 0; padding: 0; }
.sch-trips li { border-top: 1px solid var(--hover); }
.sch-trips a { display: grid; gap: 2px; padding: 9px 0 7px; color: inherit; text-decoration: none; }
.sch-trips li:last-child a { padding-bottom: 0; }
.sch-tr { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sch-tr b { font-size: .95rem; }
.sch-trips small { font-size: .8rem; color: var(--muted); }
@media (min-width: 900px) { .sch { max-width: 720px; } }
.sch-late { white-space: nowrap; }

/* ---------- Lịch xe v2: thẻ xe, tab Rảnh, bảng gán ---------- */
.vcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.vcard.over { border-color: var(--bad); }
.vc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.vc-av { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.vc-av .ic { width: 20px; height: 20px; }
.vc-av.done, .rest.free .vc-av { background: var(--ok-bg); color: var(--ok); }
.rest.off .vc-av { background: var(--hover); color: var(--muted); }
.vc-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.vc-t b { font-size: 1.02rem; }
.vc-t small { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-load { padding: 0 14px 10px; }
.vc-load .sch-bar { margin: 2px 0 5px; }
.vc-load .sch-bar i { background: var(--info); }
.vcard.over .sch-bar i { background: var(--bad); }
.vc-lrow { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--muted); }
.vc-lrow b { color: var(--ok); font-weight: 600; }
.vc-lrow b.bad { color: var(--bad); } .vc-lrow b.full { color: var(--warn); }
.vc-free { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .82rem; color: var(--ok); }
.vc-free .ic { width: 16px; height: 16px; }
.vc-trips { list-style: none; margin: 0; padding: 2px 14px 6px; border-top: 1px solid var(--hover); }
.vc-trips a { display: flex; gap: 10px; padding: 9px 0; color: inherit; text-decoration: none; }
.vc-trips li + li a { border-top: 1px solid var(--hover); }
.vc-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--warn); background: #fff; }
.vc-trips li.run .vc-dot { border-color: var(--info); background: var(--info); }
.vc-trips li.done .vc-dot { border-color: var(--ok); }
.vc-trips li.done .vc-x { opacity: .6; }
.vc-x { flex: 1; min-width: 0; display: grid; gap: 2px; }
.vc-r { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vc-r b { font-size: .95rem; }
.vc-x small { font-size: .8rem; color: var(--muted); }
.vc-carry { color: var(--warn); font-weight: 500; }
.sch-sec { margin: 14px 2px 6px; font-size: .75rem; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: var(--muted); }
.sch-sec:first-child { margin-top: 2px; }
.sch-sec span { font-weight: 500; }
.sch-card.rest { gap: 12px; }
.sch-card.rest .sch-main b { font-size: 1rem; }
.sch-card.rest.off { opacity: .7; }
.sch-sheet { gap: 12px; }
.sch-pick { display: grid; gap: 8px; }
.sch-opt { display: grid; gap: 2px; text-align: left; width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; }
.sch-opt:hover { background: var(--hover); }
.sch-opt b { font-size: .98rem; } .sch-opt small { font-size: .8rem; color: var(--muted); }
.sch-form { display: grid; gap: 12px; }
.sch-sum { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.sch-sum small { font-size: .8rem; color: var(--muted); }
.sch-sheet select, .sch-sheet input[type=date] { width: 100%; }

/* ---------- Sàn đơn (nhà xe) ---------- */
.mk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.mk-head h1 { margin: 0; }
.mk-count { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.mk-count b { color: var(--ok); font-size: 1rem; }
.mk-hint { display: flex; gap: 6px; align-items: flex-start; margin: 0 2px 12px; font-size: .82rem; color: var(--muted); }
.mk-hint .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.mk-hold { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: .88rem; text-decoration: none; }
.mk-hold .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mk-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.mk-empty .ic { width: 32px; height: 32px; color: #bdc1c6; }
.mk-empty b { color: var(--ink); }
.mk-empty span { font-size: .85rem; }
.mkc { display: grid; gap: 6px; padding: 12px 14px 10px; margin-bottom: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.mkc:hover { background: #fcfcfd; border-color: #d2d6db; text-decoration: none; }
.mkc.mine { border-color: var(--orange); border-left-width: 4px; }
.mkc.other { opacity: .6; }
.mkc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mkc-route { font-size: 1.05rem; }
.mkc-cargo, .mkc-meta span:first-child { display: flex; align-items: center; gap: 6px; font-size: .88rem; }
.mkc-cargo .ic, .mkc-meta .ic { width: 16px; height: 16px; flex: none; color: var(--muted); }
.mkc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mkc-meta span:first-child { color: var(--muted); font-size: .84rem; }
.mkc-note { font-size: .82rem; color: var(--muted); font-style: italic; }
.mkc-money { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-top: 4px; padding-top: 9px; border-top: 1px solid var(--hover); }
.mkc-money span { display: grid; gap: 1px; }
.mkc-money small { font-size: .75rem; color: var(--muted); }
.mkc-money b { font-size: 1.08rem; }
.mkc-money .r { text-align: right; }
.mkc-money .r b { font-size: .95rem; font-weight: 500; color: var(--muted); }
.mkc-code { font-size: .72rem; color: #9aa0a6; }
.mkc-top .tag { white-space: nowrap; flex: none; }

/* ---------- Thanh "Có cập nhật mới" ---------- */
#vt37-upd { position: fixed; left: 50%; transform: translateX(-50%); top: 64px; z-index: 55; display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 16px; border-radius: 999px; background: var(--navy); color: #fff; font-size: .9rem; box-shadow: 0 4px 14px rgba(0,0,0,.18); white-space: nowrap; animation: upd-in .2s ease; }
#vt37-upd button { border: 0; background: transparent; color: #fff; font: inherit; cursor: pointer; border-radius: 999px; }
#vt37-upd .upd-go { background: rgba(255,255,255,.16); padding: 7px 14px; font-weight: 600; }
#vt37-upd .upd-x { width: 32px; height: 32px; font-size: 1.2rem; opacity: .8; }
@keyframes upd-in { from { opacity: 0; transform: translate(-50%, -8px); } }

/* ---------- Chi tiết đơn sàn (nhà xe) ---------- */
.ms .od-top .tag { flex: none; }
.ms-hold { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: .9rem; }
.ms-hold.other { background: var(--hover); color: var(--muted); }
.ms-hold .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.ms-privacy { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: .8rem; color: var(--muted); }
.ms-privacy .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ms-money { display: grid; gap: 0; }
.ms-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f1f3f4; }
.ms-row span { font-size: .92rem; }
.ms-row small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.ms-row b { font-size: 1.02rem; white-space: nowrap; }
.ms-row b.neg { color: var(--muted); font-weight: 500; }
.ms-row.total { border-bottom: 0; padding-top: 11px; }
.ms-row.total span { font-weight: 600; }
.ms-row.total b { font-size: 1.2rem; color: var(--ok); }
.ms-note { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--bg); font-size: .85rem; color: var(--muted); }
.ms-note .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ms-note.warn { background: var(--warn-bg); color: #7a4a00; }
.ms-note.bad { background: var(--bad-bg); color: var(--bad); }
.ms-act { display: grid; gap: 10px; }
.ms-inv { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: .88rem; cursor: pointer; font-weight: 400; color: var(--ink); }
.ms-inv.on { border-color: var(--ok); background: var(--ok-bg); }
.ms-inv input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--ok); }
.ms-inv.shake { animation: ms-shake .4s; border-color: var(--bad); }
@keyframes ms-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.ms-btns { display: flex; gap: 8px; }
.ms-btns > form { display: contents; }
.ms-btns .btn { flex: 1; min-height: 48px; justify-content: center; }
.ms-btns .ms-go { flex: 1.6; font-size: 1rem; font-weight: 600; }
.ms-act .hint { margin: 0; font-size: .8rem; }
.confirm-sheet .muted { color: var(--muted); font-size: .9rem; }
@media (max-width: 899px) {
  .ms-act { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 15; padding: 10px 16px 12px; background: #fff; border-top: 1px solid var(--line); }
  main:has(.ms-act) { padding-bottom: 300px !important; }
}

/* Sàn đơn — dải tiền cuối thẻ (thay bản cũ) */
.mkc { padding-bottom: 0; overflow: hidden; }
.mkc .mkc-money { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 6px -14px 0; padding: 10px 14px 11px; border-top: 1px solid var(--line); background: var(--bg); }
.mkc .mm-col { display: grid; gap: 1px; min-width: 0; }
.mkc .mm-col.r { text-align: right; justify-items: end; }
.mkc .mm-col small { font-size: .74rem; color: var(--muted); }
.mkc .mm-col b { font-size: 1.08rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.mkc .mm-col b.net { color: var(--ok); }
.mkc .mm-col small.fee { font-size: .72rem; }
.mkc.mine .mkc-money { background: #fffaf0; }
.mkc .mm-col b.fee { font-weight: 500; color: var(--muted); }
.mkc .mkc-money { align-items: flex-end; }
/* Nút Giữ / Nhận ở chi tiết đơn sàn: cân đối, không xuống dòng */
.ms-btns .btn { flex: 1 1 0; min-width: 0; min-height: 46px; padding: 0 12px; white-space: nowrap; gap: 6px; font-size: .95rem; }
.ms-btns .btn .ic { width: 18px; height: 18px; flex: none; }
.ms-btns .ms-go { flex: 1.35 1 0; font-size: 1rem; }

/* ---------- Thanh bên v2 (30/09): thương hiệu gọn, nhóm menu, tài khoản tách riêng ở chân ---------- */
.side { overflow-y: hidden; }
.side nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.brand2 { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); flex: none; }
.brand2:hover { text-decoration: none; background: #fcfcfd; }
.brand2-tile { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.brand2-tile .ic { width: 20px; height: 20px; }
.brand2-tile b { font-size: .95rem; font-weight: 800; color: var(--orange); letter-spacing: .02em; }
.brand2-t { display: grid; min-width: 0; line-height: 1.25; }
.brand2-t b { font-size: .98rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand2-t small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side ul { padding: 8px 12px 16px; }
.side-group { padding: 14px 16px 4px; }
.side-group span { font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #80868b; }
.side nav a { min-height: 42px; gap: 14px; font-weight: 500; color: #3c4043; }
.side nav a .ic { color: #5f6368; }
.side nav a[aria-current="page"] .ic { color: var(--road); }
.side .badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: .72rem; line-height: 20px; text-align: center; }
.avatar.person { background: var(--tonal); color: var(--road); }
.avatar.person .ic { width: 20px; height: 20px; }
.side-foot { flex: none; flex-direction: column; gap: 10px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.sf-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sf-user .avatar { width: 40px; height: 40px; flex: none; }
.sf-who { display: grid; min-width: 0; line-height: 1.3; }
.sf-who b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-who small { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-act { display: flex; gap: 8px; }
.sf-act > * { flex: 1; min-width: 0; }
.sf-act form { margin: 0; display: flex; }
.sf-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #3c4043; font: inherit; font-size: .84rem; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; }
.sf-btn:hover { background: var(--hover); text-decoration: none; }
.sf-btn .ic { width: 16px; height: 16px; }
.sf-btn.out { color: var(--bad); }
/* Thu gọn trên máy tính */
html.side-mini .brand2 { justify-content: center; padding: 12px 0; }
html.side-mini .brand2-t, html.side-mini .side-group { display: none; }
@media (max-width: 899px) {
  .side { width: 300px; }
  html.side-mini .brand2 { justify-content: flex-start; padding: 12px 16px 12px 20px; }
  html.side-mini .brand2-t { display: grid; }
  html.side-mini .side-group { display: list-item; }
  .side-group { list-style: none; }
}
.side-group { padding: 10px 16px 2px; }
.side nav a { min-height: 40px; }
/* Nhân sự: đầu trang + nút Thêm người */
.ps-head { align-items: center; }
.ps-add { position: relative; }
.ps-add .btn { gap: 6px; }
.ps-add .btn .ic { width: 18px; height: 18px; }
.ps-add .account-menu { min-width: 280px; }
.ps-add .account-menu a { min-height: 56px; align-items: center; }
.ps-add .account-menu a > span { display: grid; line-height: 1.3; }
.ps-add .account-menu a small { font-size: .78rem; color: var(--muted); }

/* ---------- Khách hàng: danh sách ---------- */
.kh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.kh-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; }
.kh-total { font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--hover); color: var(--muted); }
.kh-head .btn { gap: 6px; }
.kh-head .btn .ic { width: 18px; height: 18px; }
.kh-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.kh-search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: text; }
.kh-search:focus-within { border-color: var(--road); box-shadow: 0 0 0 3px var(--tonal); }
.kh-search .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.kh-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; padding: 0; height: 100%; box-shadow: none; }
.kh-sort { display: flex; gap: 6px; }
.kh-sort label { cursor: pointer; }
.kh-sort input { position: absolute; opacity: 0; pointer-events: none; }
.kh-sort span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .82rem; font-weight: 500; color: var(--muted); }
.kh-sort input:checked + span { background: var(--tonal); border-color: var(--tonal); color: var(--road); }
.kh-found { margin: 0 2px 8px; font-size: .85rem; color: var(--muted); }
.kh-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.kh { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 0; border-top: 1px solid var(--hover); }
.kh:first-child { border-top: 0; }
.kh:hover { background: #fcfcfd; }
.kh-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 0 11px 14px; color: inherit; text-decoration: none; }
.kh-main:hover { text-decoration: none; }
.kh-av { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tonal); color: var(--road); font-weight: 700; font-size: 1rem; }
.kh-av .ic { width: 20px; height: 20px; }
.kh-t { display: grid; gap: 2px; min-width: 0; }
.kh-t b { font-size: .98rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh-t b .tag { font-size: .66rem; padding: 1px 6px; vertical-align: 2px; }
.kh-t small { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh .rbtn { width: 36px; height: 36px; }
.kh .rbtn .ic { width: 18px; height: 18px; }
.kh-more { display: grid; justify-items: center; gap: 4px; padding: 12px; border-top: 1px solid var(--hover); }
.kh-more .btn { min-width: 180px; }
.kh-more small { font-size: .75rem; color: var(--muted); }
.kh-more.htmx-request .btn { opacity: .6; pointer-events: none; }
.kh-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 36px 16px; background: #fff; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.kh-empty .ic { width: 32px; height: 32px; color: #bdc1c6; }
.kh-empty b { color: var(--ink); }
.kh-empty span { font-size: .85rem; }
#kh-results.htmx-request { opacity: .6; transition: opacity .15s; }

/* ---------- Khách hàng: form ---------- */
.kf .of-sec > h2 { display: flex; align-items: center; justify-content: space-between; }
.kf-count { font-size: .78rem; font-weight: 500; color: var(--muted); }
.kf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kf-row .field { margin-bottom: 0; }
@media (max-width: 600px) { .kf-row { grid-template-columns: 1fr; gap: 0; } .kf-row .field { margin-bottom: 14px; } .kf-row .field:last-child { margin-bottom: 0; } }
.kf .of-sec .field { margin-bottom: 14px; }
.kf .of-sec > :last-child, .kf .of-sec > div:last-child .field:last-child { margin-bottom: 0; }
.kf textarea { width: 100%; }
.kf-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kf-check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; }
.kf-check span { display: grid; gap: 2px; font-size: .9rem; }
.kf-check small { font-size: .78rem; color: var(--muted); }
.of-actions .btn .ic { width: 18px; height: 18px; }
.of-actions .btn { gap: 6px; }
.kh-head h1 { white-space: nowrap; font-size: 1.45rem; }
.kh-head .btn { white-space: nowrap; flex: none; padding: 0 16px; min-height: 42px; }
@media (max-width: 380px) { .kh-head h1 { font-size: 1.3rem; } }

/* ---------- Chi tiết khách hàng ---------- */
.kd-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.kd-id { display: flex; align-items: center; gap: 14px; }
.kd-av { width: 52px !important; height: 52px !important; font-size: 1.3rem !important; }
.kd-av .ic { width: 26px; height: 26px; }
.kd-name { display: grid; gap: 2px; min-width: 0; }
.kd-name b { font-size: 1.2rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.kd-name small { font-size: .82rem; color: var(--muted); }
.kd-acts { display: flex; gap: 8px; margin-top: 14px; }
.kd-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--road); font-weight: 500; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.kd-btn:hover { background: var(--hover); text-decoration: none; }
.kd-btn .ic { width: 18px; height: 18px; }
.kd-btn.primary { background: var(--road); border-color: var(--road); color: #fff; flex: 1.3; }
.kd-btn.primary:hover { background: #0842a0; }
.kd-zalo { display: inline-grid; place-items: center; height: 18px; padding: 0 5px; border-radius: 5px; background: #0068ff; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .02em; }
.kd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.kd-stats > div { display: grid; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.kd-stats b { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
.kd-stats b.info { color: var(--info); }
.kd-stats small { font-size: .75rem; color: var(--muted); }
.kd-info { margin-bottom: 14px; }
.kd-row { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid #f1f3f4; }
.kd-info .od-sec-h + .kd-row { border-top: 0; padding-top: 2px; }
.kd-row > .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--muted); }
.kd-row > span { display: grid; gap: 2px; min-width: 0; font-size: .95rem; }
.kd-row small { font-size: .75rem; color: var(--muted); font-weight: 400; }
.kd-row i { font-style: normal; color: var(--muted); font-size: .88rem; }
.kd-addr { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.kd-sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 8px; }
.kd-sec-h h2 { margin: 0; font-size: 1.05rem; }
.kd-sec-h span { font-size: .8rem; color: var(--muted); }
.kd-orders { display: grid; gap: 8px; }
.kd-orders .ocard { margin: 0; }
.kd-mo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--hover); color: inherit; text-decoration: none; }
.kd-mo:first-child { border-top: 0; }
.kd-mo span { display: grid; gap: 2px; min-width: 0; }
.kd-mo small { font-size: .78rem; color: var(--muted); }
.kh-empty .btn { margin-top: 6px; }

/* ---------- Nhân sự: danh sách + form ---------- */
.ps-hint { display: flex; gap: 6px; align-items: flex-start; margin: 0 2px 10px; font-size: .82rem; color: var(--muted); }
.ps-hint .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.ps-row .kh-main { align-items: flex-start; }
.ps-row .kh-av { margin-top: 2px; }
.ps-row .kh-av.owner { background: var(--navy); color: #fff; }
.ps-row.off .kh-main { opacity: .6; }
.ps-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ps-tags .tag { font-size: .7rem; padding: 1px 8px; }
.ps-act { display: flex; align-items: center; gap: 6px; flex: none; }
.ps-act form { margin: 0; }
.ps-act .btn.small { min-height: 34px; padding: 0 12px; font-size: .82rem; }
.ps-act.od-menu { position: relative; }
.ps-act .account-menu { right: 0; min-width: 220px; }
.ps-act .account-menu form { margin: 0; }
.ps-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.ps-photo { position: relative; display: grid; grid-template-rows: 1fr auto; aspect-ratio: 1.58; border: 1.5px dashed #c4c7c5; border-radius: 12px; overflow: hidden; background: var(--bg); cursor: pointer; font-weight: 400; }
.ps-photo.has { border-style: solid; border-color: var(--line); }
.ps-photo.has-err { border-color: var(--bad); }
.ps-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-ph-empty { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--road); font-size: .8rem; }
.ps-ph-empty .ic { width: 26px; height: 26px; }
.ps-ph-cap { position: relative; z-index: 1; padding: 5px 8px; font-size: .75rem; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.9); }
.ps-photo.has .ps-ph-cap { position: absolute; left: 0; right: 0; bottom: 0; }
.ps-ph-cap em { font-style: normal; font-weight: 400; margin-left: 4px; }
.ps-photo .err { position: absolute; top: 4px; left: 4px; right: 4px; z-index: 2; background: #fff; font-size: .72rem; }
.kf-count .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.ps-seg { display: flex; gap: 8px; }
.ps-seg label { flex: 1; cursor: pointer; font-weight: 400; }
.ps-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ps-seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; }
.ps-seg input:checked + span { border-color: var(--road); background: var(--tonal); color: var(--road); }
.ps-seg label:last-child input:checked + span { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.ps-roles { display: grid; gap: 8px; }
.ps-role { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 400; }
.ps-role input { position: absolute; opacity: 0; pointer-events: none; }
.ps-role-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.ps-role-ic .ic { width: 20px; height: 20px; }
.ps-role > span:last-child { display: grid; gap: 2px; }
.ps-role b { font-size: .95rem; }
.ps-role small { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.ps-role:has(input:checked) { border-color: var(--road); background: var(--tonal); }
.ps-role:has(input:checked) .ps-role-ic { background: var(--road); color: #fff; }
.ps-role:has(input:focus-visible) { outline: 2px solid var(--road); outline-offset: 2px; }
.ps-row .kh-t b { white-space: normal; overflow-wrap: anywhere; }
.kh-list:has(.ps-act.od-menu) { overflow: visible; }
/* Hồ sơ lái xe */
.kd-card.off .kd-id { opacity: .65; }
.kd-name .ps-tags { margin-top: 4px; }
.ds-photos { grid-template-columns: 1fr 1fr; margin-top: 8px; }
.ds-photos img { height: auto; aspect-ratio: 1.58; }
.ds-nophoto { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1.58; border: 1.5px dashed #c4c7c5; border-radius: 8px; color: var(--muted); font-size: .78rem; text-decoration: none; }
.ds-nophoto .ic { width: 22px; height: 22px; }
.kd-info .ms-note { margin-top: 0; }
.kd-info .btn .ic { width: 18px; height: 18px; }
.kd-info .btn { gap: 6px; }

/* ---------- Xe: danh sách, form, chi tiết ---------- */
.vh-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -2px 2px 12px; font-size: .84rem; color: var(--muted); }
.vh-sum span { display: inline-flex; align-items: center; gap: 5px; }
.vh-sum .ic { width: 15px; height: 15px; }
.vh-sum .warn { color: var(--warn); } .vh-sum .ok { color: var(--ok); }
.vh-list { display: grid; gap: 8px; }
.vh-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; }
.vh-card:hover { border-color: #c4c7c5; background: #fcfcfd; text-decoration: none; }
.vh-card.need { border-left: 4px solid var(--orange); }
.vh-card.off { opacity: .6; }
.vh-tile { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.vh-tile .ic { width: 22px; height: 22px; }
.vh-tile.lg { width: 52px; height: 52px; border-radius: 14px; }
.vh-tile.lg .ic { width: 26px; height: 26px; }
.vh-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.vh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vh-top b { font-size: 1.05rem; letter-spacing: .02em; }
.vh-top .tag { flex: none; }
.vh-body > small { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vh-paper { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #f1f3f4; }
.kd-info .od-sec-h + .vh-paper { border-top: 0; padding-top: 2px; }
.vh-paper > span:first-child { display: grid; gap: 1px; min-width: 0; }
.vh-paper b { font-size: .95rem; font-weight: 600; }
.vh-paper small { font-size: .78rem; color: var(--muted); }
.vh-paper .tag { flex: none; }
.kd-stats b.bad { color: var(--bad); }
.kd-name b.mono { letter-spacing: .03em; }
.kf-lbl { display: block; margin: 0 0 6px; font-weight: 500; font-size: .9rem; }
.kf-row.two { grid-template-columns: 1fr 1fr; }
.kf-row.two .field { margin-bottom: 0; }
.kf-row.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .kf-row.two { grid-template-columns: 1fr 1fr; gap: 10px; } .kf-row.two .field { margin-bottom: 0; } .kf-row.three { grid-template-columns: 1fr; } }
.kf .kf-row.two + .kf-lbl { margin-top: 14px; }
.chips-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-radio label { cursor: pointer; font-weight: 400; }
.chips-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chips-radio span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .9rem; font-weight: 500; }
.chips-radio input:checked + span { border-color: var(--road); background: var(--tonal); color: var(--road); }
.chips-radio input:focus-visible + span { outline: 2px solid var(--road); outline-offset: 2px; }
.chips-radio.st .s-ready input:checked + span { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.chips-radio.st .s-maintenance input:checked + span { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.chips-radio.st .s-stopped input:checked + span { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

/* ---------- Phí sàn (nhà xe) ---------- */
.cm-title { margin: 0 0 12px; }
.cm-hero { display: grid; gap: 4px; padding: 16px; margin-bottom: 10px; border-radius: 16px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; }
.cm-hero:hover { text-decoration: none; }
.cm-hero small { font-size: .82rem; font-weight: 500; color: var(--muted); }
.cm-hero > b { font-size: 1.9rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.cm-hero.warn { background: var(--warn-bg); border-color: #f6d690; }
.cm-hero.warn > b { color: #8a4b00; }
.cm-hero.bad { background: var(--bad-bg); border-color: #f4b4ae; }
.cm-hero.bad > b { color: var(--bad); }
.cm-hero.ok { background: var(--ok-bg); border-color: #b7dfc2; }
.cm-ok { display: flex; align-items: center; gap: 8px; font-size: 1.15rem !important; font-weight: 700; color: var(--ok); }
.cm-ok .ic { width: 22px; height: 22px; }
.cm-due { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--ink); }
.cm-due .ic { width: 16px; height: 16px; flex: none; }
.cm-hero.bad .cm-due { color: var(--bad); font-weight: 500; }
.cm-go { display: inline-flex; align-items: center; gap: 2px; margin-top: 6px; font-size: .85rem; font-weight: 600; color: var(--road); }
.cm-go .ic { width: 16px; height: 16px; transform: rotate(-90deg); }
.cm-prog { display: grid; gap: 4px; margin-top: 8px; }
.cm-prog .sch-bar { margin: 0; background: rgba(0,0,0,.08); }
.cm-prog .sch-bar i { background: var(--ok); }
.cm-prog small { font-size: .78rem; }
.kd-stats .sch-bar { margin: 6px 0 0; height: 5px; }
.kd-stats .sch-bar i { background: var(--warn); }
.cm-how { margin-bottom: 10px; }
.cm-how summary > span { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; }
.cm-how summary .ic:not(.chev) { width: 18px; height: 18px; color: var(--muted); }
.cm-steps { margin: 0 16px 14px 34px !important; padding: 0; display: grid; gap: 8px; font-size: .88rem; color: #3c4043; }
.cm-bank { margin-bottom: 14px; }
.cm-brow { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #f1f3f4; }
.cm-bank .od-sec-h + .cm-brow { border-top: 0; }
.cm-brow small { font-size: .78rem; color: var(--muted); }
.cm-brow b { font-size: .95rem; overflow-wrap: anywhere; }
.cm-copy { border: 1px solid var(--line); background: #fff; color: var(--road); border-radius: 999px; min-height: 30px; padding: 0 12px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cm-copy:hover { background: var(--hover); }
.cm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--hover); color: inherit; text-decoration: none; }
.cm-row:first-child { border-top: 0; }
.cm-row.link:hover { background: #fcfcfd; text-decoration: none; }
.cm-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.cm-row small { font-size: .78rem; color: var(--muted); }
.cm-row > b, .cm-r b { white-space: nowrap; font-size: .95rem; }
.cm-row > b.ok { color: var(--ok); }
.cm-r { display: grid; justify-items: end; gap: 3px; flex: none; }
.cm-need { color: var(--warn); font-weight: 600; }
.cm-confirm { margin-bottom: 10px; }
.cm-text { margin: 0 0 10px; font-size: .88rem; color: #3c4043; }
.cm-confirm .btn { gap: 6px; } .cm-confirm .btn .ic { width: 18px; height: 18px; }
.cm-okline { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .88rem; color: var(--ok); }
.cm-okline .ic { width: 18px; height: 18px; flex: none; }
.cm-bank .hint { font-size: .8rem; margin: 8px 0 0; color: var(--muted); }

/* ---------- Báo cáo tháng ---------- */
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.rp-head h1 { margin: 0; }
.rp-xls { width: auto; padding: 0 12px; gap: 6px; border: 1px solid var(--line); border-radius: 999px; color: #137333; font-weight: 600; font-size: .85rem; height: 38px; display: inline-flex; align-items: center; text-decoration: none; background: #fff; }
.rp-xls .ic { width: 18px; height: 18px; }
.rp-month { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.rp-month > span { display: grid; text-align: center; line-height: 1.15; }
.rp-month small { font-size: .72rem; color: var(--muted); }
.rp-month b { font-size: 1.02rem; }
.sch-arrow.off { visibility: hidden; }
.rp-hero { display: grid; gap: 4px; padding: 16px; margin-bottom: 10px; border-radius: 16px; background: var(--navy); color: #fff; }
.rp-hero > small { font-size: .8rem; opacity: .8; }
.rp-hero > b { font-size: 1.95rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.rp-split { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .82rem; opacity: .9; }
.rp-split b { font-weight: 600; }
.rp-exp { margin-top: 6px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.18); font-size: .8rem; opacity: .85; }
.rp-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
@media (min-width: 700px) { .rp-kpi { grid-template-columns: repeat(4, 1fr); } }
.rp-kpi > div { display: grid; gap: 1px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.rp-kpi b { font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.rp-kpi small { font-size: .8rem; color: #3c4043; font-weight: 500; }
.rp-kpi em { font-style: normal; font-size: .72rem; color: var(--muted); }
.rp-kpi .ok b { color: var(--ok); } .rp-kpi .info b { color: var(--info); } .rp-kpi .bad b { color: var(--bad); }
.rp-chart { margin-bottom: 10px; }
.rp-bars { display: block; width: 100%; height: 120px; }
.rp-bars rect { fill: var(--road); }
.rp-bars line { stroke: var(--line); stroke-width: .4; }
.rp-axis { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.rp-note { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.rp-empty { margin: 0; padding: 14px 0; text-align: center; color: var(--muted); font-size: .88rem; }
.rp-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px; margin-bottom: 14px; }
.rp-mini > * { display: grid; gap: 2px; min-width: 0; color: inherit; text-decoration: none; }
.rp-mini > * + * { border-left: 1px solid var(--hover); padding-left: 10px; }
.rp-mini small { font-size: .74rem; color: var(--muted); }
.rp-mini b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-mini em { font-style: normal; font-size: .72rem; font-weight: 600; } .rp-mini em.bad { color: var(--bad); }
.rp-list { margin-bottom: 14px; }
.rp-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hover); }
.rp-row:first-child { border-top: 0; }
.rp-l { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rp-l b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-l small { font-size: .78rem; color: var(--muted); }
.rp-bar { height: 5px; border-radius: 99px; background: var(--hover); overflow: hidden; margin-top: 3px; }
.rp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--road); }
.rp-bar.alt i { background: var(--ok); } .rp-bar.alt2 i { background: var(--orange); }
.rp-v { flex: none; font-size: .95rem; white-space: nowrap; }
.rp-orders { margin-bottom: 10px; }
.rp-olist { margin: 0 !important; border-top: 1px solid var(--hover); }
.rp-o { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--hover); color: inherit; text-decoration: none; }
.rp-o:first-child { border-top: 0; }
.rp-o:hover { background: #fcfcfd; text-decoration: none; }
.rp-od { flex: none; width: 40px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.rp-r { flex: none; display: grid; justify-items: end; gap: 3px; }
.rp-r b { font-size: .9rem; }
.rp-r .tag { font-size: .68rem; padding: 1px 7px; }
.rp-foot { margin: 6px 2px 0; font-size: .75rem; color: var(--muted); line-height: 1.45; }

/* ---------- Cài đặt ---------- */
.st-form { margin-bottom: 10px; }
.st-prefix { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: end; }
.st-prefix .field { margin: 0 !important; }
.st-prefix input { text-transform: uppercase; font-family: ui-monospace, monospace; font-weight: 600; letter-spacing: .04em; }
.st-preview { display: grid; gap: 2px; padding: 9px 12px; border-radius: 10px; background: var(--bg); border: 1px dashed var(--line); min-height: 46px; }
.st-preview small { font-size: .72rem; color: var(--muted); }
.st-preview b { font-size: 1rem; color: var(--road); }
.st-sw { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #f1f3f4; cursor: pointer; font-weight: 400; }
.of-sec > h2 + .st-sw { border-top: 0; padding-top: 2px; }
.st-sw input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.st-t { flex: 1; display: grid; gap: 2px; }
.st-t b { font-size: .95rem; }
.st-t small { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.st-k { flex: none; position: relative; width: 44px; height: 26px; border-radius: 99px; background: #c4c7c5; transition: background .15s; }
.st-k::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.st-sw input:checked ~ .st-k { background: var(--road); }
.st-sw input:checked ~ .st-k::after { transform: translateX(18px); }
.st-sw input:focus-visible ~ .st-k { outline: 2px solid var(--road); outline-offset: 2px; }
.st-form .of-actions { justify-content: flex-end; }
.st-card { margin-bottom: 10px; }
.st-dl { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.st-dl > span:last-child { display: grid; gap: 2px; }
.st-dl b { font-size: .95rem; } .st-dl small { font-size: .8rem; color: var(--muted); }
.st-btn { margin-top: 10px; gap: 6px; } .st-btn .ic { width: 18px; height: 18px; }

/* ---------- Thông báo ---------- */
.nt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.nt-head h1 { margin: 0; display: flex; align-items: center; gap: 8px; }
.nt-head form { margin: 0; }
.nt-head .btn { gap: 4px; } .nt-head .btn .ic { width: 16px; height: 16px; }
.nt-count { background: var(--bad-bg); color: var(--bad); }
.nt-push { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.nt-push .vh-tile { width: 40px; height: 40px; }
.nt-push-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nt-push-t b { font-size: .92rem; }
.nt-push-t small { font-size: .78rem; color: var(--muted); }
.nt-push-a { flex: none; display: grid; justify-items: center; gap: 2px; }
.nt-push-a .btn { min-height: 34px; padding: 0 16px; }
.nt-off { border: 0; background: none; color: var(--muted); font: inherit; font-size: .75rem; cursor: pointer; padding: 2px 6px; }
.nt-filter { margin-bottom: 4px; }
.nt-group .sch-sec { margin-top: 12px; }
.nt-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-top: 1px solid var(--hover); color: inherit; text-decoration: none; background: #f5f9ff; }
.nt-item:first-child { border-top: 0; }
.nt-item.read { background: #fff; }
.nt-item:hover { background: var(--hover); text-decoration: none; }
.nt-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.nt-ic .ic { width: 18px; height: 18px; }
.nt-ic.info { background: var(--info-bg); color: var(--info); } .nt-ic.ok { background: var(--ok-bg); color: var(--ok); }
.nt-ic.warn { background: var(--warn-bg); color: var(--warn); } .nt-ic.bad { background: var(--bad-bg); color: var(--bad); }
.nt-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nt-top b { font-size: .92rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-item.read .nt-top b { font-weight: 500; color: #3c4043; }
.nt-top small { flex: none; font-size: .74rem; color: var(--muted); }
.nt-body { font-size: .84rem; color: #3c4043; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-item.read .nt-body { color: var(--muted); }
.nt-dot { position: absolute; right: 12px; bottom: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--road); }
.st-form .hint { font-size: .8rem; margin: 8px 0 0; }

/* ===== Tổng quan nhà xe v2 (30/09): việc cần làm · xe hôm nay · tiền (chủ nhà xe) ===== */
.db-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 4px 0 14px; }
.db-top h1 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.db-top .eyebrow { margin: 0 0 2px; }
.db-date { font-size: .8rem; color: var(--muted); text-align: right; white-space: nowrap; line-height: 1.35; }
.db-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; color: inherit; text-decoration: none; }
a.db-card:hover { background: #fcfcfd; }
.db-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.db-h h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.db-pill { background: var(--bad-bg); color: var(--bad); font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.db-sub { font-size: .85rem; color: var(--road); font-weight: 500; }
.db-muted { margin: 0; color: var(--muted); font-size: .9rem; }
.db-ok { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ok); font-weight: 500; font-size: .95rem; }
.db-ok .ic { width: 20px; height: 20px; }
.db-todo { padding-bottom: 6px; }
.db-row { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.db-h + .db-row { border-top: 0; }
.db-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.db-ic .ic { width: 17px; height: 17px; }
.db-row.t-warn .db-ic { background: var(--warn-bg); color: var(--warn); }
.db-row.t-bad .db-ic { background: var(--bad-bg); color: var(--bad); }
.db-row.t-info .db-ic { background: var(--info-bg); color: var(--info); }
.db-l { flex: 1; min-width: 0; font-size: .93rem; line-height: 1.3; }
.db-n { font-size: 1rem; font-variant-numeric: tabular-nums; }
.db-row.t-bad .db-n { color: var(--bad); }
.db-row.t-warn .db-n { color: var(--warn); }
.db-go { flex: none; min-width: 64px; text-align: right; color: var(--road); font-size: .85rem; font-weight: 500; }
.db-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.db-acts .btn { justify-content: center; }
.db-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--hover); gap: 2px; }
.db-bar i, .db-leg i { display: block; }
.db-bar .run, .db-leg .run { background: var(--info); }
.db-bar .wait, .db-leg .wait { background: #f9ab00; }
.db-bar .free, .db-leg .free { background: #81c995; }
.db-bar .maint, .db-leg .maint { background: #bdc1c6; }
.db-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.db-leg span { display: inline-flex; align-items: center; gap: 5px; }
.db-leg i { width: 9px; height: 9px; border-radius: 50%; }
.db-leg b { color: var(--ink); }
.db-hero { display: block; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; text-decoration: none; }
.db-hero-l { display: block; font-size: .85rem; opacity: .8; }
.db-hero-v { display: block; font-size: 1.6rem; line-height: 1.25; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.db-hero-d { font-size: .82rem; opacity: .85; }
.db-hero-d .up { color: #81c995; font-weight: 600; }
.db-hero-d .down { color: #f28b82; font-weight: 600; }
.db-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.db-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; color: inherit; text-decoration: none; min-width: 0; }
.db-tile span { display: block; font-size: .8rem; color: var(--muted); }
.db-tile b { display: block; font-size: 1.2rem; margin: 2px 0; font-variant-numeric: tabular-nums; }
.db-tile small { font-size: .78rem; color: var(--muted); }
.db-tile.bad { border-color: #f4c7c3; background: #fffafa; }
.db-tile.bad b, .db-tile.bad small { color: var(--bad); }
.db-cols { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-bottom: 18px; position: relative; }
.db-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; }
.db-col i { display: block; background: #a8c7fa; border-radius: 3px 3px 0 0; }
.db-col.today i { background: var(--info); }
.db-col em { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-style: normal; font-size: .66rem; color: var(--muted); }
.db-col:nth-child(even) em { visibility: hidden; }
.db-col.today em { visibility: visible; color: var(--ink); font-weight: 600; }
.db-cols::after { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .db-top, .db-card, .db-acts, .db-hero, .db-tiles { max-width: 760px; }
}

/* ===== Đăng nhập / Quên mật khẩu (30/09) ===== */
.au-body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #e8f0fe 0, #f3f6fb 220px, var(--bg) 420px); }
.au-wrap { width: 100%; max-width: 400px; margin: 0 auto; padding: max(36px, env(safe-area-inset-top)) 16px 20px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; box-sizing: border-box; }
.au-brand { text-align: center; margin-bottom: 18px; }
.au-logo { width: 56px; height: 56px; border-radius: 14px; display: block; margin: 0 auto 10px; box-shadow: 0 2px 8px rgba(15, 39, 71, .16); background: #fff; }
.au-name { font-size: 1.15rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.au-sub { font-size: .78rem; color: var(--muted); margin-top: 2px; word-break: break-all; }
.au-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px 20px; box-shadow: 0 1px 2px rgba(60, 64, 67, .06); }
.au-card h1 { margin: 0; font-size: 1.4rem; font-weight: 500; text-align: left; }
.au-lead { margin: 4px 0 18px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.au-muted { color: var(--muted); font-size: .82rem; }
.au-alert { display: flex; gap: 8px; align-items: flex-start; background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin-bottom: 14px; line-height: 1.4; }
.au-alert .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.au-field { margin-bottom: 14px; }
.au-field > label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.au-input { display: flex; align-items: center; gap: 8px; border: 1px solid #c4c7c5; border-radius: 10px; height: 50px; padding: 0 4px 0 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.au-input > .ic { width: 19px; height: 19px; color: var(--muted); flex: none; }
.au-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; height: 100%; padding: 0; color: var(--ink); box-shadow: none; }
.au-input input::placeholder { color: #9aa0a6; }
.au-input:focus-within { border-color: var(--road); box-shadow: 0 0 0 3px var(--tonal); }
.au-input:focus-within > .ic { color: var(--road); }
.au-input.bad { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.au-eye { flex: none; width: 42px; height: 42px; border: 0; background: transparent; border-radius: 50%; color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.au-eye:hover { background: var(--hover); }
.au-eye.on { color: var(--road); }
.au-eye .ic { width: 20px; height: 20px; }
.au-challenge small { display: block; margin-top: 6px; color: var(--warn); font-size: .8rem; }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 18px; font-size: .88rem; flex-wrap: wrap; }
.au-row a { color: var(--road); text-decoration: none; font-weight: 500; }
.au-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); cursor: pointer; min-height: 32px; }
.au-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--road); }
.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: 1px solid var(--road); border-radius: 25px; background: var(--road); color: #fff; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; box-sizing: border-box; transition: background .15s; }
.au-btn:hover { background: #0842a0; border-color: #0842a0; }
.au-btn .ic { width: 18px; height: 18px; }
.au-btn.busy { opacity: .85; cursor: progress; }
.au-btn.busy::before { content: ""; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: au-spin .7s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
.au-btn.ghost { background: #fff; color: var(--road); border-color: var(--line); }
.au-btn.ghost:hover { background: var(--tonal); }
.au-btn.sm { width: auto; height: 38px; padding: 0 14px; border-radius: 19px; font-size: .88rem; }
.au-btn.block { width: 100%; margin-top: 18px; }
.au-contacts { list-style: none; margin: 0 0 16px; padding: 0; }
.au-contact { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.au-contact:first-child { border-top: 0; padding-top: 4px; }
.au-cic { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--tonal); color: var(--road); display: grid; place-items: center; }
.au-cic .ic { width: 19px; height: 19px; }
.au-cmain { flex: 1; min-width: 0; }
.au-cmain > b { display: block; font-size: .95rem; }
.au-cmain > span { display: block; color: var(--muted); font-size: .85rem; }
.au-cbtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.au-steps { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.au-step { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; line-height: 1.4; color: var(--ink); }
.au-step i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--road); color: #fff; font-style: normal; font-size: .75rem; font-weight: 600; display: grid; place-items: center; margin-top: 1px; }
.au-foot { margin-top: auto; padding-top: 22px; text-align: center; font-size: .78rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.au-foot a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.au-foot a .ic { width: 14px; height: 14px; }
@media (min-width: 700px) { .au-wrap { justify-content: center; padding-top: 40px; } .au-card { padding: 28px 28px 24px; } .au-foot { margin-top: 18px; } }
.au-host { font-size: .74rem; color: #80868b; margin-top: 1px; word-break: break-all; }
.brand2-tile.img { background: transparent; overflow: hidden; }
.brand2-tile.img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ===== Danh sách nhà xe (Công ty) ===== */
.nx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.nx-head h1 { margin: 0; }
.nx-sum { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.nx-sum b { color: var(--ink); }
.t-ok { color: var(--ok); } .t-bad { color: var(--bad); } .t-warn { color: var(--warn); }
.nx-head .btn .ic { width: 18px; height: 18px; }
.nx-head .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.nx-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 0 14px; height: 44px; margin-bottom: 12px; }
.nx-search .ic { width: 18px; height: 18px; color: var(--muted); }
.nx-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; background: transparent; height: 100%; padding: 0; box-shadow: none; }
.nx-list { display: grid; gap: 12px; }
@media (min-width: 900px) { .nx-list { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); } }
.nx-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.nx-card.is-locked { border-color: #f4c7c3; background: #fffafa; }
.nx-card.is-closed { opacity: .65; }
.nx-top { display: flex; align-items: flex-start; gap: 12px; }
.nx-av { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; overflow: hidden; }
.nx-av .ic { width: 22px; height: 22px; }
.nx-av.img { background: transparent; }
.nx-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nx-main { flex: 1; min-width: 0; }
.nx-main h2 { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.nx-dom { display: inline-block; max-width: 100%; font-size: .82rem; color: var(--road); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-top > .tag { flex: none; margin-top: 2px; }
.nx-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hover); }
.nx-facts > div { min-width: 0; }
.nx-facts dt { font-size: .74rem; color: var(--muted); margin: 0; }
.nx-facts dd { margin: 1px 0 0; font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; }
.nx-facts dd a { color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.nx-facts .nx-wide { grid-column: 1 / -1; }
.nx-facts small { color: var(--muted); font-weight: 400; }
.nx-note { font-size: .72rem; background: #f1f3f4; border-radius: 6px; padding: 0 5px; }
.nx-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.nx-acts .nx-lock { margin-left: auto; }
.nx-orphans { background: var(--warn-bg); border: 1px solid #f6dfa4; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.nx-orphans-h { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.nx-orphans-h .ic { width: 18px; height: 18px; }
.nx-orphans > p { margin: 4px 0 8px; font-size: .86rem; color: var(--ink); }
.nx-orphan { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border-radius: 10px; padding: 8px 10px; margin-top: 6px; }
.nx-orphan b { display: block; font-size: .92rem; }
.nx-orphan small { font-size: .78rem; color: var(--muted); }
[x-cloak] { display: none !important; }
.nx-acts { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.nx-acts .nx-lock { margin: 0; }
.nx-acts .btn, .nx-acts .nx-lock .btn { width: 100%; justify-content: center; padding: 0 8px; }
.nx-head { align-items: flex-start; }
.nx-acts .btn { white-space: nowrap; font-size: .88rem; gap: 4px; }

/* ===== Sàn đơn — Công ty ===== */
.mo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mo-head h1 { margin: 0; }
.mo-sum { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.mo-sum b { color: var(--ink); }
.mo-head .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.mo-head .btn .ic { width: 18px; height: 18px; }
.mo-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 10px; padding: 0 16px 2px; }
.mo-tabs::-webkit-scrollbar { display: none; }
.mo-tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); font-size: .86rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.mo-tabs a b { min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--hover); font-size: .76rem; text-align: center; }
.mo-tabs a[aria-current="page"] { background: var(--tonal); border-color: var(--tonal); color: var(--road); }
.mo-tabs a[aria-current="page"] b { background: #fff; }
.mo-tabs a.bad b { background: var(--bad-bg); color: var(--bad); }
.mo-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; background: #fff; border: 1px solid var(--line); border-radius: 22px; margin-bottom: 10px; }
.mo-search:focus-within { border-color: var(--road); box-shadow: 0 0 0 3px var(--tonal); }
.mo-search > .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mo-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: .95rem; height: 100%; padding: 0; box-shadow: none; }
.mo-clear { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.mo-clear:hover { background: var(--hover); }
.mo-clear .ic { width: 16px; height: 16px; }
.mo-total { margin: 0 2px 8px; font-size: .82rem; color: var(--muted); }
.mo-list { display: grid; gap: 10px; }
@media (min-width: 900px) { .mo-list { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } }
.mo-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.mo-card:hover { border-color: #c4c7c5; text-decoration: none; }
.mo-card.is-late { border-left: 3px solid var(--bad); }
.mo-r1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mo-code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; color: var(--muted); }
.mo-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mo-tags .tag { font-size: .74rem; padding: 1px 8px; }
.mo-route { margin-top: 4px; font-size: 1.05rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.mo-arrow { color: var(--muted); font-weight: 400; }
.mo-goods { margin-top: 2px; font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .84rem; color: #3c4043; }
.mo-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.mo-meta .ic { width: 15px; height: 15px; color: var(--muted); flex: none; }
.mo-carrier { color: var(--road) !important; font-weight: 500; }
.mo-carrier .ic { color: var(--road) !important; }
.mo-r4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hover); }
.mo-price { font-size: 1.02rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mo-pct { font-size: .8rem; color: var(--muted); }
.mo-r4 .tag { margin-left: auto; font-size: .74rem; }

/* ===== Đối soát phí sàn (Công ty) ===== */
.ds-hero { background: var(--navy); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 16px; }
.ds-main span, .ds-split span { display: block; font-size: .8rem; opacity: .8; }
.ds-main b { display: block; font-size: 1.6rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.ds-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.15); }
.ds-split b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.ds-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(242, 139, 130, .18); color: #ffd7d3; font-size: .84rem; }
.ds-alert .ic { width: 16px; height: 16px; }
.ds-alert b { color: #fff; }
.ds-list { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 18px; }
.ds-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--hover); color: var(--ink); text-decoration: none; }
.ds-row:first-child { border-top: 0; }
.ds-row:hover { background: #fafbfc; text-decoration: none; }
.ds-row.is-sel { background: var(--tonal); }
.ds-row.is-over { box-shadow: inset 3px 0 0 var(--bad); }
.ds-row .nx-av { width: 40px; height: 40px; border-radius: 11px; }
.ds-rmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.ds-rmain b { font-size: .95rem; overflow-wrap: anywhere; }
.ds-rmain small { font-size: .78rem; color: var(--muted); }
.ds-rmain .tag { font-size: .72rem; padding: 1px 8px; white-space: normal; }
.ds-rtot { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 42%; }
.ds-rtot b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.ds-rtot small { font-size: .72rem; color: var(--muted); }
.ds-bar { display: block; width: 100%; min-width: 72px; height: 5px; border-radius: 3px; background: var(--hover); overflow: hidden; }
.ds-bar > i { display: block; height: 100%; background: var(--road); border-radius: 3px; }
.ds-bar > i.warn { background: #f9ab00; } .ds-bar > i.bad { background: var(--bad); } .ds-bar > i.ok { background: #1e8e3e; }
.ds-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ds-filter label { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 19px; }
.ds-filter label .ic { width: 16px; height: 16px; color: var(--muted); }
.ds-filter input[type=month] { border: 0; outline: 0; background: transparent; font: inherit; font-size: .88rem; padding: 0; height: 100%; box-shadow: none; min-width: 0; width: 150px; }
.ds-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--tonal); color: var(--road); font-size: .84rem; font-weight: 500; text-decoration: none; }
.ds-periods { display: grid; gap: 10px; margin-bottom: 18px; }
@media (min-width: 900px) { .ds-periods { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.ds-period { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.ds-period:hover { border-color: #c4c7c5; text-decoration: none; }
.ds-period.is-over { border-left: 3px solid var(--bad); }
.ds-p1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ds-p1 b { font-size: 1rem; }
.ds-p1 .tag { font-size: .74rem; padding: 1px 8px; }
.ds-p2 { font-size: .86rem; color: #3c4043; }
.ds-p3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.ds-p3 b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ds-p3 small { font-size: .8rem; color: var(--muted); }
.ds-p4 { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.ds-fold { margin-bottom: 10px; }
.ds-fold > summary > span { display: inline-flex; align-items: center; gap: 8px; }
.ds-fold > summary .ic { width: 18px; height: 18px; }
.ds-fold .hint { margin: 0 0 10px; font-size: .84rem; color: var(--muted); }
.ds-inline { display: flex; gap: 8px; }
.ds-inline input { flex: 1; min-width: 0; }
.ds-flab { font-size: .84rem; color: var(--muted); } .ds-rmain small { line-height: 1.35; }

/* ===== Người dùng (Công ty) ===== */
.us-filter { display: flex; gap: 8px; margin-bottom: 12px; }
.us-filter .mo-search { flex: 1; min-width: 0; margin: 0; }
.us-site { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 22px; max-width: 46%; }
.us-site .ic { width: 16px; height: 16px; color: var(--muted); flex: none; }
.us-site select { border: 0; outline: 0; background: transparent; font: inherit; font-size: .88rem; height: 100%; padding: 0; min-width: 0; max-width: 100%; box-shadow: none; }
.ps-row .kh-av { font-size: .95rem; }
.us-site-t { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: #3c4043; max-width: 100%; }
.us-site-t .ic { width: 13px; height: 13px; color: var(--muted); flex: none; }
.ps-act .account-menu a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.ps-act .account-menu a:hover { background: var(--hover); }
.ps-act .account-menu a .ic { width: 18px; height: 18px; color: var(--muted); }
.us-who { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; max-width: 560px; }
.us-who b { display: block; }
.us-who small { font-size: .82rem; color: var(--muted); }
.us-note { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: 4px 0 14px; line-height: 1.45; }
.us-note .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ===== Hộp xác nhận thay cho confirm() của trình duyệt ===== */
.cf-back { position: fixed; inset: 0; z-index: 90; background: rgba(32, 33, 36, .45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: cf-fade .12s ease-out; }
@media (min-width: 600px) { .cf-back { align-items: center; } }
.cf-box { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 20px 20px 16px; box-shadow: 0 8px 28px rgba(0,0,0,.2); animation: cf-up .16s ease-out; }
.cf-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tonal); color: var(--road); margin-bottom: 10px; }
.cf-box.danger .cf-ic { background: var(--bad-bg); color: var(--bad); }
.cf-ic .ic { width: 20px; height: 20px; }
.cf-msg { margin: 0 0 18px; font-size: .98rem; line-height: 1.5; color: var(--ink); }
.cf-btns { display: flex; gap: 8px; justify-content: flex-end; }
.cf-btns button { min-height: 44px; padding: 0 18px; border-radius: 22px; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--road); }
.cf-btns .cf-ok { background: var(--road); border-color: var(--road); color: #fff; }
.cf-box.danger .cf-ok { background: var(--bad); border-color: var(--bad); }
@keyframes cf-fade { from { opacity: 0; } }
@keyframes cf-up { from { transform: translateY(12px); opacity: .6; } }

/* ===== Cài đặt mạng (Công ty) ===== */
.ns-h { display: flex; align-items: center; gap: 10px; }
.ns-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--tonal); color: var(--road); display: grid; place-items: center; }
.ns-ic.warn { background: var(--warn-bg); color: var(--warn); }
.ns-ic .ic { width: 18px; height: 18px; }
.ns-lead { margin: -4px 0 12px; font-size: .84rem; color: var(--muted); line-height: 1.45; }
.ns-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid #f1f3f4; }
.ns-lead + .ns-row, .ns-h + .ns-row { border-top: 0; padding-top: 2px; }
.ns-l { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 400 !important; min-width: 0; }
.ns-l b { font-size: .92rem; font-weight: 500; }
.ns-l small { flex-basis: 100%; font-size: .78rem; color: var(--muted); line-height: 1.4; }
.ns-off { font-size: .68rem !important; padding: 0 7px !important; }
.ns-in { display: inline-flex; align-items: center; height: 44px; border: 1px solid #c4c7c5; border-radius: 10px; background: #fff; overflow: hidden; }
.ns-in:focus-within { border-color: var(--road); box-shadow: 0 0 0 3px var(--tonal); }
.ns-in input { width: 88px; border: 0 !important; box-shadow: none !important; outline: 0; background: transparent; font: inherit; font-size: 1rem; font-weight: 600; text-align: right; padding: 0 8px; height: 100%; min-height: 0 !important; -moz-appearance: textfield; }
.ns-in input::-webkit-outer-spin-button, .ns-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ns-in em { font-style: normal; font-size: .8rem; color: var(--muted); padding: 0 10px 0 2px; white-space: nowrap; }
.ns-row .err { grid-column: 1 / -1; }
.ns-row.has-err .ns-in { border-color: var(--bad); }
.ns-bank { display: grid; gap: 2px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: linear-gradient(135deg, #0f2747, #1a3d6d); color: #fff; }
.ns-bank small { font-size: .72rem; opacity: .7; }
.ns-bank b { font-size: 1rem; }
.ns-bank .mono { font-size: 1.1rem; letter-spacing: .06em; }
.ns-bank span:last-child { font-size: .8rem; opacity: .85; min-height: 1em; }
.of-sec > h2.ns-h { justify-content: flex-start; text-align: left; }
.ns-row .field-err, .ns-row .err, .ns-row [role="alert"] { grid-column: 1 / -1; color: var(--bad); font-size: .8rem; margin: 0; }

/* ===== Nhật ký (Công ty) ===== */
.lg-bar { margin-bottom: 8px; }
.lg-top { display: flex; gap: 8px; margin-bottom: 10px; }
.lg-top .mo-search { flex: 1; min-width: 0; margin: 0; }
.lg-more { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 22px; background: #fff; font: inherit; font-size: .9rem; font-weight: 500; color: var(--ink); cursor: pointer; }
.lg-more .ic { width: 17px; height: 17px; color: var(--muted); }
.lg-more[aria-expanded="true"] { background: var(--tonal); border-color: var(--tonal); color: var(--road); }
.lg-more b { min-width: 18px; height: 18px; border-radius: 9px; background: var(--road); color: #fff; font-size: .72rem; display: grid; place-items: center; padding: 0 5px; }
.lg-range { margin-bottom: 8px; }
.lg-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.lg-grid .field { margin-bottom: 10px; min-width: 0; }
.lg-grid .field:nth-child(-n+2) { grid-column: 1 / -1; }
@media (min-width: 720px) { .lg-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } .lg-grid .field:nth-child(-n+2) { grid-column: auto; } }
.lg-grid label { font-size: .84rem; font-weight: 500; }
.lg-grid input, .lg-grid select { width: 100%; min-width: 0; }
.lg-acts { display: flex; justify-content: flex-end; gap: 8px; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lg-day { margin: 16px 2px 8px; font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.lg-list > .lg-day:first-child { margin-top: 4px; }
.lg-items { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lg-item { display: grid; grid-template-columns: 40px 30px 1fr; gap: 10px; align-items: flex-start; padding: 12px 14px 12px 10px; border-top: 1px solid var(--hover); }
.lg-item:first-child { border-top: 0; }
.lg-time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 6px; text-align: right; }
.lg-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.lg-ic .ic { width: 16px; height: 16px; }
.lg-ic.t-ok { background: var(--ok-bg); color: var(--ok); }
.lg-ic.t-bad { background: var(--bad-bg); color: var(--bad); }
.lg-body { min-width: 0; }
.lg-body > b { display: block; font-size: .93rem; font-weight: 600; line-height: 1.35; padding-top: 4px; }
.lg-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px; font-size: .8rem; color: #3c4043; }
.lg-who .mono { color: var(--muted); font-size: .76rem; }
.lg-who i { color: var(--muted); }
.lg-site { display: inline-flex; padding: 0 8px; border-radius: 9px; background: var(--hover); font-size: .74rem; color: #3c4043; }
.lg-dl { margin: 6px 0 0; display: grid; gap: 3px; font-size: .8rem; }
.lg-dl > div { display: flex; gap: 6px; min-width: 0; }
.lg-dl dt { color: var(--muted); flex: none; }
.lg-dl dt::after { content: ":"; }
.lg-dl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.lg-more-d { margin-top: 4px; }
.lg-more-d > summary { cursor: pointer; font-size: .8rem; color: var(--road); font-weight: 500; list-style: none; }
.lg-more-d > summary::-webkit-details-marker { display: none; }
.lg-more-d > summary::before { content: "▸ "; }
.lg-more-d[open] > summary::before { content: "▾ "; }
