/* Đội Xe: trang quản lý /doi-xe/quan-ly/ + trang giới thiệu /doi-xe/. Màu: xanh đậm #1F4E79, cam #E07A1F. */
.dx, .dxl { --dx: #1f4e79; --dx-2: #e07a1f; --dx-soft: #eef3f8; --dx-line: #dde4ec; }
.dx { background: #f5f7fa; padding: 24px 0 64px; min-height: 70vh; }
.dx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dx-head h1 { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); }
.dx-head p { margin: 0; }
.dx-eyebrow { color: var(--dx-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.dx-head-actions { display: flex; gap: 8px; align-items: center; }
.dx-status { color: var(--muted); font-size: .9rem; }
.dx-msg { background: #fff6e5; border: 1px solid #f3d9a4; color: #6b4b00; border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.dx-small { font-size: .85rem; }

.dx-btn { display: inline-flex; align-items: center; gap: .3em; background: var(--dx); color: #fff; border: 1px solid var(--dx); border-radius: 10px;
  padding: .55em 1.1em; font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.dx-btn:hover { text-decoration: none; filter: brightness(1.1); }
.dx-btn-ghost { background: #fff; color: var(--dx); }
.dx-btn-lg { width: 100%; justify-content: center; padding: .8em; font-size: 1.02rem; margin-top: 6px; }
.dx-btn-danger { background: #b42318; border-color: #b42318; }
.dx-link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; font-size: .88rem; padding: 2px 6px; }
.dx-danger { color: #b42318 !important; }

.dx-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--dx-line); margin-bottom: 16px; }
.dx-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.dx-tabs button[aria-selected="true"] { color: var(--dx); border-bottom-color: var(--dx-2); }
.dx-tabs button[hidden] { display: none; }
#dx-body { display: grid; gap: 16px; }
.dx-card { background: #fff; border: 1px solid var(--dx-line); border-radius: 14px; padding: 18px; min-width: 0; }
.dx-card h2 { font-size: 1.1rem; margin: 0 0 10px; }
.dx-auth { max-width: 440px; margin: 0 auto; width: 100%; }
.dx-authtabs { display: flex; gap: 6px; margin-bottom: 14px; }
.dx-authtabs button { flex: 1; background: var(--dx-soft); border: 0; border-radius: 10px; padding: 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.dx-authtabs button.is-on { background: var(--dx); color: #fff; }

.dx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.dx-stat { background: #fff; border: 1px solid var(--dx-line); border-radius: 14px; padding: 14px 16px; }
.dx-stat span { color: var(--muted); font-size: .85rem; display: block; }
.dx-stat b { font-size: 1.3rem; color: var(--dx); }
.dx-remind { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dx-remind li { padding: 8px 12px; border-radius: 10px; background: #fff8ec; }
.dx-remind li.is-over { background: #fdecea; color: #8a1c13; }

.dx-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dx-bar input, .dx-bar select { font: inherit; font-size: .92rem; border: 1px solid var(--dx-line); border-radius: 10px; padding: .45em .7em; background: #fff; }
.dx-tablewrap { overflow-x: auto; }
.dx-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dx-table th, .dx-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--dx-line); vertical-align: middle; }
.dx-table th { color: var(--muted); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.dx-table .num { text-align: right; white-space: nowrap; }
.dx-click { cursor: pointer; }
.dx-click:hover { background: var(--dx-soft); }
.dx-off { opacity: .5; }
.dx-total td { font-weight: 700; }
.dx-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #eef0f3; white-space: nowrap; }
.dx-running { background: #fff1e0; color: #a8530b; }
.dx-done { background: #e6f0fb; color: var(--dx); }
.dx-approved { background: #e8f5ea; color: #276a33; }
.dx-cancelled { background: #f1f1f1; color: #888; text-decoration: line-through; }
.dx-pager { display: flex; gap: 12px; align-items: center; justify-content: center; }
.dx-ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.dx-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }

.dx-f { display: grid; gap: 4px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; min-width: 0; }
.dx-f input, .dx-f select, .dx-f textarea { font: inherit; color: var(--ink); border: 1px solid var(--dx-line); border-radius: 10px; padding: 9px 11px; width: 100%; background: #fff; min-width: 0; }
.dx-f input:focus, .dx-f select:focus, .dx-f textarea:focus { outline: 2px solid #bcd3ea; border-color: var(--dx); }
.dx-check { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.dx-error { color: #b42318; font-weight: 600; }
.dx-dialog { border: 0; border-radius: 16px; padding: 0; width: min(620px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dx-dialog::backdrop { background: rgba(15, 25, 40, .5); }
.dx-dialog form { padding: 20px; max-height: 86vh; overflow: auto; }
.dx-dialog h2 { margin: 0 0 14px; font-size: 1.2rem; }
.dx-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dx-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.dx-dl dt { color: var(--muted); }
.dx-dl dd { margin: 0; }
.dx-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.dx-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.dx-lots { margin-top: 14px; display: grid; gap: 8px; }
.dx-lots h3 { margin: 0; font-size: 1rem; }
.dx-lot { border: 1px solid var(--dx-line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; font-size: .92rem; }
.dx-lot-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dx-lot-money { margin-left: auto; font-weight: 600; }
.dx-lot-acts { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.dx-lot-acts .dx-btn { padding: .3em .8em; font-size: .85rem; }
.dx-lot-delivered { background: #e8f5ea; color: #276a33; }
.dx-lot-failed { background: #fdecea; color: #8a1c13; }
.dx-lot-pending { background: #fff1e0; color: #a8530b; }
.dx-danger-zone { border-color: #f3c6c1; }

/* trang giới thiệu */
.dxl-hero { background: linear-gradient(160deg, #eef3f8, #fff 60%); }
.dxl-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.dxl-eyebrow { color: var(--dx-2); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0 0 6px; }
.dxl-hero h1 { color: var(--dx); }
.dxl-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.dxl-shot { width: 100%; border-radius: 18px; box-shadow: 0 20px 50px rgba(31, 78, 121, .18); }
.dxl-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.dxl-features div { background: #fff; border: 1px solid var(--dx-line); border-radius: 14px; padding: 18px; }
.dxl-features b { color: var(--dx); display: block; margin-bottom: 4px; font-size: 1.05rem; }
.dxl-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.dxl-steps li { counter-increment: s; padding-left: 44px; position: relative; }
.dxl-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--dx-2); color: #fff; font-weight: 700; display: grid; place-items: center; }

@media (max-width: 760px) {
  .dxl-grid, .dx-grid2 { grid-template-columns: 1fr; }
  .dx-head-actions { width: 100%; }
}
@media print {
  .site-header, .site-footer, .dx-tabs, .dx-bar, .dx-head-actions { display: none !important; }
  .dx { background: #fff; padding: 0; }
}
/* Bản đồ lộ trình nhúng (Google Maps output=embed, không key) */
.dx-map { margin: 12px 0; }
.dx-map iframe { display: block; width: 100%; height: 300px; border: 0; border-radius: 12px; background: #e8eef3; }
.dx-map-route { margin: 6px 2px 0; }
.dx-map-select { width: 100%; padding: 10px 12px; border: 1px solid #cfd8e3; border-radius: 10px; font: inherit; background: #fff; }
.dx-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.dx-chip { border: 1px solid #cfd8e3; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .88rem; cursor: pointer; }
.dx-chip.on { background: #1F4E79; border-color: #1F4E79; color: #fff; }
@media (max-width: 560px) { .dx-map iframe { height: 240px; } }
.dx-pos .dx-map iframe { height: 240px; }
.dx-sub { font-size: 1rem; margin: 14px 0 4px; }
.dx-warn { color: #b45309; }
.dx-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: .95rem; }
.dx-check input { margin-top: 3px; }
