/* ==========================================================================
   CGT Client File Portal — styled after cgtlesotho.com
   Green (dominant) · navy (secondary) · orange (highlight)
   Colours are overridden at runtime by /branding/theme.css (Admin → Branding).
   ========================================================================== */
:root {
  --brand-900: #074b01;   /* deep green: sidebar bottom, footer */
  --brand-800: #0a6b02;   /* sidebar, links */
  --brand-700: #0d8902;   /* CGT green: top bar, buttons, banners */
  --brand-600: #2a9520;
  --brand-100: #dbeedb;
  --brand-50:  #eff7ef;
  --link:      #0a6b02;
  --navy:      #0b1c59;   /* CGT navy */
  --navy-700:  #0b0853;
  --highlight: #f35a1a;   /* CGT orange */
  --stripe:    #fa360a;

  --ink: #1b1f24;
  --ink-2: #4a525c;
  --ink-3: #78818c;
  --line: #dfe3e8;
  --line-2: #eef0f3;
  --bg: #f5f7f5;
  --surface: #ffffff;
  --green: #1b7a2b;  --green-bg: #e3f3e5;
  --amber: #8a5a00;  --amber-bg: #fdf1d8;
  --red: #b42318;    --red-bg: #fde8e6;
  --blue: #1d4fb8;   --blue-bg: #e5ecfb;
  --purple: #5b3fa8; --purple-bg: #efeafb;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --font: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Source Sans 3", "Source Sans Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --sidebar-w: 256px;
}

/* ---------------------------------------------------------------- base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--ink); font-family: var(--display); }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16.5px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 .75em; }
small, .muted { color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.prewrap { white-space: pre-wrap; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------------------------------------------------------------- green contact bar (as on the website) */
.site-top { background: var(--brand-700); color: #fff; font-size: 14px; font-weight: 600; }
.site-top .inner { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 10px; gap: 10px; }
.site-top .group { display: flex; align-items: center; min-width: 0; }
.site-top .item { display: flex; align-items: center; gap: 9px; padding: 11px 20px; position: relative; white-space: nowrap; color: #fff; }
.site-top a.item:hover { text-decoration: none; opacity: .9; }
.site-top .item + .item::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 1.5px; background: rgba(255,255,255,.9); transform: skewX(-25deg); }
.site-top .item svg.icon { width: 17px; height: 17px; }
.site-top strong { font-weight: 700; }

/* ---------------------------------------------------------------- layout with vertical menu */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: calc(100vh - 46px);
         background: linear-gradient(to right, var(--brand-800) var(--sidebar-w), var(--bg) var(--sidebar-w)); }
.sidebar { background: linear-gradient(180deg, var(--brand-800) 0%, var(--brand-900) 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { background: #fff; padding: 16px 18px 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; border-bottom: 4px solid var(--brand-700); }
.brand-logo { display: block; max-height: 66px; max-width: 200px; object-fit: contain; }
.brand-mark { width: 44px; height: 44px; border-radius: 8px; background: var(--brand-700); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.brand-text strong { display: block; color: var(--ink); font-size: 15px; }
.brand-text span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; letter-spacing: .02em; }
.sidebar-cta { padding: 16px 14px 4px; }
.nav { padding: 10px 10px 14px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.65); padding: 16px 12px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 6px; color: rgba(255,255,255,.95); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.nav a.active { background: #fff; color: var(--brand-800); box-shadow: inset 4px 0 0 var(--highlight); }
.nav .count { margin-left: auto; background: var(--highlight); color: #fff; font-size: 11.5px; font-weight: 700; padding: 0 8px; border-radius: 10px; }
.me { border-top: 1px solid rgba(255,255,255,.18); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--brand-800); display: grid; place-items: center; font-size: 12.5px; font-weight: 800; flex: none; }
.me-text { min-width: 0; flex: 1; }
.me-text a { color: #fff; font-weight: 700; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 12.5px; color: rgba(255,255,255,.75); }
.me form button { background: none; border: 0; color: rgba(255,255,255,.8); cursor: pointer; padding: 6px; border-radius: 6px; }
.me form button:hover { color: #fff; background: rgba(255,255,255,.14); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 26px 32px 40px; max-width: 1320px; width: 100%; flex: 1; min-width: 0; }
.site-foot { border-top: 4px solid var(--brand-700); background: var(--surface); color: var(--ink-2); font-size: 13px; padding: 14px 32px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.site-foot span { display: inline-flex; align-items: center; gap: 6px; }
.site-foot svg.icon { width: 15px; height: 15px; color: var(--brand-700); }

/* ---------------------------------------------------------------- banners (website hero style) */
.page-head, .eng-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-bottom: 22px; padding: 26px 30px; border-radius: 10px; color: #fff;
  background: linear-gradient(110deg, var(--brand-900) 0%, var(--brand-800) 45%, var(--brand-700) 100%);
  box-shadow: 0 6px 18px rgba(7, 75, 1, .18);
}
.page-head::before, .page-head::after, .eng-head::before, .eng-head::after {
  content: ""; position: absolute; top: -20px; z-index: -1; background: var(--stripe); transform: skewX(-38deg); }
.page-head::before, .eng-head::before { right: 70px; width: 120px; height: 74px; }
.page-head::after, .eng-head::after { right: 14px; width: 34px; height: 58px; }
.page-head h1, .eng-head h1 {
  color: #fff; font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
  font-size: 26px; border-left: 5px solid #fff; padding-left: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-head h1.file-name, .page-head h1.no-caps { text-transform: none; }
.page-head .sub, .eng-head .crumb { color: rgba(255,255,255,.88); margin-top: 8px; }
.eng-head { margin-bottom: 0; display: block; }
.eng-head .crumb { margin: 0 0 8px; font-size: 13.5px; }
.page-head a:not(.btn), .eng-head a:not(.btn) { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.5); }
.page-head .crumbs { color: rgba(255,255,255,.8); margin-bottom: 6px; }
.page-head .muted { color: rgba(255,255,255,.8); }
.page-head .btn:not(.primary) { background: #fff; border-color: #fff; color: var(--ink); }
.page-head .btn.primary { background: linear-gradient(90deg, var(--highlight) 0%, var(--navy-700) 100%); border: 0; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
.page-head.hero { padding: 44px 40px; min-height: 190px; background-size: cover; background-position: center right; }
.page-head.hero h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; border-left-width: 6px; padding-left: 18px; }
.page-head.hero .sub { font-size: 17px; max-width: 640px; margin-left: 24px; }
.page-head.hero::before { right: 110px; width: 180px; height: 110px; }
.page-head.hero::after { right: 30px; width: 54px; height: 86px; }

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-head h2 { border-left: 4px solid var(--brand-700); padding-left: 10px; }
.card-body { padding: 16px 18px; }
.card-body > :last-child { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.grid-2 > *, .grid-3 > *, .stats > * { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand-700); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .label { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; font-family: var(--display); color: var(--brand-800); }
.stat.warn { border-top-color: var(--highlight); }
.stat.warn .value { color: #c2410c; }
.stat.bad { border-top-color: var(--red); }
.stat.bad .value { color: var(--red); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--brand-800); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 2px solid var(--brand-100); background: var(--brand-50); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfa; }
.table .title-cell { font-weight: 600; }
.table .sub { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.file-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-name svg { color: var(--ink-3); }
.folder-name svg { color: var(--brand-700); }

/* ---------------------------------------------------------------- badges & progress */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; font-family: var(--font); text-transform: none; letter-spacing: 0; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.badge.navy { background: #e4e6f0; color: var(--navy); }
.badge svg.icon { width: 13px; height: 13px; vertical-align: 0; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 99px; background: var(--line-2); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--line-2); border-radius: 99px; }
progress::-webkit-progress-value { background: var(--brand-700); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--brand-700); border-radius: 99px; }
.progress-cell { min-width: 140px; }
.progress-cell small { display: block; margin-top: 3px; }
.expiry { white-space: nowrap; }

/* ---------------------------------------------------------------- buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 14px; line-height: 1; padding: 10px 15px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--brand-50); border-color: var(--brand-100); text-decoration: none; }
.btn.primary { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn.primary:hover { background: var(--brand-800); border-color: var(--brand-800); }
.btn.cta { background: linear-gradient(90deg, var(--highlight) 0%, var(--navy-700) 100%); border: 0; color: #fff; text-transform: uppercase; letter-spacing: .03em; padding: 13px 18px; box-shadow: 0 4px 10px rgba(0,0,0,.18); }
.btn.cta:hover { filter: brightness(1.08); }
.btn.success { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn.success:hover { background: var(--brand-800); }
.btn.danger { color: var(--red); border-color: #f1c4bf; }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--link); }
.btn.ghost:hover { background: var(--brand-50); }
.btn.sm { padding: 7px 11px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg.icon { width: 16px; height: 16px; vertical-align: 0; }
form.inline { display: inline; }
label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 5px; color: var(--ink); }
.field { margin-bottom: 14px; }
.field .hint { margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #cbd3cc; border-radius: 6px; padding: 8px 10px; min-height: 40px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid #8fd18a; outline-offset: 1px; border-color: var(--brand-700); }
select[multiple] { min-height: 120px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-bottom: 10px; }
.check input { margin-top: 4px; accent-color: var(--brand-700); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row .field { margin-bottom: 0; flex: 1; min-width: 160px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { max-width: 280px; }
.filters select { width: auto; }
.code-input { font-size: 22px !important; letter-spacing: .35em; text-align: center; font-family: var(--mono) !important; }
form p.hint, form + p.hint { margin-top: 8px; }
.dropzone { border: 2px dashed #b9cfb7; border-radius: var(--radius); padding: 18px; text-align: center; background: #f8fcf8; position: relative; transition: background .15s, border-color .15s; }
.dropzone.dragover { background: var(--brand-50); border-color: var(--brand-700); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .dz-title { font-weight: 700; color: var(--ink); }
.dropzone .dz-title svg { color: var(--brand-700); }
.dropzone .dz-files { margin-top: 6px; font-size: 13px; color: var(--brand-800); font-weight: 700; word-break: break-word; }

/* ---------------------------------------------------------------- tabs, crumbs, messages */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 14px 0 20px; overflow-x: auto; }
.tabs a { padding: 10px 15px; color: var(--ink-2); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--brand-800); text-decoration: none; }
.tabs a.active { color: var(--brand-800); border-bottom-color: var(--brand-700); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; margin-bottom: 14px; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.flashes { margin-bottom: 18px; display: grid; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 6px; border: 1px solid; font-weight: 600; }
.flash.success { background: var(--green-bg); border-color: #b5dcb9; color: #125a20; }
.flash.error { background: var(--red-bg); border-color: #f4c3bd; color: #8d1c13; }
.flash.info { background: var(--blue-bg); border-color: #c3d3f3; color: #1a4590; }
.notice { padding: 12px 14px; border-radius: 6px; background: var(--amber-bg); color: #6b4600; border: 1px solid #f1d9a6; margin-bottom: 16px; }
.notice.locked { background: var(--brand-50); color: var(--brand-900); border-color: var(--brand-100); display: flex; gap: 10px; align-items: flex-start; }
.notice.bad { background: var(--red-bg); color: #8d1c13; border-color: #f4c3bd; }
.empty { padding: 28px 18px; text-align: center; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; }

/* ---------------------------------------------------------------- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 18px; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.list li:last-child { border-bottom: 0; }
.list .main-col { min-width: 0; }
.list .main-col .sub { display: block; font-size: 12.5px; color: var(--ink-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.list .actions { flex-wrap: nowrap; gap: 4px; }
.list li > .actions form { display: inline; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 18px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--ink-3); font-size: 12px; }
.comment { padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.comment.internal { background: #fffbeb; }
.comment .who { font-weight: 700; }
.comment .body { white-space: pre-wrap; margin-top: 4px; }
details.panel { border-top: 1px solid var(--line-2); }
details.panel > summary { cursor: pointer; padding: 12px 18px; font-weight: 700; color: var(--link); list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::before { content: "+ "; }
details.panel[open] > summary::before { content: "− "; }
details.panel > .card-body { padding-top: 0; }
.pager { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; }
.secret-box { font-family: var(--mono); font-size: 20px; letter-spacing: .08em; padding: 14px; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 6px; text-align: center; user-select: all; word-break: break-all; }
.link-box { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.link-box .secret-box { flex: 1; font-size: 14px; letter-spacing: 0; text-align: left; min-width: 0; }
.link-box + .actions { margin-top: 10px; }
.qr { display: block; margin: 0 auto 12px; width: 200px; height: 200px; }
.folder-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.folder-tile { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand-700); border-radius: var(--radius); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.folder-tile:hover { border-color: var(--brand-700); text-decoration: none; background: var(--brand-50); }
.folder-tile svg { width: 28px; height: 28px; color: var(--brand-700); }
.folder-tile .meta { font-size: 12.5px; color: var(--ink-3); }
.folder-tile .name { font-weight: 700; }
.steps { margin: 0 0 12px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- sign-in & upload-link pages */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-header { background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 6vw; box-shadow: 0 2px 6px rgba(0,0,0,.06); position: relative; z-index: 2; }
.auth-header .auth-logo { max-height: 72px; max-width: 220px; display: block; }
.auth-header .tag { font-weight: 700; color: var(--brand-800); font-size: 15px; }
.auth-hero { flex: 1; position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 440px); gap: 48px; align-items: center; padding: 56px 6vw;
  background: linear-gradient(115deg, var(--brand-900) 0%, var(--brand-800) 40%, var(--brand-700) 100%); background-size: cover; background-position: center; }
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; top: -30px; z-index: -1; background: var(--stripe); transform: skewX(-38deg); }
.auth-hero::before { right: 150px; width: 210px; height: 150px; }
.auth-hero::after { right: 50px; width: 70px; height: 110px; }
.hero-title { font-family: var(--display); color: #fff; text-transform: uppercase; font-weight: 800; font-size: clamp(30px, 3.8vw, 50px); line-height: 1.06; border-left: 6px solid #fff; padding-left: 20px; margin: 0 0 20px; }
.hero-text { color: rgba(255,255,255,.92); font-size: 18px; max-width: 540px; margin-left: 26px; }
.auth-card { width: 100%; background: #fff; border-radius: 12px; padding: 30px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.28); border-top: 5px solid var(--highlight); }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .lead { color: var(--ink-2); margin-bottom: 20px; }
.auth-card .card { box-shadow: none; }
.auth-card .btn.primary.block { padding: 13px; font-size: 15px; text-transform: uppercase; letter-spacing: .03em; background: linear-gradient(90deg, var(--highlight) 0%, var(--navy-700) 100%); border: 0; }
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-foot svg { width: 14px; height: 14px; vertical-align: -2px; }
.auth-bottom { background: var(--brand-900); color: rgba(255,255,255,.85); font-size: 13px; padding: 14px 6vw; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; }
.auth-bottom a { color: #fff; }
.public-wrap { max-width: 620px; }

/* ---------------------------------------------------------------- branding admin */
.brand-preview { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.brand-preview img { max-height: 72px; max-width: 220px; }
.swatch { width: 44px; height: 40px; border-radius: 8px; border: 1px solid var(--line); display: inline-block; vertical-align: middle; flex: none; }
.swatch.primary { background: var(--brand-700); }
.swatch.secondary { background: var(--navy); }
.swatch.highlight { background: var(--highlight); }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=text] { max-width: 130px; font-family: var(--mono); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .site-top .hide-sm-top { display: none; }
  .site-top .item { padding: 10px 12px; font-size: 13px; }
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 30; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; padding: 8px 16px; position: sticky; top: 0; z-index: 10; border-bottom: 4px solid var(--brand-700); }
  .topbar img { max-height: 44px; }
  .topbar button { background: var(--brand-700); border: 0; color: #fff; padding: 8px; border-radius: 6px; cursor: pointer; }
  .content { padding: 16px 16px 32px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .table th, .table td { padding: 9px 10px; }
  .table .title-cell { min-width: 150px; }
  .progress-cell { min-width: 110px; }
  .hide-sm { display: none; }
  .page-head, .eng-head { padding: 20px 18px; }
  .page-head h1, .eng-head h1 { font-size: 20px; }
  .page-head.hero { padding: 28px 20px; min-height: 0; }
  .page-head.hero .sub { margin-left: 0; font-size: 15px; }
  .site-foot { padding: 12px 16px; }
  .auth-header { padding: 10px 16px; }
  .auth-header .tag { display: none; }
  .auth-hero { grid-template-columns: 1fr; padding: 28px 16px 36px; gap: 24px; }
  .hero-text { margin-left: 0; font-size: 16px; }
}
@media print {
  .sidebar, .topbar, .site-top, .site-foot, .actions, .tabs, form, .no-print { display: none !important; }
  .shell { display: block; background: none; }
  .page-head, .eng-head { background: none; color: var(--ink); box-shadow: none; padding: 0; }
  .page-head h1, .eng-head h1 { color: var(--ink); }
  .card { box-shadow: none; }
}
.hero-preview { display: block; width: 100%; max-height: 140px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }

/* Second-level header inside an engagement or department: lighter, so only one green banner per page */
.eng-head ~ .page-head { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--brand-700); box-shadow: var(--shadow); padding: 18px 22px; }
.eng-head ~ .page-head::before, .eng-head ~ .page-head::after { display: none; }
.eng-head ~ .page-head h1 { color: var(--ink); border-left-color: var(--brand-700); font-size: 21px; }
.eng-head ~ .page-head .sub, .eng-head ~ .page-head .muted { color: var(--ink-2); }
.eng-head ~ .page-head a:not(.btn) { color: var(--link); text-decoration: none; }
.eng-head ~ .page-head .btn:not(.primary) { border-color: var(--line); }
.page-head > .actions { align-self: flex-end; }

/* Phones: stacked table rows, no stripes over text, simpler green bar */
@media (max-width: 860px) {
  .site-top .item::before { display: none; }
  .site-top .inner { padding: 0 4px; }
  .page-head::before, .page-head::after, .eng-head::before, .eng-head::after { display: none; }
  .page-head.hero { border-right: 10px solid var(--stripe); }
  .auth-hero::before { right: 40px; width: 60px; height: 50px; }
  .auth-hero::after { right: 6px; width: 22px; height: 40px; }
  .hero-title { font-size: 28px; padding-left: 14px; border-left-width: 5px; }
  .table.stack-sm thead { display: none; }
  .table.stack-sm tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .table.stack-sm tr:last-child { border-bottom: 0; }
  .table.stack-sm td { display: block; padding: 0; border: 0; min-width: 0; }
  .table.stack-sm td.title-cell { flex: 1 1 100%; min-width: 0; }
  .table.stack-sm td.right { margin-left: auto; }
  .table.stack-sm .progress-cell { min-width: 160px; }
}
.spacer { height: 20px; }
.spacer-top { margin-top: 18px; }
.secret-box.cmd{font-size:13px;letter-spacing:0;text-align:left;word-break:break-all;line-height:1.5;padding:12px 14px}
.card-body h3{margin:0 0 6px;font-size:16px}
.server-check { margin-top: 18px; font-size: 13px; }
.server-check summary, .server-check-card summary { cursor: pointer; }
.server-check summary { color: var(--muted, #667085); }
.server-check-card summary { list-style: none; }
.server-check-card summary::-webkit-details-marker { display: none; }
.checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks li.ok .icon { color: var(--brand, #0d8902); }
.checks li.bad .icon { color: #c2410c; }
.checks .sub { display: block; color: var(--muted, #667085); font-size: 12px; }
.server-check-card .checks { margin: 0; }
