/* ASP Call-Up Requests. Colours and spacing follow the approved screens (10 Nov 2026). */
:root {
  --navy: #0B2A5B;
  --navy-line: #2C4A7E;
  --navy-text: #C7D4EC;
  --navy-text-2: #DCE6F7;
  --blue: #1D4FB8;
  --blue-dark: #123A8C;
  --bg: #F3F5F9;
  --card: #FFFFFF;
  --line: #DCE1EA;
  --line-2: #C9D1DE;
  --line-3: #EEF1F6;
  --text: #111827;
  --text-2: #374151;
  --muted: #4B5563;
  --red: #B42318;
  --amber: #B54708;
  --amber-bg: #FFF6E5;
  --amber-text: #7A2E0B;
  --chip: #E8EEF9;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #F2B705; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Buttons */
.btn { min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2); background: #FFF; color: var(--text); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #FFF; font-weight: 600; }
.btn-primary:hover { background: var(--blue-dark); color: #FFF; }
.btn-outline { border-color: var(--blue); color: var(--blue); font-weight: 600; }
.btn-danger { border-color: var(--red); color: var(--red); font-weight: 600; }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #FFF; font-weight: 600; }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-end { justify-content: flex-end; }
.spread { justify-content: space-between; }

/* Logos */
.logos { display: flex; gap: 8px; align-items: center; }
.logo-asp { width: 88px; height: 44px; border-radius: 8px; background: #FFF; object-fit: contain; padding: 4px; }
.logo-seal { width: 44px; height: 44px; border-radius: 22px; background: #FFF; object-fit: contain; }

/* Sign-in */
.signin { display: flex; flex-wrap: wrap; min-height: 100vh; font-size: 15px; line-height: 1.5; }
.signin-brand { flex: 1 1 420px; min-width: 0; background: var(--navy); color: #FFF; padding: 56px 48px; display: flex; flex-direction: column; gap: 32px; justify-content: center; }
.signin-brand .logo-asp { width: 160px; height: 80px; border-radius: 12px; padding: 8px; }
.signin-brand .logo-seal { width: 80px; height: 80px; border-radius: 40px; }
.signin-brand h1 { margin: 0; font-size: 36px; font-weight: 700; line-height: 1.15; }
.signin-brand p { margin: 0; color: var(--navy-text-2); max-width: 420px; }
.signin-brand .site { font-size: 17px; }
.signin-side { flex: 1 1 420px; min-width: 0; padding: 56px 48px; display: flex; align-items: center; justify-content: center; }
.signin-card { width: 100%; max-width: 420px; background: #FFF; border: 1px solid var(--line); border-radius: 16px; padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.signin-card h2 { margin: 0; font-size: 24px; font-weight: 700; }
.signin-card p { margin: 0; color: var(--text-2); }
.signin-card .btn-primary { min-height: 52px; font-size: 16px; }
.signin-help { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.signin-help strong { color: var(--text); }
.devbox { border: 1px dashed var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }

/* Shell */
.shell { display: flex; min-height: 100vh; }
.rail { flex: 0 0 232px; background: var(--navy); color: #FFF; padding: 24px 16px; display: flex; flex-direction: column; gap: 24px; min-height: 100vh; }
.rail-title { font-size: 16px; font-weight: 700; }
.rail-sub { font-size: 12px; color: var(--navy-text); }
.rail nav { display: flex; flex-direction: column; gap: 4px; }
.rail nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: #FFF; font-weight: 500; text-decoration: none; }
.rail nav a[aria-current="page"] { background: #FFF; color: var(--navy); font-weight: 600; }
.rail nav a:hover:not([aria-current="page"]) { background: rgba(255, 255, 255, .08); }
.rail-user { margin-top: auto; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--navy-line); padding-top: 16px; }
.rail-user .who { font-weight: 600; }
.rail-user .role { font-size: 12px; color: var(--navy-text); }
.rail-user .btn { background: transparent; color: #FFF; border-color: #8FA6CF; }
.rail select { min-height: 40px; border-radius: 8px; border: 1px solid #8FA6CF; background: var(--navy); color: #FFF; padding: 0 8px; }
.topbar, .bottomnav { display: none; }
main.content { flex: 1 1 auto; min-width: 0; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
h1.page { margin: 0; font-size: 24px; font-weight: 700; }

.banner { border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.banner-error { background: #FEE4E2; color: #7A271A; border: 1px solid #FDA29B; }
.banner-warn { background: var(--amber-bg); color: var(--amber-text); border: 1px solid #F7C77A; }
.banner-ok { background: #D3F0DF; color: #0D4A2B; border: 1px solid #8FD3AE; }

/* Chips and filters */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid var(--line-2); background: #FFF; font-weight: 500; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #FFF; font-weight: 600; }
.filters-right { margin-left: auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.check input { width: 18px; height: 18px; }
.search { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-2); }
.search input { min-height: 40px; width: 220px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 14px; }

/* Order list + detail */
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.list { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.card-btn { text-align: left; background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; width: 100%; }
.card-btn[aria-pressed="true"] { border: 2px solid var(--blue); padding: 13px 15px; }
.card-btn:hover { border-color: var(--blue); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.card-id { font-weight: 700; }
.card-ev { font-weight: 600; }
.card-meta { color: var(--muted); font-size: 13px; }
.badge { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-Pending { background: #FDE9C4; color: #6B3F00; }
.b-Scheduled { background: #D3F0DF; color: #0D4A2B; }
.b-Completed { background: #DAE4F6; color: var(--navy); }
.b-Cancelled { background: #E6E8EC; color: var(--text-2); text-decoration: line-through; }
.b-Archived { background: #F1F2F4; color: var(--muted); }
.b-Active { background: #D3F0DF; color: #0D4A2B; }
.b-Requested, .b-Submitted { background: #FDE9C4; color: #6B3F00; }
.b-Approved { background: #E8EEF9; color: var(--navy); }
.b-Declined { background: #FEE4E2; color: #7A271A; }
.b-Deactivated { background: #E6E8EC; color: var(--text-2); }
.b-Done { background: #DAE4F6; color: var(--navy); }
.empty { color: var(--muted); padding: 24px; text-align: center; background: #FFF; border: 1px dashed var(--line-2); border-radius: 12px; }

.panel { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.detail { flex: 2 1 520px; min-width: 0; }
.detail-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; }
.detail-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.detail h2 { margin: 0; font-size: 20px; font-weight: 700; }
.detail-body { display: flex; flex-wrap: wrap; gap: 24px; }
.detail-main { flex: 3 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.detail-side { flex: 2 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: break-word; }
.ppe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ppe .label { font-size: 12px; color: var(--muted); }
.ppe .tag { padding: 4px 10px; border-radius: 12px; background: var(--chip); color: var(--navy); font-size: 12px; font-weight: 600; }
h3.small { margin: 0; font-size: 14px; font-weight: 700; }
.duties p { margin: 0; }
.duties ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.box { background: var(--bg); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.history { margin: 0; padding: 0 0 0 14px; list-style: none; display: flex; flex-direction: column; gap: 12px; border-left: 2px solid var(--line); }
.history li { display: flex; flex-direction: column; gap: 2px; }
.history .h-status { font-weight: 600; }
.history .h-notes { white-space: pre-line; }
.history .h-who { font-size: 12px; color: var(--muted); }
.note-cancel { font-style: italic; color: var(--muted); margin: 0; }
.back { display: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea { min-height: 44px; width: 100%; border-radius: 8px; border: 1px solid var(--line-2); padding: 0 12px; font-size: 14px; font-weight: 400; background: #FFF; }
.field textarea { padding: 10px 12px; min-height: 0; }
.field.missing { color: var(--amber-text); }
.field.missing input, .field.missing textarea, .field.missing select { border: 2px solid var(--amber); background: var(--amber-bg); }
.field .hint { font-weight: 500; }
.field.invalid input, .field.invalid textarea { border: 2px solid var(--red); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
fieldset.plain { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
fieldset.plain legend { padding: 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.checks input { width: 18px; height: 18px; }
.form-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; }

/* New request */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.steps li { padding: 6px 12px; border-radius: 16px; background: #FFF; border: 1px solid var(--line-2); color: var(--text-2); font-weight: 500; }
.steps li.done { background: #D3F0DF; border-color: #D3F0DF; color: #0D4A2B; font-weight: 600; }
.steps li[aria-current="step"] { background: var(--navy); border-color: var(--navy); color: #FFF; font-weight: 600; }
.drop { border: 2px dashed #9AA5B8; border-radius: 12px; background: #F8FAFC; min-height: 240px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; text-align: center; padding: 24px; cursor: pointer; }
.drop.over { border-color: var(--blue); background: var(--chip); }
.drop strong { font-size: 16px; }
.file-card { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { font-size: 12px; color: var(--muted); }
.preview { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.preview canvas { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #FFF; }
.preview .cap { font-size: 12px; font-weight: 600; color: var(--muted); }
.uploaded { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.review { flex: 3 1 480px; min-width: 0; }
.review h2 { margin: 0; font-size: 18px; font-weight: 700; }
.review p.lead { margin: 0; color: var(--text-2); }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; width: 40%; background: var(--blue); animation: slide 1.1s infinite ease-in-out; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Users */
.table-wrap { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 8px 0; overflow-x: auto; flex: 3 1 520px; min-width: 0; }
table.users { width: 100%; min-width: 560px; border-collapse: collapse; text-align: left; }
table.users th { padding: 12px; font-size: 12px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
table.users td { padding: 14px 12px; border-bottom: 1px solid var(--line-3); vertical-align: middle; }
table.users th:first-child, table.users td:first-child { padding-left: 20px; }
table.users tr:last-child td { border-bottom: 0; }
.u-name { font-weight: 600; }
.u-mail { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.u-gone .u-name { color: var(--muted); }
.side-col { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.form-card { background: #FFF; border: 2px solid var(--blue); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.form-card h2, .plain-card h2 { margin: 0; font-size: 16px; font-weight: 700; }
.plain-card { background: #FFF; border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.reqs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.reqs li { display: flex; flex-direction: column; gap: 4px; }
.reqs li + li { border-top: 1px solid var(--line-3); padding-top: 12px; }
.small-muted { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }

/* Phone layout */
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .rail { display: none; }
  .topbar { display: flex; background: var(--navy); color: #FFF; padding: 12px 16px; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 5; }
  .topbar .logo-asp { width: 64px; height: 36px; border-radius: 6px; }
  .topbar .logo-seal { width: 36px; height: 36px; border-radius: 18px; }
  .topbar .t { font-size: 15px; font-weight: 700; }
  .topbar .btn { min-height: 36px; padding: 0 10px; background: transparent; color: #FFF; border-color: #8FA6CF; font-size: 13px; }
  .bottomnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 8px 8px 12px; background: #FFF; border-top: 1px solid var(--line); position: sticky; bottom: 0; z-index: 5; }
  .bottomnav a { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; }
  .bottomnav a[aria-current="page"] { background: var(--chip); color: var(--navy); font-weight: 700; }
  main.content { padding: 16px; gap: 12px; }
  h1.page { font-size: 22px; }
  .chips.status { flex-wrap: nowrap; overflow-x: auto; }
  .chips.status .chip { flex: 0 0 auto; }
  .filters-right { margin-left: 0; width: 100%; }
  .search, .search input { width: 100%; }
  .split.has-detail .list { display: none; }
  .split:not(.has-detail) .detail { display: none; }
  .back { display: inline-flex; }
  .facts, .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 16px; }
  .signin-brand, .signin-side { padding: 32px 24px; }
  .hide-phone { display: none; }
}
.view { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.m0 { margin: 0; }
.box-plain { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 760px) { .view { gap: 12px; } }

/* Client logo is a wide wordmark, not a round seal */
.logo-asp { width: 60px; height: 40px; padding: 3px; }
.logo-seal { width: 100px; height: 40px; border-radius: 8px; padding: 4px; }
.signin-brand .logo-seal { width: 240px; height: 80px; border-radius: 12px; padding: 10px; }
.topbar .logo-asp { width: 54px; height: 36px; }
.topbar .logo-seal { width: 96px; height: 36px; border-radius: 6px; }
