/*
 * Trang quản trị Tài Xế Vận Tải. Cùng bảng màu, phông chữ, hình dạng nút, nhãn và biển số với mini app
 * (zmp-app/src/styles/tokens.css và app.css): đổi ở đó thì đổi ở đây. Tối/sáng theo thiết bị.
 * Không có style nội dòng nào trong trang, nên chính sách bảo mật nội dung (CSP) không cần 'unsafe-inline'.
 */

/* Phông chữ đóng gói cùng máy chủ (giống mini app): mỗi cỡ chữ có bộ Latin và bộ tiếng Việt. */
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url(fonts/roboto-vietnamese-400-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url(fonts/roboto-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url(fonts/roboto-vietnamese-500-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url(fonts/roboto-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url(fonts/roboto-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url(fonts/roboto-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-vietnamese-600-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-vietnamese-700-normal.woff2) format("woff2"); unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --blue: #0068FF; --blue-press: #0052CC; --blue-soft: #E6F0FF; --blue-ink: #0052CC; --btn: #0068FF;
  --plate: #FFC700; --plate-ink: #161616;
  --ink: #18233A; --ink-2: #4B5467; --ink-3: #646D81;
  --bg: #F2F4F7; --surface: #FFFFFF; --line: #E4E7EC; --field: #8A93A6;
  --ok: #047857; --ok-soft: #E3F6EE;
  --warn: #C2410C; --warn-soft: #FDEEE4;
  --danger: #D92D20; --danger-soft: #FDECEA; --danger-ink: #B42318;
  --r-s: 8px; --r-m: 12px;
  --font: "Roboto", system-ui, sans-serif;
  --font-plate: "Barlow Condensed", "Roboto Condensed", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #3D8BFF; --blue-press: #2F74DB; --blue-soft: #15294A; --blue-ink: #8AB6FF; --btn: #2563D9;
    --ink: #E8ECF3; --ink-2: #B4BCCB; --ink-3: #8F99AD;
    --bg: #10151E; --surface: #1A212D; --line: #2A3342; --field: #6E788C;
    --ok: #34C38F; --ok-soft: #133226; --warn: #FF8A4C; --warn-soft: #3A2418;
    --danger: #FF6B5E; --danger-soft: #3A1A18; --danger-ink: #FF9C94;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--blue-ink); }
:where(button, a, input, textarea):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 20; padding: 10px 16px; border-radius: 20px; background: var(--ink); color: var(--surface); }
.skip:focus { top: 8px; }

/* ---------- Top bar and navigation (bottom tab bar on a phone, like the mini app) ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { max-width: 800px; margin: 0 auto; padding: 8px 16px; min-height: 56px; display: flex; align-items: center; gap: 12px; }
.brand { margin-right: auto; line-height: 1.25; }
.brand b { display: block; font-size: 16px; font-weight: 700; }
.brand span { font-size: 13px; color: var(--ink-2); }
.nav { display: flex; gap: 8px; }
.nav a { display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: 14px; }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 500; }
.nav svg { display: none; }
.who { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-2); margin: 0; }
.who .btn-chip { height: 36px; background: transparent; color: var(--blue-ink); text-decoration: underline; text-underline-offset: 2px; padding: 0 8px; }

main { max-width: 800px; margin: 0 auto; padding: 8px 0 32px; }
.pagehead { padding: 8px 16px 0; }
h1 { font-size: 20px; font-weight: 700; margin: 8px 0 4px; line-height: 1.3; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }

/* ---------- Sections, text ---------- */
.section { background: var(--surface); margin-top: 8px; padding: 16px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sec-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.sec-head .sec-title { margin: 0; }
.muted { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }
.muted.flush { margin: 0; }
.hint { font-size: 13px; color: var(--ink-2); margin: 6px 0 0; }
.err { font-size: 14px; color: var(--danger-ink); font-weight: 500; margin: 6px 0 0; }
.ok-text { color: var(--ok); font-weight: 500; }
.tone-warn { color: var(--warn) !important; font-weight: 500; }
.tone-bad { color: var(--danger-ink) !important; font-weight: 500; }
.strong { font-weight: 500; }
.flash { background: var(--ok-soft); color: var(--ok); font-weight: 500; padding: 12px 16px; margin: 8px 0 0; }
.alert { background: var(--danger-soft); color: var(--danger-ink); font-weight: 500; padding: 12px 16px; margin: 8px 0 0; }
.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); font-size: 14px; }
.empty b { display: block; color: var(--ink); font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.kv { display: grid; gap: 4px; margin: 0; font-size: 14px; }
.kv div { display: grid; grid-template-columns: 128px 1fr; gap: 8px; align-items: center; min-height: 32px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- Tags, plates, buttons ---------- */
.tag { display: inline-block; font-size: 13px; font-weight: 500; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.blue { background: var(--blue-soft); color: var(--blue-ink); } .tag.bad { background: var(--danger-soft); color: var(--danger-ink); }
.tag.grey { background: var(--bg); color: var(--ink-2); }

.plate {
  display: inline-block; background: var(--plate); color: var(--plate-ink); border: 3px solid var(--plate-ink); border-radius: 6px;
  padding: 2px 12px 0; font-family: var(--font-plate); font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: .5px;
  box-shadow: inset 0 0 0 2px var(--plate), inset 0 0 0 3px rgba(0, 0, 0, .55); white-space: nowrap;
}
.plate-sm { font-size: 22px; border-width: 2px; padding: 1px 7px 0; border-radius: 4px; box-shadow: none; }
.plate-none { font-size: 14px; color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border: 0; border-radius: 24px;
  background: var(--btn); color: #fff; font: 500 16px var(--font); text-decoration: none; cursor: pointer;
}
.btn:active { background: var(--blue-press); }
.btn.block { width: 100%; }
.btn-chip {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 0; border-radius: 20px;
  background: var(--blue-soft); color: var(--blue-ink); font: 500 14px var(--font); text-decoration: none; cursor: pointer; flex: none;
}
.btn-chip.solid { background: var(--btn); color: #fff; }
.btn-stack { display: grid; gap: 8px; margin-top: 16px; }

/* ---------- Filters and search ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs a { display: flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 20px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 500; }
.searchbar { display: flex; gap: 8px; padding: 12px 16px; background: var(--surface); }
.searchbar .input { flex: 1; min-width: 0; }

/* ---------- Request list (same card as the app's "Yêu cầu của tôi") ---------- */
.order-card + .order-card { border-top: 1px solid var(--line); }
.order { display: block; padding: 14px 0; color: inherit; text-decoration: none; }
.order-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-top b { font-weight: 500; }
.order small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.order-plate { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.track { display: flex; gap: 4px; margin-top: 10px; }
.track i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.track i.on { background: var(--blue); }
.order:hover .order-top b { text-decoration: underline; }

/* ---------- One request ---------- */
.req-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.req-meta { font-size: 14px; color: var(--ink-2); margin: 8px 0 0; line-height: 1.6; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 12px; font-size: 14px; color: var(--ink-3); }
.timeline li::before { content: ""; box-sizing: content-box; width: 12px; height: 12px; margin: 4px 0 0 2px; border-radius: 50%; border: 2px solid var(--field); background: var(--surface); z-index: 1; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.on { color: var(--ink); }
.timeline li.on::before { border-color: var(--blue); background: var(--blue); }
.timeline small { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.contact { display: flex; align-items: center; gap: 12px; }
.contact > span { flex: 1; font-size: 14px; color: var(--ink-2); }
.contact b { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }


/* ---------- Forms ---------- */
.field { margin-top: 16px; }
.field:first-child { margin-top: 0; }
.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.input { width: 100%; height: 48px; border: 1px solid var(--field); border-radius: var(--r-s); padding: 0 14px; font: inherit; color: var(--ink); background: var(--surface); }
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 14px; font-weight: 500; padding: 0; margin-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt label { display: flex; align-items: center; min-height: 52px; padding: 10px 12px; border: 1px solid var(--field); border-radius: var(--r-s); cursor: pointer; font-size: 14px; background: var(--surface); }
.opt input:checked + label { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); font-weight: 500; }
.opt input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; padding: 6px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--blue); flex: none; margin: 1px 0 0; }
.check b { font-weight: 500; }

/* ---------- System ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; font-size: 14px; }
.rows li + li { border-top: 1px solid var(--line); }
.rows b { display: block; font-weight: 500; }
.rows small { display: block; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }

/* ---------- Sign in ---------- */
.login { max-width: 420px; margin: 32px auto 0; }
.login .section { margin-top: 0; }
.login h1 { margin-top: 0; }

/* ---------- Wider screens: the sections become cards, as the app's sheets do ---------- */
@media (min-width: 768px) {
  .section, .tabs, .searchbar { border-radius: var(--r-m); }
  .tabs, .searchbar { margin-top: 8px; }
  .tabs { border-bottom: 0; }
  .flash, .alert { border-radius: var(--r-s); }
  main { padding-top: 16px; }
}

/* ---------- Phones: tab bar at the bottom, like the app ---------- */
@media (max-width: 767px) {
  main { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; gap: 0; background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .nav a { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 56px; padding: 0 4px; border-radius: 0; background: transparent; font-size: 12px; color: var(--ink-3); text-align: center; }
  .nav a[aria-current="page"] { background: transparent; color: var(--blue); font-weight: 500; }
  .nav svg { display: block; }
  .who span { display: none; }
  .kv div { grid-template-columns: 104px 1fr; }
}
@media (max-width: 380px) { .plate { font-size: 32px; } }
