:root { --g: #0f5132; --g2: #198754; --bg: #f6f7f5; --card: #fff; --line: #e3e6e1; --txt: #1d211e; --mut: #6b736d; --warn: #b7791f; --bad: #c0392b; --r: 12px; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--txt); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
h2, h3, h4 { margin: 0 0 10px; } h3 { font-size: 16px; }
.app header { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--g); color: #fff; }
header nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
header nav a { color: #d7eadf; text-decoration: none; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
header nav a.on { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; }
.who { display: flex; gap: 6px; align-items: center; } .who span { display: flex; flex-direction: column; font-size: 13px; text-align: right; } .who small { opacity: .75; }
.who .btn { background: rgba(255,255,255,.15); color: #fff; border: 0; }
main { max-width: 1100px; margin: 0 auto; padding: 12px; padding-bottom: 80px; }
.logo { width: 56px; height: 56px; border-radius: 14px; background: var(--g); color: #fff; font-weight: 800; font-size: 24px; display: grid; place-items: center; margin-bottom: 10px; }
.logo.sm { width: 34px; height: 34px; font-size: 15px; border-radius: 9px; margin: 0; background: #fff; color: var(--g); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; } .login .card { width: 100%; max-width: 380px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card.inner { background: #f9faf8; margin-top: 10px; }
.card-h, .bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .grow { flex: 1; }
label { display: block; font-size: 13px; color: var(--mut); margin: 10px 0 4px; }
label.chk { display: flex; gap: 6px; align-items: center; color: var(--txt); margin: 0; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 11px; border: 1px solid #cfd4cd; border-radius: 9px; background: #fff; }
input[type=checkbox] { width: 20px; height: 20px; } input[type=date] { width: auto; } input.search { max-width: 260px; } input.num { width: 120px; text-align: right; }
input:focus, select:focus { outline: 2px solid #9bd3b4; border-color: var(--g2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: inherit; padding: 9px 14px; border-radius: 9px; border: 1px solid #cfd4cd; background: #fff; color: var(--txt); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--g2); border-color: var(--g2); color: #fff; font-weight: 600; }
.btn.danger { color: var(--bad); border-color: #e9b4ad; } .btn.small { padding: 5px 9px; font-size: 13px; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
.x { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--mut); padding: 4px 8px; }
.muted { color: var(--mut); font-size: 13px; } .right { text-align: right; } .nowrap { white-space: nowrap; } .wrap-any { word-break: break-all; }
.bad { color: var(--bad); } .error { background: #fdecea; color: var(--bad); padding: 9px 11px; border-radius: 9px; margin-top: 10px; }
.empty { padding: 26px; text-align: center; color: var(--mut); }
.tbl { width: 100%; border-collapse: collapse; } .tbl td, .tbl th { padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.tbl th { font-size: 12px; color: var(--mut); font-weight: 600; } .tbl th.right, .tbl td.right { text-align: right; }
.tbl.small td { padding: 6px 4px; font-size: 13px; } .tbl tr.sel { background: #eef8f1; } .tbl tr.off { opacity: .5; }
.click { cursor: pointer; } .big-num { font-size: 18px; font-weight: 700; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eceeea; white-space: nowrap; }
.st-moi { background: #e7f0ff; color: #1d4ed8; } .st-dang_soan, .st-da_soan { background: #fff4d6; color: #8a5a00; } .st-da_dong_goi { background: #efe7ff; color: #6b21a8; }
.st-cho_giao, .st-dang_giao, .st-dang_chay { background: #dff3ff; color: #0369a1; } .st-da_giao, .st-thanh_cong, .st-hoan_thanh { background: #dcf5e4; color: #146c3a; }
.st-that_bai, .st-huy { background: #fde2df; color: #a8281a; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; } .stat-l { font-size: 13px; color: var(--mut); } .stat-v { font-size: 22px; font-weight: 700; } .stat-s { font-size: 12px; color: var(--mut); }
.stat.good { border-left: 4px solid var(--g2); } .stat.warn { border-left: 4px solid var(--warn); }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; } .pipe { border-radius: 10px; padding: 10px; } .pipe-n { font-size: 24px; font-weight: 800; } .pipe-l { font-size: 13px; font-weight: 600; }
.alerts .alert { padding: 6px 0; border-bottom: 1px dashed var(--line); } .alerts .alert:last-child { border: 0; }
.bars { display: flex; gap: 8px; align-items: flex-end; height: 140px; } .bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.bar-fill { width: 100%; max-width: 40px; background: var(--g2); border-radius: 6px 6px 0 0; min-height: 2px; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; } .timeline li { padding: 4px 0; border-bottom: 1px solid #f0f1ef; }
.tabs { display: flex; gap: 4px; background: #e9ece7; padding: 4px; border-radius: 11px; margin-bottom: 10px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px 6px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--mut); }
.tabs button.on { background: #fff; color: var(--g); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.chips { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; } .chips button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; } .chips .on { background: var(--g); color: #fff; }
.seg { display: flex; gap: 6px; } .seg.wrap { flex-wrap: wrap; } .seg button { flex: 1; min-width: 110px; padding: 11px; border: 1px solid #cfd4cd; border-radius: 9px; background: #fff; font: inherit; }
.seg .on { background: var(--g); border-color: var(--g); color: #fff; font-weight: 600; } .seg .on.good { background: var(--g2); } .seg .on.bad { background: var(--bad); border-color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; } .two > div { min-width: 0; }
.stop-h { display: flex; gap: 10px; align-items: flex-start; } .seq { width: 28px; height: 28px; border-radius: 50%; background: var(--g); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.stop.stop-thanh_cong { opacity: .65; } .stop.stop-that_bai { border-color: #f1b8b0; }
.items { margin: 8px 0; font-size: 14px; } .items span + span::before { content: ' · '; color: var(--mut); }
.collect { background: #f3f8f4; padding: 8px 10px; border-radius: 8px; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; } .actions .btn { flex: 1; }
.important { background: #fff4d6; border: 1px solid #f0d58a; border-radius: 8px; padding: 8px 10px; margin: 8px 0; font-weight: 600; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.note { font-size: 14px; margin: 6px 0; } .warn-line { color: var(--warn); font-size: 13px; margin-top: 4px; }
.trip-head .btn.big { margin-top: 10px; }
.row-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list { margin: 6px 0; } .list-item { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; padding: 9px 11px; border-radius: 9px; margin-bottom: 6px; font: inherit; cursor: pointer; }
.picked { display: flex; justify-content: space-between; align-items: center; background: #eef8f1; padding: 10px; border-radius: 9px; }
.line { display: grid; grid-template-columns: 1fr 80px auto; gap: 6px; margin-bottom: 6px; } .qty { text-align: center; }
.sum { margin: 12px 0 0; padding: 10px; background: #f3f8f4; border-radius: 9px; }
.preview { max-width: 100%; max-height: 240px; border-radius: 9px; margin-top: 8px; display: block; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: #fff; width: 100%; max-width: 620px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 14px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.modal-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
@media (min-width: 700px) { .modal-bg { align-items: center; } .modal { border-radius: 16px; } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d211e; color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 30; max-width: 92vw; }
.toast.err { background: var(--bad); }
details summary { cursor: pointer; padding: 6px 0; }
@media (max-width: 640px) { .who span { display: none; } .app header { flex-wrap: wrap; } header nav { order: 3; flex-basis: 100%; } .tbl td { font-size: 14px; } }
@media print { header, .btn, .bar, .toast { display: none !important; } .card { border: 0; } }
.ok-line{color:#146c3a;font-weight:600;margin-top:6px}
.printpick .pp-row{display:flex;gap:10px;align-items:center;margin-bottom:8px}.printpick .pp-row .muted{width:42px}.printpick .seg{flex:1}
.cust-row{display:flex;gap:8px;align-items:center;cursor:default}.plain{border:0;background:none;text-align:left;font:inherit;cursor:pointer;padding:0}
.thumb{width:38px;height:38px;border-radius:7px;object-fit:cover;display:inline-grid;place-items:center}.thumb.ph{background:#e5f4e4;color:#0f5132;font-size:11px;font-weight:700}
.tag-gap{display:inline-block;background:#c0392b;color:#fff;font-size:11px;font-weight:800;padding:1px 7px;border-radius:99px;letter-spacing:.3px}.tag-ut{display:inline-block;background:#fff4d6;color:#8a5a00;font-size:11px;font-weight:700;padding:1px 7px;border-radius:99px}
.plan-cta{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.plan-cta>div{flex:1;min-width:240px}.plan-cta .btn.big{width:auto;margin:0;padding:14px 22px}
.plan-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:10px}.plan{border:1px solid var(--line);border-radius:12px;padding:11px;background:#fbfcfb}.plan.off{opacity:.45}
.plan-h{display:flex;justify-content:space-between;align-items:center}.load{height:8px;background:#e9ece7;border-radius:99px;margin:8px 0 4px;overflow:hidden}.load-fill{height:100%;background:var(--g2)}
.plan-s{font-size:13px}.plan-stops{padding-left:0;list-style:none;margin:8px 0}.plan-stops li{padding:5px 0;border-bottom:1px dashed var(--line)}.plan-stops li.dropped{opacity:.45;text-decoration:line-through}
.plan-stops .chk{align-items:flex-start}.prio-row{display:flex;gap:10px;align-items:center;margin:8px 0}.prio-row .seg{flex:1}
.line.tier{grid-template-columns:auto 70px auto 1fr auto;align-items:center}
.stop-row{display:flex;gap:8px;justify-content:space-between;align-items:flex-start}.mv{width:auto;max-width:130px;padding:5px 6px;font-size:12.5px}
.cutoff{font-size:13px;font-weight:700;color:#146c3a;background:#e5f4e4;border-radius:99px;padding:5px 11px}.cutoff.late{color:#a8281a;background:#fde2df}
.hold{margin-top:12px;border:2px dashed #e0c36a;background:#fffbea;border-radius:12px;padding:11px}.hold h4{margin:0 0 4px}.load-fill.over{background:var(--bad)}
.checkin{display:flex;gap:10px;align-items:center;justify-content:space-between;background:#fff4d6;border:1px solid #f0d58a;border-radius:12px;padding:10px 12px;margin-bottom:10px;font-weight:600}
.checkin.ok{background:#e5f4e4;border-color:#b7e0c0;color:#146c3a;font-weight:600;display:block}
.adj{display:grid;grid-template-columns:1fr 1fr 2fr auto;gap:6px;margin-top:8px}@media(max-width:640px){.adj{grid-template-columns:1fr 1fr}}
.helper{margin-top:6px}.hold.over{border-color:#e9b4ad;background:#fff3f1}
.warn-txt{color:var(--warn);font-weight:700}
.scroll-x{overflow-x:auto}.payroll th{white-space:normal;min-width:84px;font-size:11.5px}.payroll td{white-space:nowrap}
.bonus{border-top:1px solid var(--line);padding:10px 0}.bonus-f{grid-template-columns:150px 1fr 1fr auto}
.bonus-banner{background:#fff4d6;border:1px solid #f0d58a;border-radius:12px;padding:8px 12px;margin-bottom:10px}.bonus-banner>div{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:3px 0}
.total-row td{background:#fff4d6;border-top:2px solid #e0c36a}
.two-btn{display:grid;grid-template-columns:1fr 1fr;gap:8px}.st-bao_gia{background:#f2ecff;color:#5b3fb5}
.stock-line{grid-template-columns:1fr 80px 110px auto}.ok-txt{color:#146c3a}.adj.credit{grid-template-columns:1fr 1fr auto;margin-top:6px}
input.txt{width:100%;min-width:260px}
