:root { --navy:#14284b; --paper:#f3f4f0; --card:#fff; --ink:#1b2333; --mute:#5f6a7d; --line:#dcdfe6; --red:#b3262b;
        --good:#1d7a55; --warn:#b26a00; --info:#27598f; --good-bg:#e3f2ea; --warn-bg:#fbeed5; --bad-bg:#f9e1e1; --info-bg:#e2ecf7; --mute-bg:#eceef2; }
* { box-sizing:border-box; margin:0; padding:0; }
html, body { height:100%; }
body { font-family:'Segoe UI', Helvetica, Arial, sans-serif; background:var(--paper); color:var(--ink); font-size:14px; line-height:1.45; }
button, select, input { font:inherit; color:inherit; }
.app { display:grid; grid-template-columns:220px 1fr; min-height:100vh; }
.rail { background:var(--navy); color:#dfe6f2; padding:16px 12px; display:flex; flex-direction:column; gap:4px; }
.rail .brand { font-weight:700; color:#fff; font-size:16px; padding:4px 8px 12px; border-bottom:1px solid rgba(255,255,255,.15); margin-bottom:8px; }
.rail a { display:block; padding:7px 10px; border-radius:6px; color:#dfe6f2; text-decoration:none; }
.rail a:hover { background:rgba(255,255,255,.08); }
.rail a.active { background:#fff; color:var(--navy); font-weight:600; }
.top { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:flex-end; padding:10px 22px; background:var(--card); border-bottom:1px solid var(--line); }
.top label { font-size:11px; color:var(--mute); text-transform:uppercase; letter-spacing:.6px; }
main { padding:18px 22px 40px; display:flex; flex-direction:column; gap:16px; min-width:0; }
h1 { font-size:20px; }
h3 { font-size:14px; margin-bottom:10px; }
select, input { border:1px solid var(--line); background:#fff; border-radius:6px; padding:6px 9px; min-height:32px; }
.grid { display:grid; gap:12px; }
.kpis { grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); }
.two { grid-template-columns:repeat(auto-fit, minmax(340px, 1fr)); }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:14px 16px; min-width:0; }
.kpi .l { font-size:11px; text-transform:uppercase; letter-spacing:.6px; color:var(--mute); }
.kpi .v { font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; }
.kpi .n { font-size:12px; color:var(--mute); }
.tw { overflow-x:auto; }
table { border-collapse:collapse; width:100%; font-size:13px; }
th { font-size:11px; text-transform:uppercase; letter-spacing:.5px; color:var(--mute); text-align:left; padding:8px 10px; border-bottom:2px solid var(--line); white-space:nowrap; }
td { padding:8px 10px; border-bottom:1px solid #eceef2; vertical-align:top; }
.r { text-align:right; font-variant-numeric:tabular-nums; }
tr.tot td { font-weight:600; border-top:2px solid var(--line); }
tr.click { cursor:pointer; }
tr.click:hover td { background:#f6f8fb; }
.mono { font-family:Consolas, Menlo, monospace; font-size:12.5px; }
.pill { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11.5px; font-weight:600; white-space:nowrap; }
.good { background:var(--good-bg); color:var(--good); } .warn { background:var(--warn-bg); color:var(--warn); }
.bad { background:var(--bad-bg); color:var(--red); } .info { background:var(--info-bg); color:var(--info); } .mute { background:var(--mute-bg); color:var(--mute); }
.btn { border:1px solid var(--navy); background:var(--navy); color:#fff; border-radius:6px; padding:7px 12px; cursor:pointer; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.btn.ghost { background:#fff; color:var(--navy); }
.btn.sm { padding:3px 9px; font-size:12px; }
.row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.form { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:10px; }
.form label { display:flex; flex-direction:column; gap:3px; font-size:11.5px; color:var(--mute); }
.kv { display:grid; grid-template-columns:160px 1fr; gap:4px 12px; }
.kv dt { color:var(--mute); }
.note { font-size:12.5px; color:var(--mute); }
.error { background:var(--bad-bg); color:var(--red); padding:8px 12px; border-radius:6px; }
.bars { display:flex; align-items:flex-end; gap:3px; height:160px; }
.bars div { flex:1; background:var(--navy); border-radius:3px 3px 0 0; min-height:1px; }
.hbar { display:grid; grid-template-columns:170px 1fr 90px; gap:8px; align-items:center; margin-bottom:6px; font-size:12.5px; }
.hbar i { display:block; height:12px; background:var(--info); border-radius:3px; }
.phone { width:260px; background:#11161f; border-radius:22px; padding:14px 12px; }
.phone pre { background:#0b2a1a; color:#d7f7df; border-radius:8px; min-height:230px; padding:10px; white-space:pre-wrap; font-size:12.5px; }
.phone .row { margin-top:8px; flex-wrap:nowrap; }
.phone input { flex:1; min-width:0; }
.permit { border:2px solid var(--navy); border-radius:10px; padding:14px; max-width:560px; }
#blazor-error-ui { position:fixed; bottom:0; left:0; right:0; background:#fff3cd; padding:10px 20px; }
@media (max-width:820px) { .app { grid-template-columns:1fr; } .rail { flex-direction:row; flex-wrap:wrap; } }

/* Everything typed on the platform shows in capitals. The API stores it that way too. */
.app input[type=text], .app input:not([type]), .app textarea { text-transform:uppercase; }
input[type=email] { text-transform:lowercase; }   /* email fields take lower case */
.app input::placeholder { text-transform:none; }

/* ---------- Platform top bar ---------- */
.top .who { margin-right:auto; font-weight:600; }
.navkeys { display:inline-flex; gap:4px; } .navkeys .btn[disabled] { opacity:.4; cursor:default; }
.pfind { display:inline-flex; gap:4px; margin:0; } .pfind input { width:230px; } .pfind select { max-width:170px; }
.pfmsg { padding:8px 22px; background:#fff7e0; border-bottom:1px solid var(--line); font-size:13px; }
.top .who .note { font-weight:400; margin-left:6px; }

/* ---------- Public website ---------- */
.site { min-height:100vh; display:flex; flex-direction:column; }
.s-top { background:var(--navy); color:#fff; }
.s-bar { max-width:1120px; margin:0 auto; padding:12px 20px; display:flex; flex-wrap:wrap; gap:10px 22px; align-items:center; }
.s-brand { margin-right:auto; color:#fff; text-decoration:none; display:flex; flex-direction:column; line-height:1.2; }
.s-brand strong { font-size:16px; }
.s-brand span { font-size:11px; color:#a9b6cc; }
.s-nav { display:flex; flex-wrap:wrap; gap:4px; }
.s-nav a { color:#dfe6f2; text-decoration:none; padding:6px 10px; border-radius:6px; }
.s-nav a:hover { background:rgba(255,255,255,.1); }
.s-nav a.active { background:#fff; color:var(--navy); font-weight:600; }
.btn.light { background:#fff; color:var(--navy); border-color:#fff; font-weight:600; text-decoration:none; }
a.btn { text-decoration:none; display:inline-block; }
.s-wrap { max-width:1120px; width:100%; margin:0 auto; padding:26px 20px 44px; display:flex; flex-direction:column; gap:22px; flex:1; }
.s-wrap h1 { font-size:34px; line-height:1.12; margin-bottom:12px; }
.s-wrap h2 { font-size:22px; }
.lead { font-size:15.5px; color:#3a4558; max-width:70ch; }
.hero { display:grid; grid-template-columns:1.25fr 1fr; gap:26px; align-items:center; }
.three { grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); }
.steps { counter-reset:st; display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:12px; }
.steps .card { counter-increment:st; }
.steps .card::before { content:counter(st); display:inline-grid; place-items:center; width:26px; height:26px; border-radius:50%; background:var(--navy); color:#fff; font-weight:600; font-size:13px; margin-bottom:8px; }
.steps strong { display:block; margin-bottom:4px; }
.prose ul { margin:0 0 8px 20px; }
.prose p { margin-bottom:8px; max-width:72ch; }
details { border-bottom:1px solid var(--line); padding:10px 0; }
details summary { cursor:pointer; font-weight:600; }
details p { margin-top:6px; color:#3a4558; max-width:72ch; }
.s-foot { background:var(--navy); color:#a9b6cc; font-size:12.5px; }
.s-foot div { max-width:1120px; margin:0 auto; padding:16px 20px; display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:space-between; }

/* ---------- Sign-in ---------- */
.login { display:grid; grid-template-columns:1fr 1fr; max-width:900px; width:100%; margin:10px auto; border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
.login .side { background:var(--navy); color:#dfe6f2; padding:30px 28px; display:flex; flex-direction:column; gap:14px; }
.login .side h2 { color:#fff; }
.login .side .note { color:#a9b6cc; }
.login form { padding:30px 28px; display:flex; flex-direction:column; gap:14px; }
.login label { display:flex; flex-direction:column; gap:5px; font-size:12.5px; color:var(--mute); }
.login input { font-size:15px; min-height:40px; color:var(--ink); }
.pw { display:flex; gap:6px; }
.pw input { flex:1; min-width:0; }
.pw button { min-width:64px; }
:focus-visible { outline:2px solid var(--info); outline-offset:2px; }
@media (max-width:820px) { .hero, .login { grid-template-columns:1fr; } .s-wrap h1 { font-size:27px; } }
/* Offline mode, life card, barcode and border log */
.netbar { padding:9px 14px; border-radius:8px; margin-bottom:12px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.netbar.off { background:var(--bad-bg); color:var(--red); } .netbar.wait { background:var(--warn-bg); } .netbar.ok { background:var(--good-bg); }
.cardimg { display:block; max-width:100%; max-height:240px; margin-top:10px; border:1px solid var(--line); border-radius:6px; }
.codes { display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; margin-top:12px; }
.codes .bar svg { width:300px; max-width:100%; height:56px; } .codes .qr svg { width:104px; height:104px; }
.bigdir { font-weight:700; font-size:20px; padding:10px 16px; border-radius:8px; color:#fff; }
.bigdir.in { background:#1d7a55; } .bigdir.out { background:#14284b; }

/* The permit: an A5 landscape sheet, front and back. Sizes inside a sheet are in container units (cqw), so the
   sheet looks the same at any width on screen and prints at exactly 210 x 148 mm. */
.sheets { display:grid; gap:14px; max-width:760px; }
.sheet { container-type:inline-size; width:100%; aspect-ratio:210/148; background:#fff; border:1px solid var(--navy); position:relative; overflow:hidden; color:#111; box-shadow:0 1px 4px rgba(0,0,0,.12); }
.sheet .in { position:absolute; inset:0; padding:3.4cqw 3.8cqw; font-size:1.62cqw; line-height:1.35; display:flex; flex-direction:column; }
.sheet .sh { display:flex; justify-content:space-between; align-items:flex-start; gap:2cqw; border-bottom:.35cqw solid var(--navy); padding-bottom:1.1cqw; }
.sheet .lg { width:10.5cqw; height:7.6cqw; display:flex; align-items:center; justify-content:center; flex:none; }
.sheet .lg img { max-width:100%; max-height:100%; object-fit:contain; font-size:1.1cqw; line-height:1.25; color:#556; text-align:center; border:.2cqw dashed #8a94a6; }
.sheet .rep { font-size:1.45cqw; letter-spacing:.08em; text-transform:uppercase; color:#333; }
.sheet .ttl { font-size:3cqw; font-weight:700; line-height:1.1; color:var(--navy); }
.sheet .pno { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:2.35cqw; color:var(--red); font-weight:600; text-align:right; white-space:nowrap; }
.sheet .bd { flex:1; display:grid; grid-template-columns:1fr 22cqw; gap:3cqw; padding:1.5cqw 0; min-height:0; }
.sheet dl { display:grid; grid-template-columns:17cqw 1fr; gap:.5cqw 1.5cqw; margin:0; }
.sheet dt { color:#555; } .sheet dd { margin:0; font-weight:600; }
.sheet .side { text-align:center; font-size:1.35cqw; color:#444; } .sheet .side svg { width:19cqw; height:19cqw; }
.sheet .ft { display:flex; justify-content:space-between; align-items:flex-end; gap:2cqw; border-top:.2cqw solid #999; padding-top:.9cqw; font-size:1.35cqw; color:#333; }
.sheet .bc { text-align:center; } .sheet .bc svg { width:36cqw; height:6.2cqw; display:block; }
.sheet .tag { display:inline-block; border:.25cqw solid var(--red); color:var(--red); font-weight:700; padding:0 1cqw; margin-left:1cqw; font-size:1.5cqw; vertical-align:middle; }
.sheet h4 { font-size:1.75cqw; margin:1cqw 0 .3cqw; color:var(--navy); }
.sheet ol { margin:0; padding-left:2.6cqw; } .sheet li { margin-bottom:.25cqw; }
.sheet .cols { flex:1; display:grid; grid-template-columns:1.25fr 1fr; gap:3cqw; min-height:0; padding-top:.6cqw; }
.sheet .stamps { display:grid; grid-template-columns:repeat(2,1fr); gap:1cqw; } .sheet .stamps div { border:.2cqw dashed #777; height:8.2cqw; font-size:1.25cqw; color:#666; padding:.4cqw .6cqw; }
.sheet .face { position:absolute; right:1.6cqw; top:.9cqw; font-size:1.15cqw; color:#888; letter-spacing:.12em; }
#printArea { display:none; }
@page permit { size:A5 landscape; margin:0; }
@media print {
  body.printing > *:not(#printArea) { display:none !important; }
  body.printing #printArea { display:block; }
  #printArea .sheet { page:permit; width:210mm; height:148mm; aspect-ratio:auto; border:0; box-shadow:none; break-after:page; page-break-after:always; }
}

/* The Liberian dollar amount beside the US dollar one on an advice or a receipt. */
.lrd { color:#333; font-weight:500; white-space:nowrap; }
/* Bilingual documents: the French under the English (.fr) or after it on the same line (.fri). */
.fr { display:block; font-style:italic; font-weight:400; font-size:.86em; color:#555; line-height:1.2; }
.fri { font-style:italic; font-weight:400; color:#555; }
.permit.bil dl.kv dt, .permit.bil dl.kv dd { padding-bottom:3px; }
.sheet.bil .in { font-size:1.5cqw; line-height:1.25; }
.sheet.bil dl { grid-template-columns:19cqw 1fr; gap:.32cqw 1.5cqw; }
.sheet.bil dt .fr { font-size:.8em; }
.sheet.bil .ttl .fr { font-size:.74em; font-style:normal; font-weight:600; color:var(--navy); margin-top:.2cqw; }
.sheet.bil .tag { font-size:1.15cqw; padding:0 .6cqw; margin-left:.6cqw; }
.sheet.bil .tag .fri { color:var(--red); font-weight:700; font-style:normal; }
.sheet.bil .ft { font-size:1.12cqw; line-height:1.2; padding-top:.6cqw; }
.sheet.bil .ft .fr { font-size:.95em; }
.sheet.bil .side { font-size:1.15cqw; } .sheet.bil .side svg { width:17cqw; height:17cqw; }
.sheet.bil .bd { grid-template-columns:1fr 19cqw; padding:1cqw 0; }
.sheet .cols2 { flex:1; display:grid; grid-template-columns:1fr 1.08fr; gap:2.2cqw; min-height:0; padding-top:.7cqw; font-size:1.36cqw; line-height:1.26; }
.sheet .cols2 ol { padding-left:2.1cqw; } .sheet .cols2 li { margin-bottom:.3cqw; }
.sheet .cols2 .frc { font-style:italic; color:#333; border-left:.15cqw solid #bbb; padding-left:3.4cqw; }
.sheet .strip { display:grid; grid-template-columns:1fr 1fr 1.25fr; gap:1.8cqw; border-top:.15cqw solid #bbb; padding:.5cqw 0 .6cqw; font-size:1.14cqw; line-height:1.22; }
.sheet .strip h4 { font-size:1.2cqw; margin:0 0 .25cqw; }
.sheet .strip .stamps div { height:6.4cqw; font-size:1cqw; }
.sheet .strip .stamps.four { grid-template-columns:repeat(4,1fr); gap:.6cqw; }

/* Agency logos at the head of the payment advice and the payment receipt. */
.logos { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.logos .mid { text-align:center; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:#445; }
.logo-slot { width:114px; height:58px; display:flex; align-items:center; justify-content:center; flex:none; }
.logo-slot img { max-width:100%; max-height:100%; object-fit:contain; font-size:10px; line-height:1.25; color:#556; text-align:center; border:1px dashed #8a94a6; border-radius:4px; padding:2px; }
