/* T&T CRM. Brand: navy #153068, red #e70f23, Raleway. No inline styles anywhere (strict CSP). */
:root {
  --navy: #153068; --navy-2: #24448a; --navy-soft: #eaeef7; --red: #e70f23; --red-dark: #c00a1c;
  --text: #28355a; --muted: #6b7590; --line: #e3e7ef; --soft: #f3f5f9; --bg: #f5f7fb; --white: #fff;
  --green: #15734a; --green-bg: #e3f4ea; --amber: #8f5300; --amber-bg: #fff1d6; --red-bg: #fde8ea; --blue: #1d4ea3; --blue-bg: #e7eefc;
  --radius: 10px; --shadow: 0 1px 2px rgba(21, 48, 104, .06), 0 2px 8px rgba(21, 48, 104, .04);
  --font: Raleway, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); font-variant-numeric: lining-nums; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2 { color: var(--navy); line-height: 1.25; margin: 0; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
p { margin: 0 0 10px; }
code { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; }
code.copy { cursor: copy; }
code.copied { background: var(--green-bg); border-color: #b9e2c9; }
:focus-visible { outline: 3px solid #8fb0f0; outline-offset: 2px; }
.icon { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small, small { font-size: 13px; }
.pre { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.text-red { color: var(--red); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px/1 var(--font); padding: 10px 16px;
  border-radius: 7px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; background: none; color: var(--navy); }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-secondary { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-ghost { color: var(--navy); background: transparent; border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); color: var(--navy); }
.btn-ok { background: var(--green); color: #fff; }
.btn-ok:hover { background: #0f5c3a; color: #fff; }
.btn-danger { background: #b3261e; color: #fff; }
.btn-danger:hover { background: #8c1d17; color: #fff; }
.danger-text { color: #b3261e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: inline-flex; gap: 6px; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy-2); text-decoration: underline; cursor: pointer; }

/* ===== Messages, badges, avatars ===== */
.flash { padding: 12px 14px; border-radius: 8px; margin: 0 0 16px; font-weight: 500; }
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-bad { background: var(--red-bg); color: #9b1020; }
.flash code { margin: 0 4px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; line-height: 1.4; }
.badge-grey { background: #eceff4; color: #4d5875; }
.badge-red { background: var(--red-bg); color: #b00d1d; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; color: var(--navy); background: var(--navy-soft); padding: 2px 7px; border-radius: 4px; margin-left: 4px; }
.tag-visible { color: var(--green); font-weight: 600; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; background: var(--navy-soft); color: var(--navy); font-weight: 700; }
.avatar-32 { width: 32px; height: 32px; font-size: 12px; }
.avatar-36 { width: 36px; height: 36px; font-size: 14px; }
.avatar-56 { width: 56px; height: 56px; font-size: 20px; }

/* ===== Admin shell ===== */
body.admin { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 20px 14px; }
.side-logo { display: flex; align-items: flex-end; gap: 8px; padding: 0 8px 20px; text-decoration: none; }
.side-logo img { width: 140px; height: auto; }
.side-logo span { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted); padding-bottom: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; position: relative; }
.side-nav a:hover { background: var(--soft); color: var(--navy); }
.side-nav a.on { background: var(--navy-soft); color: var(--navy); }
.side-nav a.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.side-nav .count { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); padding: 4px 6px; border-radius: 8px; }
.me:hover { background: var(--soft); }
.me span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.me strong { font-size: 14px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me small { color: var(--muted); }
.side-foot form .btn { width: 100%; justify-content: flex-start; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 32px; background: rgba(245, 247, 251, .92); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; color: var(--muted); }
.search:focus-within { border-color: var(--navy-2); }
.search input { border: 0; outline: 0; padding: 10px 0; width: 100%; font: inherit; color: var(--text); background: transparent; }
.top-actions { margin-left: auto; }
.content { padding: 24px 32px 60px; max-width: 1320px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== Cards and layout ===== */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow-x: auto; }
.card.narrow { max-width: 720px; }
.card.accent { border-top: 3px solid var(--red); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head h2 .muted { font-weight: 500; font-size: 13px; margin-left: 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; color: var(--navy); margin-bottom: 5px; }
.field input, .field select, .field textarea, .note-form textarea, .filter input {
  width: 100%; font: inherit; color: var(--text); background: var(--white); border: 1.5px solid #d5dbe7; border-radius: 7px; padding: 9px 11px; }
.field input:focus, .field select:focus, .field textarea:focus, .note-form textarea:focus, .filter input:focus { border-color: var(--navy-2); outline: 0; box-shadow: 0 0 0 3px #dbe5fa; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
.fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.fieldset legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.filter { min-width: 240px; }
.filter input { padding: 8px 11px; }

/* ===== Dashboard ===== */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; position: relative; transition: transform .12s, box-shadow .12s; }
.kpi:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(21, 48, 104, .1); color: var(--text); }
.kpi-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--navy-soft); color: var(--navy); margin-bottom: 12px; }
.kpi-value { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1; }
.kpi-label { font-weight: 600; margin-top: 6px; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi-red .kpi-icon { background: var(--red-bg); color: var(--red); }
.kpi-red .kpi-value { color: var(--red); }
.kpi-amber .kpi-icon { background: var(--amber-bg); color: var(--amber); }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.pipe { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 8px; background: var(--soft); text-decoration: none; color: var(--text); }
.pipe:hover { background: var(--navy-soft); color: var(--text); }
.pipe-n { font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.pipe-l { font-size: 13px; font-weight: 600; }
.pipe-bar, .progress { display: block; height: 6px; border-radius: 3px; background: #dfe4ee; overflow: hidden; }
.pipe-bar i, .progress i { display: block; height: 100%; background: var(--navy); border-radius: 3px; }
.progress { display: inline-block; width: 60px; vertical-align: middle; margin-right: 6px; }
.progress i { background: var(--green); }
.progress-lg { display: block; width: 100%; height: 8px; margin: -4px 0 14px; }

/* ===== Lists, activity, tables ===== */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; text-decoration: none; color: var(--text); }
.list-main strong { color: var(--navy); }
.list-main:hover strong { color: var(--red); }
.list-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts { list-style: none; margin: 0; padding: 0; }
.act { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.act:first-child { border-top: 0; }
.act-icon { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); }
.kind-stage, .kind-official { background: var(--navy-soft); color: var(--navy); }
.kind-document { background: var(--blue-bg); color: var(--blue); }
.kind-originals { background: var(--amber-bg); color: var(--amber); }
.kind-enquiry { background: var(--red-bg); color: var(--red); }
.act-body { margin: 0; white-space: pre-line; }
.act-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.row-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.row-link span { display: flex; flex-direction: column; min-width: 0; }
.row-link strong { color: var(--navy); }
a.row-link:hover strong { color: var(--red); }
.row-link small { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: 7px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.tabs a:hover { background: var(--white); }
.tabs a.on { background: var(--navy); color: #fff; }
.tabs a b { font-weight: 700; font-size: 12px; opacity: .7; margin-left: 2px; }
.tabs-quiet a.on { background: var(--navy-soft); color: var(--navy); }
.pager { display: flex; justify-content: space-between; }
.empty { text-align: center; color: var(--muted); padding: 26px 12px; }
.empty .icon { color: #b8c0d3; }
.empty p { margin: 8px 0 0; }
.dl { display: grid; grid-template-columns: minmax(140px, 34%) 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 14px; }
.dl dd { margin: 0; font-weight: 600; color: var(--navy); }
.dl-inline { margin-bottom: 16px; }
.dl-compact { grid-template-columns: 90px 1fr; gap: 4px 10px; }
.dl-compact dd { font-weight: 500; }
.contact { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.contact div { display: flex; flex-direction: column; min-width: 0; }
.contact strong { color: var(--navy); font-size: 16px; }
.contact a { overflow-wrap: anywhere; }
.note-box { background: var(--amber-bg); border-radius: 7px; padding: 8px 10px; }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.note-form .btn-row { width: 100%; }
.note-form .btn-row .btn { margin-left: auto; }

/* ===== Stage pipeline ===== */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; counter-reset: s; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.now::before { background: var(--navy); }
.stepper .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 2px solid var(--line); z-index: 1; font-weight: 700; }
.stepper li.done .dot { background: var(--navy); border-color: var(--navy); color: #fff; }
.stepper li.now .dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px var(--red-bg); }
.stepper li.done, .stepper li.now { color: var(--navy); }
.mini-steps { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.mini-steps i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.mini-steps i.done { background: var(--navy); }
.mini-steps i.now { background: var(--red); }
.mini-steps span { font-size: 13px; font-weight: 600; margin-left: 6px; }
.case-stage { padding-top: 22px; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.stage-bar p, .stage-now { margin: 0; }
.stage-now { margin-top: 16px; text-align: center; }
.case-cards { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.case-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; color: var(--text); background: var(--white); }
.case-card:hover { border-color: var(--navy-2); color: var(--text); box-shadow: var(--shadow); }
.case-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.case-card-top strong { color: var(--navy); }

/* ===== Documents ===== */
.docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.doc { border: 1px solid var(--line); border-left: 4px solid #cfd6e4; border-radius: 8px; padding: 12px 14px; }
.doc-uploaded { border-left-color: #e6a100; background: #fffcf4; }
.doc-approved { border-left-color: var(--green); }
.doc-rejected { border-left-color: var(--red); background: #fffafa; }
.doc-waived { opacity: .6; }
.doc:target { box-shadow: 0 0 0 3px #dbe5fa; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.doc-title strong { color: var(--navy); }
.doc-title p { margin: 3px 0 0; }
.doc-note { color: #9b1020; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.files li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.files li.old { opacity: .65; }
.results { border-left: 4px solid var(--green); }
.declined { border-left: 4px solid var(--red); }
.callout.callout-bad { background: var(--red-bg); color: #8a0a17; }
.results .files li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.doc-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; margin-top: 10px; }
.doc-actions form { margin: 0; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.pop { position: relative; }
details.pop > div, details.pop > form { position: absolute; z-index: 4; top: calc(100% + 6px); left: 0; width: 320px; background: var(--white); border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 10px 30px rgba(21, 48, 104, .16); padding: 14px; }
details.pop-right > form { left: auto; right: 0; }
details.disclose > summary { margin-top: 6px; }
details.disclose[open] > summary { margin-bottom: 14px; }
details.disclose > form { padding: 14px; border: 1px dashed #cfd6e4; border-radius: 8px; }
.danger-zone > summary { cursor: pointer; color: #b3261e; font-weight: 600; font-size: 14px; }
.danger-zone[open] > summary { margin-bottom: 10px; }
.checklist { list-style: none; margin: 0 0 12px; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist li > div { flex: 1; }
.checklist form { margin: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cfd6e4; display: grid; place-items: center; flex: none; }
.checklist li.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.official-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--soft); border-radius: 8px; margin-bottom: 10px; }

/* ===== Sign-in ===== */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, #e8edf8, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 420px; background: var(--white); border-radius: 14px; border-top: 4px solid var(--red); box-shadow: 0 12px 40px rgba(21, 48, 104, .12); padding: 32px 32px 26px; }
.auth-logo { display: block; margin-bottom: 6px; }
.auth-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.auth-title { font-size: 22px; margin-bottom: 8px; }
.auth-card .stack { margin: 18px 0 14px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.code-input { font-size: 26px !important; letter-spacing: 10px; text-align: center; font-weight: 700; }

/* ===== Client portal ===== */
body.portal { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.portal-top { background: var(--white); border-bottom: 1px solid var(--line); border-top: 4px solid var(--red); }
.portal-top .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.portal-me { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.portal-me form { margin: 0; }
.portal-main { padding-top: 28px; padding-bottom: 48px; flex: 1; }
.portal-title { font-size: 26px; margin-bottom: 4px; }
.portal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.portal-foot { border-top: 1px solid var(--line); background: var(--white); font-size: 13px; color: var(--muted); }
.portal-foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.callout { display: flex; gap: 12px; align-items: flex-start; background: var(--amber-bg); color: #5f3800; border-radius: 9px; padding: 14px 16px; margin-bottom: 20px; }
.advisor { display: flex; gap: 14px; align-items: center; background: var(--navy); color: #dfe6f5; border: 0; }
.advisor strong { color: #fff; }
.advisor a { color: #fff; }
.advisor p { margin: 4px 0 0; }
.advisor img { border-radius: 50%; flex: none; }
.upload { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.upload-pick { display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed #b9c3d8; border-radius: 7px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); max-width: 100%; }
.upload-pick:hover, .upload-pick:focus-within { border-color: var(--navy); background: var(--soft); }
.upload-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.address { background: var(--soft); border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.address p { margin: 4px 0 0; font-weight: 600; color: var(--navy); }
.official-status { font-size: 22px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.courier-form { border-top: 1px solid var(--line); padding-top: 14px; }

/* Bar widths in 5% steps (no inline styles under the CSP). */
.w0 { width: 0%; }
.w5 { width: 5%; }
.w10 { width: 10%; }
.w15 { width: 15%; }
.w20 { width: 20%; }
.w25 { width: 25%; }
.w30 { width: 30%; }
.w35 { width: 35%; }
.w40 { width: 40%; }
.w45 { width: 45%; }
.w50 { width: 50%; }
.w55 { width: 55%; }
.w60 { width: 60%; }
.w65 { width: 65%; }
.w70 { width: 70%; }
.w75 { width: 75%; }
.w80 { width: 80%; }
.w85 { width: 85%; }
.w90 { width: 90%; }
.w95 { width: 95%; }
.w100 { width: 100%; }

/* ===== Small screens ===== */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.admin { display: block; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-logo { padding: 0; }
  .side-logo img { width: 110px; }
  .side-nav { flex-direction: row; overflow-x: auto; order: 3; width: 100%; gap: 4px; }
  .side-nav a { padding: 8px 10px; white-space: nowrap; }
  .side-nav a.on::before { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; align-items: center; }
  .me span, .side-foot .btn span { display: none; }
  .top { padding: 10px 16px; position: static; }
  .content { padding: 18px 16px 48px; }
  .grid-2, .row-2 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-value { font-size: 24px; }
  .top-actions { display: none; }
  .stepper li:not(.now) .lbl { display: none; }
  .stepper li .lbl { font-size: 12px; white-space: nowrap; }
  .stepper .dot { width: 26px; height: 26px; font-size: 12px; }
  .stepper li::before { top: 12px; }
  .wrap { padding: 0 16px; }
  .hide-sm { display: none; }
  .card { padding: 16px; }
  details.pop > div, details.pop > form { position: static; width: auto; margin-top: 8px; box-shadow: none; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .auth-card { padding: 24px 20px; }
  .stage-bar { flex-direction: column; align-items: flex-start; }
  h1, .portal-title { font-size: 22px; }
}
