/* =============================================================================
   Interspace Shipping LTD — core design system
   Tokens, base, typography, components, site header/footer, auth, maps.
   Page-specific styles live in site.css (public pages), tracking.css,
   portal.css (customer portal), admin.css (staff area) and print.css.
   ============================================================================= */

/* ---------------------------------------------------------------- fonts (self-hosted) */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/assets/fonts/poppins-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Metric-matched fallbacks keep layout stable while the web fonts load. */
@font-face { font-family: "Poppins Fallback"; src: local("Arial"); size-adjust: 112%; ascent-override: 93%; descent-override: 31%; line-gap-override: 9%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"); size-adjust: 107%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; }

/* ---------------------------------------------------------------- tokens */
:root {
  --navy-950: #041d3d;
  --navy-900: #08294e;   /* footer, dark sections */
  --navy-850: #022b61;   /* about panel */
  --navy-800: #053678;   /* primary buttons */
  --navy-700: #0b4596;
  --navy-600: #1d4f9c;
  --blue-600: #1a5fd0;
  --blue-500: #1e6fe8;   /* current-location / links on dark */
  --blue-100: #dce9fb;
  --blue-50:  #ebf5fe;   /* light sections */
  --blue-25:  #f6fafe;
  --gold-500: #f4bf4f;   /* buttons / accents on navy */
  --gold-400: #fbc259;
  --gold-600: #e0a93a;
  --gold-text: #8f6612;  /* gold text on light backgrounds (WCAG AA) */
  --ink:      #0b2a5b;   /* headings */
  --text:     #33445e;
  --muted:    #5b6b83;
  --line:     #e2e9f3;
  --line-strong: #cfd9e8;
  --bg:       #f4f8fb;
  --surface:  #ffffff;
  --green-600: #177a44; --green-500: #1f9d57; --green-50: #dcf5e8;
  --amber-600: #a15c07; --amber-500: #f59e0b; --amber-50: #fef3dc;
  --red-600: #b91c1c;   --red-500: #dc2626;   --red-50: #fde8e8;
  --purple-500: #7c5cd6;

  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Poppins", "Poppins Fallback", "Inter", system-ui, sans-serif;

  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px; --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(8, 41, 78, .06);
  --shadow: 0 6px 20px rgba(8, 41, 78, .08);
  --shadow-lg: 0 18px 40px rgba(8, 41, 78, .14);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 84px;
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--blue-500);
  color-scheme: light;
}

/* ---------------------------------------------------------------- reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: var(--text); background: var(--surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--navy-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-600); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
::selection { background: var(--gold-400); color: var(--ink); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; color: #fff; }
main:focus { outline: none; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-sm { padding: clamp(32px, 5vw, 56px) 0; }
.bg-light { background: var(--bg); }
.bg-blue { background: var(--blue-50); }
.bg-navy { background: var(--navy-900); color: #d6e1f1; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }

/* ---------------------------------------------------------------- icons */
.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.icon-fill { fill: currentColor; stroke: none; }

/* ---------------------------------------------------------------- typography helpers */
.eyebrow { display: inline-block; font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 .6rem; }
.eyebrow-gold, .bg-navy .eyebrow, .on-dark .eyebrow { color: var(--gold-400); }
.lead { font-size: 1.1rem; color: var(--text); }
.muted { color: var(--muted); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .78rem; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.3em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--navy-700); }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 44px; padding: .65em 1.35em; border-radius: var(--radius-sm); border: 1.5px solid transparent; font-family: var(--font-body); font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn .icon { width: 1.05em; height: 1.05em; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-900); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--ink); }
.btn-gold:hover { background: var(--gold-400); color: var(--ink); box-shadow: 0 6px 16px rgba(244, 191, 79, .35); }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.85); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy-800); padding-left: .6em; padding-right: .6em; }
.btn-ghost:hover { background: var(--blue-50); }
.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { background: var(--red-600); color: #fff; }
.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { background: var(--green-600); color: #fff; }
.btn-sm { min-height: 36px; padding: .45em .9em; font-size: .85rem; }
.btn-lg { min-height: 52px; padding: .8em 1.7em; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: .9rem; color: var(--gold-text); text-decoration: none; }
.link-arrow:hover { color: var(--navy-800); }
.link-arrow .icon { transition: transform .15s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------------------------------------------------------------- forms */
.form-grid { display: grid; gap: 18px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2, .form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field .req { color: var(--red-500); margin-left: 2px; }
.field-hint { font-size: .8rem; color: var(--muted); margin: 0; }
.input, .select, .textarea,
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"],
.field input[type="number"], .field input[type="date"], .field input[type="datetime-local"], .field input[type="time"],
.field input[type="search"], .field input[type="url"], .field select, .field textarea {
  width: 100%; min-height: 44px; padding: .6em .85em; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: .95rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea, .textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select, .select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6b83' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8em center; padding-right: 2.2em; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(30, 111, 232, .18); }
.field [aria-invalid="true"] { border-color: var(--red-500); }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--red-600); font-size: .82rem; font-weight: 500; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--navy-800); flex: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 20px; }
.fieldset > legend { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; color: var(--ink); padding: 0 8px; }
.input-group { display: flex; }
.input-group > input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > select, .input-group > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1.5px; width: auto; }

/* ---------------------------------------------------------------- alerts / flash */
.flash-stack { display: grid; gap: 10px; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 16px auto 0; padding: 0 var(--gutter); }
.admin-content .flash-stack, .portal-main .flash-stack, .auth-card .flash-stack { padding: 0; margin: 0 0 18px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .93rem; line-height: 1.5; }
.alert .icon { margin-top: 2px; width: 1.2em; height: 1.2em; }
.alert-success { background: var(--green-50); border-color: #b8e6cc; color: #145c35; }
.alert-error { background: var(--red-50); border-color: #f7c1c1; color: #8f1515; }
.alert-warning { background: var(--amber-50); border-color: #f5d79c; color: #7a4705; }
.alert-info { background: var(--blue-50); border-color: #c6dcf8; color: #0f3d80; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; line-height: 1.3; white-space: nowrap; background: var(--blue-50); color: var(--navy-800); }
.badge .icon { width: 1em; height: 1em; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* Status badges tint themselves from the status colour (--badge). */
.badge-status { --badge: var(--blue-500); background: color-mix(in srgb, var(--badge) 14%, #fff); color: color-mix(in srgb, var(--badge) 72%, #0b2a5b); }
.badge-lg { font-size: .92rem; padding: 7px 14px; }
.badge-success { background: var(--green-50); color: var(--green-600); }
.badge-warning { background: var(--amber-50); color: var(--amber-600); }
.badge-danger { background: var(--red-50); color: var(--red-600); }
.badge-muted { background: #eef1f6; color: var(--muted); }
.badge-test { background: #fff1d6; color: #7a4705; border: 1px dashed #e0a93a; }
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red-500); color: #fff; font-size: .7rem; font-weight: 700; margin-left: auto; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-body { padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1.05rem; }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); }
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .icon { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--line-strong); stroke-width: 1.4; }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }

/* Definition list used by summary cards */
.dl { margin: 0; }
.dl-row { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.dl-row:last-child { border-bottom: 0; }
.dl-row dt { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.dl-row dt .icon { color: var(--navy-700); }
.dl-row dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- tables */
.table-wrap { position: relative; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: .9rem; }
.table th { text-align: left; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--blue-25); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.table th a:hover { color: var(--ink); }
/* Stacked cards on phones: add data-label="…" to each td */
@media (max-width: 720px) {
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 6px 12px; background: #fff; }
  .table-stack td { border: 0; padding: 7px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; font-size: .8rem; }
  .table-stack td.actions { justify-content: flex-end; }
  .table-stack td.actions::before { content: none; }
}

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; margin-bottom: 20px; }
.tabs a { padding: 12px 16px; font-weight: 600; font-size: .9rem; color: var(--muted); text-decoration: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active, .tabs a[aria-current="page"] { color: var(--navy-800); border-bottom-color: var(--gold-500); }

/* ---------------------------------------------------------------- pagination & breadcrumbs */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 0; }
.pagination-info { margin: 0; font-size: .85rem; color: var(--muted); }
.pagination ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; }
.pagination a:hover { border-color: var(--navy-800); }
.pagination .is-current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pagination .is-disabled { opacity: .4; }
.pagination .gap { border: 0; background: none; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .82rem; }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.breadcrumbs a { text-decoration: none; color: inherit; opacity: .85; }
.breadcrumbs a:hover { opacity: 1; text-decoration: underline; }

/* ---------------------------------------------------------------- site header (design) */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid rgba(11, 42, 91, .06); transition: box-shadow .2s ease; }
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(8, 41, 78, .08); }
.site-header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: block; flex: none; }
.brand img { width: clamp(200px, 19vw, 262px); height: auto; }
.site-nav { display: flex; align-items: center; flex: 1; gap: 24px; }
.site-nav-list { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); list-style: none; margin: 0 auto; padding: 0; }
.site-nav-list a { position: relative; display: block; padding: 28px 0; font-size: .93rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.site-nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 20px; height: 2.5px; border-radius: 2px; background: var(--gold-500); transform: scaleX(0); transition: transform .2s ease; }
.site-nav-list a:hover::after, .site-nav-list a.is-active::after { transform: scaleX(1); }
.site-nav-list a.is-active { color: var(--navy-800); font-weight: 600; }
.site-nav-actions { display: flex; align-items: center; gap: 22px; }
.nav-login { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-login .icon { width: 1.2em; height: 1.2em; fill: var(--ink); stroke: var(--ink); }
.nav-login:hover { color: var(--blue-600); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); align-items: center; justify-content: center; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1100px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 16px 30px rgba(8, 41, 78, .12); padding: 8px var(--gutter) 20px; display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-nav.is-open { display: flex; }
  .site-nav-list { flex-direction: column; align-items: stretch; gap: 0; margin: 0; }
  .site-nav-list a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .site-nav-list a::after { display: none; }
  .site-nav-list a.is-active { color: var(--navy-800); box-shadow: inset 3px 0 0 var(--gold-500); padding-left: 12px; }
  .site-nav-actions { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 16px; }
  .nav-login { padding: 10px 4px; }
}

/* ---------------------------------------------------------------- site footer (design) */
.site-footer { background: var(--navy-900); color: #c9d6ea; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 48px; padding-bottom: 36px; }
.footer-grid > * + * { border-left: 1px solid rgba(255, 255, 255, .08); padding-left: 40px; }
.footer-logo img { width: 210px; height: auto; margin-bottom: 14px; }
.footer-brand p { color: #c9d6ea; max-width: 34ch; line-height: 1.55; }
.footer-social { display: flex; gap: 12px; list-style: none; padding: 0; margin: 16px 0 0; }
.footer-social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--navy-900); transition: background .15s ease; }
.footer-social a:hover { background: var(--gold-400); }
.footer-social .icon { width: 16px; height: 16px; }
.footer-col h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: #fff; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-col a { color: #c9d6ea; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--gold-400); margin-top: 3px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; }
.footer-bottom p { margin: 0; color: #9fb3d1; }
.footer-bottom a { color: #9fb3d1; margin-left: 10px; }
.footer-values { letter-spacing: .02em; word-spacing: .4em; }
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > * + * { border-left: 0; padding-left: 0; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------------------------------------------------------------- auth pages */
.auth-body { background: var(--bg); }
.auth-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth-visual { position: relative; background: linear-gradient(160deg, rgba(4, 29, 61, .92), rgba(5, 54, 120, .78)), url("/assets/img/photos/hero-services.webp") center / cover no-repeat; color: #fff; display: flex; align-items: flex-end; padding: 48px; }
.auth-visual-inner img { width: 220px; margin-bottom: 28px; }
.auth-visual-title { font-family: var(--font-head); font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 700; line-height: 1.25; max-width: 18ch; color: #fff; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px var(--gutter); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px; }
.auth-card.auth-card-wide { max-width: 640px; }
.auth-logo img { width: 190px; margin-bottom: 22px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; }
.auth-intro { color: var(--muted); margin-bottom: 22px; }
.auth-card form { display: grid; gap: 16px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }
.auth-footnote { margin-top: 18px; font-size: .88rem; }
.auth-footnote a { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); text-decoration: none; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-visual { display: none; } }
@media (min-width: 901px) { .auth-logo { display: none; } }

/* ---------------------------------------------------------------- route maps (App\Core\RouteMap) */
.route-map { position: relative; overflow: hidden; border-radius: var(--radius); background: #eef5fc; aspect-ratio: 16 / 9; }
.route-map.rm-dark { background: #0a3263; }
.route-map .rm-svg { width: 100%; height: 100%; display: block; font-family: var(--font-body); }
.route-map text { font-family: var(--font-body); }
.rm-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; background: #fff; border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.rm-zoom-btn { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: #fff; color: var(--ink); }
.rm-zoom-btn + .rm-zoom-btn { border-top: 1px solid var(--line); }
.rm-zoom-btn:hover { background: var(--blue-50); }

/* ---------------------------------------------------------------- stat tiles (dashboards) */
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat { display: flex; gap: 14px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: inherit; }
a.stat:hover { border-color: var(--blue-100); box-shadow: var(--shadow); }
.stat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--blue-50); color: var(--navy-800); flex: none; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat-value { font-family: var(--font-head); font-size: 1.55rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-label { font-size: .82rem; color: var(--muted); margin: 2px 0 0; }
.stat.tone-green .stat-icon { background: var(--green-50); color: var(--green-600); }
.stat.tone-amber .stat-icon { background: var(--amber-50); color: var(--amber-600); }
.stat.tone-red .stat-icon { background: var(--red-50); color: var(--red-600); }
.stat.tone-gold .stat-icon { background: #fff4dc; color: var(--gold-text); }

/* ---------------------------------------------------------------- error pages */
.error-page { padding: clamp(64px, 10vw, 120px) 0; text-align: center; background: var(--bg); }
.error-page-inner { max-width: 640px; }
.error-page img { margin: 0 auto 28px; }
.error-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--blue-50); color: var(--navy-800); margin: 0 auto 18px; }
.error-page .eyebrow { display: block; }
.error-icon .icon { width: 34px; height: 34px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.error-ref { margin-top: 20px; font-size: .82rem; color: var(--muted); }
.error-debug { text-align: left; white-space: pre-wrap; background: #0b1b33; color: #e2ecff; padding: 16px; border-radius: 8px; overflow: auto; max-height: 420px; font-size: .78rem; margin-top: 24px; }

/* ---------------------------------------------------------------- misc components */
.avatar { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gold-500); color: var(--ink); font-weight: 700; font-size: .85rem; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--green-50); color: var(--green-600); font-size: .78rem; font-weight: 600; }
.divider-dot::before { content: "•"; margin: 0 8px; color: var(--line-strong); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.toolbar .field { min-width: 160px; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack { display: grid; gap: 20px; }
.test-ribbon { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px 16px; background: #fff4dc; color: #7a4705; font-size: .85rem; font-weight: 600; border-bottom: 1px dashed #e0a93a; }

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
