/* NTPLC Driver Incentive. Navy and red company colours; system fonts so branches need no internet. */
:root {
  --navy: #0f2a4a; --navy-2: #1b4270; --red: #b3202a; --red-soft: #fbe9ea;
  --ink: #1b2330; --muted: #566273; --concrete: #eef1f5; --surface: #fff; --line: #d3dae3;
  --go: #19693d; --go-soft: #e2f2e8; --amber: #8a5000; --amber-soft: #fdf0d5;
  --radius: 6px; --side: 236px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 70px; }
body { margin: 0; background: var(--concrete); color: var(--ink);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Ethiopic", Arial, sans-serif; }
a { color: var(--navy-2); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #e59a00; outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 50; background: #fff; padding: 8px 12px; }

/* ---------- Layout ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--navy); color: #fff; display: flex;
  flex-direction: column; overflow-y: auto; z-index: 30; }
/* The logo is drawn on white, so its panel is white in the menu and on the sign-in page. */
.brand { flex: none; padding: 12px 18px 10px; background: #fff; border-bottom: 4px solid var(--red); text-align: center; }
.brand img { display: block; width: 100%; max-width: 190px; height: auto; margin: 0 auto; }
.brand span { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
.side nav { padding: 6px 0 18px; flex: 1; }
.side nav h2 { margin: 16px 20px 4px; font-size: 12px; font-weight: 600; color: #8fa7c4; }
.side nav a { display: block; padding: 8px 20px 8px 17px; color: #e6edf6; text-decoration: none; border-left: 3px solid transparent; }
.side nav a:hover { background: var(--navy-2); }
.side nav a[aria-current="page"] { background: var(--navy-2); border-left-color: var(--red); font-weight: 600; color: #fff; }
.account { padding: 14px 20px 18px; border-top: 1px solid #2c4b73; font-size: 13px; }
.account strong, .account span, .account a { display: block; }
.account span { color: #b9c9dd; }
.account a { color: #fff; margin-top: 8px; }
.account button.plain { color: #fff; margin-top: 4px; }
.topbar { display: none; }
main { margin-left: var(--side); padding: 22px 28px 70px; max-width: 1500px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
h1 { margin: 0; font-size: 26px; line-height: 1.25; color: var(--navy); letter-spacing: -.01em; }
h2 { margin: 24px 0 10px; font-size: 17px; color: var(--navy); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 14px; }
.card > h2:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.print-head { display: none; }

/* ---------- Buttons ---------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 16px; border: 1px solid var(--navy);
  border-radius: var(--radius); background: var(--navy); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .btn:hover { filter: brightness(1.15); }
button.secondary, .btn.secondary { background: #fff; color: var(--navy); border-color: #9aa9bc; }
button.secondary:hover, .btn.secondary:hover { filter: none; background: var(--concrete); }
button.go { background: var(--go); border-color: var(--go); }
button.danger { background: #fff; color: var(--red); border-color: var(--red); }
button.danger:hover { filter: none; background: var(--red-soft); }
button.plain { background: none; border: 0; padding: 0; min-height: 0; font-weight: 400; text-decoration: underline; }
button[aria-disabled="true"] { opacity: .55; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Forms ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px 16px; align-items: start; }
.wide, fieldset { grid-column: 1 / -1; }
.stack > * + * { margin-top: 12px; }
.narrow { max-width: 460px; }
.field { display: block; }
.field > span:first-child { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; }
.field:has(:required) > span:first-child::after { content: " *"; color: var(--red); }
input, select, textarea { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid #8e9db1; border-radius: var(--radius);
  background: #fff; color: inherit; font: inherit; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--navy); }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--red); background: var(--red-soft); }
.field-error { display: block; margin-top: 3px; color: var(--red); font-size: 13px; }
.password-box { display: flex; gap: 6px; }
.password-box button { flex: none; }
fieldset { margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
legend { font-size: 13.5px; font-weight: 600; }
.check { display: inline-block; margin: 2px 18px 2px 0; cursor: pointer; }
.check.block { display: block; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
form.inline { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin: 3px 0; }
form.inline input, form.inline select { width: auto; max-width: 210px; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details[open] > summary { margin-bottom: 10px; }
td details[open] { min-width: 200px; }   /* keep forms opened inside a table readable */
.rules { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.rules li::before { content: "\25CB\00a0\00a0"; }
.rules li.met { color: var(--go); } .rules li.met::before { content: "\2713\00a0\00a0"; }

/* ---------- Messages ---------- */
.flash, .notice { padding: 11px 14px; margin: 0 0 12px; border: 1px solid; border-left-width: 5px; border-radius: var(--radius); }
.flash.ok { background: var(--go-soft); border-color: var(--go); }
.flash.error { background: var(--red-soft); border-color: var(--red); }
.notice.good { background: var(--go-soft); border-color: var(--go); }
.notice { background: var(--amber-soft); border-color: var(--amber); }
.js .flash.ok { position: fixed; right: 20px; bottom: 20px; z-index: 40; max-width: min(420px, calc(100vw - 40px)); box-shadow: 0 6px 24px rgb(15 42 74 / .22); }
.warn { color: var(--amber); margin: 4px 0; }
dialog { width: min(440px, calc(100vw - 32px)); padding: 20px; border: 0; border-top: 5px solid var(--red); border-radius: var(--radius);
  box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
dialog::backdrop { background: rgb(15 30 55 / .55); }
dialog p { margin: 0 0 18px; }
dialog .actions { justify-content: flex-end; }

/* ---------- Tables ---------- */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
th { background: #e3e9f1; color: var(--navy); font-size: 13.5px; white-space: nowrap; }
tbody tr:hover { background: #f6f8fb; }
th button { all: unset; cursor: pointer; font-weight: 600; }
th button:focus-visible { outline: 3px solid #e59a00; }
th[aria-sort="ascending"] button::after { content: " \25B2"; font-size: 10px; }
th[aria-sort="descending"] button::after { content: " \25BC"; font-size: 10px; }
.empty td { color: var(--muted); }
.table-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.table-tools input { max-width: 340px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 8px 0 14px; }
.table-wrap { margin-bottom: 14px; }
code { font-size: 12px; overflow-wrap: anywhere; }

/* ---------- Status ---------- */
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; background: #e3e8ef; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.s-authorized, .s-eligible, .s-active, .s-settled, .s-endorsed, .s-upheld { background: var(--go-soft); color: var(--go); }
.s-rejected, .s-cancelled, .s-disabled, .s-locked, .s-recovery_due, .s-regular_per_diem { background: var(--red-soft); color: #8f1720; }
.s-submitted, .s-approved, .s-requested, .s-pending, .s-reviewed, .s-proposed, .s-open { background: var(--amber-soft); color: var(--amber); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.tabs a { padding: 6px 13px; border-radius: 99px; text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--navy); color: #fff; }

/* ---------- Home work queue ---------- */
.queue { margin: 0; padding: 0; list-style: none; max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.queue li + li { border-top: 1px solid var(--line); }
.queue a { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 11px 16px; color: inherit; text-decoration: none; }
.queue a:hover { background: #f6f8fb; }
.queue b { font-size: 24px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.queue em { font-style: normal; font-weight: 600; color: var(--navy-2); text-decoration: underline; }
.queue .due { box-shadow: inset 4px 0 var(--red); }
.queue .clear b, .queue .clear span { color: var(--muted); font-weight: 400; }

/* ---------- Trip: progress, facts, pay and band ladder ---------- */
.progress { display: flex; margin: 0 0 14px; padding: 0; list-style: none; max-width: 760px; }
.progress li { flex: 1; padding: 8px 4px 0; border-top: 5px solid var(--line); font-size: 13.5px; color: var(--muted); }
.progress li.done { border-color: var(--go); color: var(--go); }
.progress li.now { border-color: var(--red); color: var(--ink); font-weight: 700; }
.summary { font-size: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; margin: 0 0 8px; }
.facts dt { font-size: 12.5px; color: var(--muted); } .facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.pay { border-top: 5px solid var(--navy); }
.amount { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; font-size: 32px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
/* Five bands rise like loads: more trips in a month, more per trip. */
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; align-items: end; margin: 14px 0 8px; padding: 0; list-style: none; max-width: 760px; }
.ladder li { display: flex; flex-direction: column; justify-content: space-between; padding: 8px 8px 6px; background: #dde4ee; border-radius: 3px 3px 0 0;
  border-bottom: 5px solid var(--navy); font-variant-numeric: tabular-nums; }
.ladder .step-1 { min-height: 76px; } .ladder .step-2 { min-height: 91px; } .ladder .step-3 { min-height: 106px; }
.ladder .step-4 { min-height: 121px; } .ladder .step-5 { min-height: 136px; }
.ladder b { font-size: 14px; overflow-wrap: anywhere; } .ladder small { color: var(--muted); } .ladder span { font-size: 12.5px; font-weight: 600; }
.ladder li.on { background: var(--red); border-color: #6f1017; color: #fff; } .ladder li.on small { color: #ffe3e5; }

.trip-entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.save-bar { position: sticky; bottom: 0; display: flex; gap: 14px; align-items: center; padding: 12px 0; background: var(--concrete); z-index: 5; }
.preview .amount { font-size: 28px; }
.preview ul { margin: 6px 0; padding-left: 18px; }
.preview .ladder { grid-template-columns: minmax(0, 1fr); gap: 4px; }   /* narrow panel: one band per row */
.preview .ladder li { flex-direction: row; align-items: center; min-height: 0; gap: 10px; padding: 6px 10px; }
.preview .ladder span { order: -1; min-width: 56px; }
@media (min-width: 1200px) {
  .js .trip-entry:has(.preview:not([hidden])) { grid-template-columns: minmax(0, 1fr) 390px; }
  .preview { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; }
}

/* ---------- Help and user manual ---------- */
input[type="file"] { padding: 6px; }
.manual { max-width: 900px; }
.manual p, .manual li { max-width: 75ch; }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.topics a { display: block; height: 100%; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: var(--radius); color: inherit; text-decoration: none; }
.topics a:hover { background: #f6f8fb; }
.topics b { display: block; margin-bottom: 4px; color: var(--navy); font-size: 16px; }
.topics span { display: block; color: var(--muted); font-size: 14px; }
.help-section h3 { margin: 0 0 6px; font-size: 17px; color: var(--navy); }
.who { display: inline-block; margin: 0 0 8px; padding: 1px 10px; border-radius: 99px; background: #e3e9f1; font-size: 13px; font-weight: 600; }
.steps { padding-left: 22px; } .steps li { margin-bottom: 6px; }
figure { margin: 14px 0; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid #9aa9bc; border-radius: var(--radius); }
figcaption { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.tips { margin-top: 12px; padding: 10px 14px; background: var(--amber-soft); border-left: 4px solid var(--amber); border-radius: var(--radius); }
.tips ul { margin: 4px 0 0; padding-left: 20px; }
.next-topic { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 18px; }

/* ---------- Sign in ---------- */
.signed-out { min-height: 100vh; padding: 40px 16px; background: linear-gradient(var(--navy) 0 260px, var(--concrete) 260px); }
.signed-out .brand { max-width: 420px; margin: 0 auto; padding: 22px 24px 16px; border-radius: var(--radius) var(--radius) 0 0; }
.signed-out .brand img { max-width: 290px; }
.signed-out .brand span { margin-top: 12px; font-size: 15px; }
.signed-out main { margin: 0 auto; padding: 20px 24px 24px; max-width: 420px; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 10px 34px rgb(15 42 74 / .18); }
.signed-out main .card { border: 0; padding: 0; }
.signed-out form button[type="submit"] { width: 100%; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 900px) {
  main { margin-left: 0; padding: 16px 14px 60px; }
  .topbar { display: flex; gap: 12px; align-items: center; position: sticky; top: 0; z-index: 20; padding: 9px 14px; background: var(--navy); color: #fff; border-bottom: 4px solid var(--red); }
  .topbar button { background: transparent; border-color: #fff; }
  /* Without JavaScript the menu simply sits at the top of the page. */
  .side { position: static; width: auto; }
  .js .side { position: fixed; width: min(280px, 85vw); transform: translateX(-100%); visibility: hidden; }
  .js .side.moving { transition: transform .2s, visibility .2s; }
  .js .side.open { transform: none; visibility: visible; }
  .shade { position: fixed; inset: 0; z-index: 25; background: rgb(10 20 40 / .5); }
  input, select, textarea { font-size: 16px; }
  button, .btn { min-height: 44px; }
}
@media screen and (max-width: 720px) {
  /* Each table row becomes a labelled card. */
  .table-wrap .scroll { border: 0; background: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tr { margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
  .table-wrap td { position: relative; min-height: 40px; padding-left: 42%; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
  .table-wrap td::before { content: attr(data-label); position: absolute; left: 12px; width: 36%; color: var(--muted); font-size: 13px; }
  /* Forms need the full width, with their label above. */
  .table-wrap td[data-label="Action"], .table-wrap td[data-label="Manage"] { padding-left: 12px; }
  .table-wrap td[data-label="Action"]::before { position: static; display: block; }
  .table-wrap td[data-label="Manage"]::before { content: none; }
  .table-wrap .empty td { padding-left: 12px; } .table-wrap .empty td::before { content: none; }
  form.inline input, form.inline select { width: 100%; max-width: none; }
  .ladder { grid-template-columns: minmax(0, 1fr); }
  .ladder li { flex-direction: row; align-items: center; min-height: 0 !important; gap: 10px; }
  .ladder span { order: -1; min-width: 56px; }
  .queue a { grid-template-columns: 44px 1fr; } .queue em { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Print: statements follow the company document style ---------- */
@media print {
  .side, .topbar, .shade, .actions, .no-print, .table-tools, .pager, button, .flash, .skip { display: none !important; }
  th button { display: inline !important; }          /* sortable column headings are buttons: keep them */
  body { background: #fff; font: 12pt/1.5 "Times New Roman", Times, serif; color: #000; }
  main { margin: 0; padding: 0; max-width: none; }
  .print-head { display: block; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 3pt solid var(--red); }
  .print-head img { display: block; width: 45mm; height: auto; }
  .scroll { overflow: visible; border: 0; }
  table { font-size: 10.5pt; } th, td { border: .5pt solid #555; padding: 4px 6px; }
  [data-table] tbody tr[hidden]:not(.empty) { display: table-row !important; }
  th { white-space: normal; background: #e3e9f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .card { border: 0; padding: 0; }
  .sign { margin-top: 48px; }
  .manual { max-width: none; } .manual p, .manual li { max-width: none; }
  .help-topic + .help-topic { break-before: page; }
  figure, .tips, .manual tr { break-inside: avoid; }
  .help-section h3, .help-topic h2, .who { break-after: avoid; }
  figure img { max-height: 120mm; width: auto; margin: 0 auto; }
}
