* { box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", Arial, sans-serif; margin: 0; background: #f6f4f0; color: #222; }
.top { display: flex; justify-content: space-between; align-items: center; background: #123a4c; color: #fff; padding: 12px 20px; }
.top a { color: #cde7f5; }
.brand { font-weight: 600; }
.who a { margin-left: 10px; }
main { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.samplebar { background: #fff6d8; border: 1px solid #e5d28a; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 16px; margin: 12px 0; max-width: 520px; }
label { display: block; margin: 10px 0 4px; font-size: 14px; }
input { width: 100%; padding: 8px; border: 1px solid #bbb; border-radius: 5px; font-size: 15px; }
button { margin-top: 12px; background: #123a4c; color: #fff; border: 0; padding: 9px 18px; border-radius: 5px; font-size: 15px; cursor: pointer; }
button.danger { background: #8c2f2f; }
form.inline { display: inline-block; margin-right: 16px; }
table.orders { width: 100%; border-collapse: collapse; background: #fff; margin: 12px 0; font-size: 14px; }
table.orders th, table.orders td { border: 1px solid #ddd; padding: 7px 9px; text-align: left; }
table.orders th { background: #eaf1f4; }
.err { color: #8c2f2f; font-weight: 600; }
.ok { color: #1e6b34; font-weight: 600; }
.muted { color: #666; font-size: 13px; }
.foot { text-align: center; color: #888; font-size: 12px; padding: 24px; }
@media (max-width: 700px) {
  table.orders, table.orders tbody, table.orders tr, table.orders td { display: block; }
  table.orders thead { position: absolute; left: -9999px; }
  table.orders tr { border: 1px solid #ddd; border-radius: 8px; margin: 12px 0; padding: 4px 12px 10px; background: #fff; }
  table.orders td { border: 0; border-bottom: 1px solid #eee; padding: 7px 0; }
  table.orders td:last-child { border-bottom: 0; }
  table.orders td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #123a4c; margin-bottom: 1px; }
  .top { flex-wrap: wrap; gap: 6px; padding: 10px 14px; }
  main { margin: 14px auto; padding: 0 10px; }
}

@media (max-width: 700px) { tr.stale td::before { content: none; } tr.stale td { border: 0; padding-top: 0; } }

/* v5: staff order-update screens */
select, input[type="date"] { width: 100%; padding: 8px; border: 1px solid #bbb; border-radius: 5px; font-size: 15px; background: #fff; font-family: inherit; }
.navline { margin: 0 0 10px; font-size: 14px; }
.navline a { margin-right: 14px; }
ul.history { list-style: none; padding: 0; background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 4px 16px; }
ul.history li { border-bottom: 1px solid #eee; padding: 8px 0; font-size: 14px; }
ul.history li:last-child { border-bottom: 0; }
tr.updatelink td { border: 0; padding: 0 9px 10px; background: #fff; }
@media (max-width: 700px) { tr.updatelink { border: 0; margin: -10px 0 12px; padding: 0 12px; } tr.updatelink td::before { content: none; } }

/* checkbox rows keep the box inline with its text */
.card label:has(input[type="checkbox"]), fieldset.card label:has(input[type="radio"]), .card fieldset label:has(input[type="radio"]) { display: flex; align-items: center; gap: 8px; }

/* checkboxes/radios must not inherit the 100% text-input width */
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; }

/* approval letter drafts must wrap at phone width */
pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }
