/* DireCoop — visual system modelled on docs/dashboard-coop.jpg */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url("../fonts/inter-400.73aaa95eab31.woff2") format('woff2'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url("../fonts/inter-600.0bf7eadca131.woff2") format('woff2'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.2a4c97ec45ef.woff2") format('woff2'); }
@font-face { font-family: 'Noto Sans Ethiopic'; font-weight: 400; font-display: swap; src: url("../fonts/ethiopic-400.2146c059c63a.woff2") format('woff2'); }
@font-face { font-family: 'Noto Sans Ethiopic'; font-weight: 700; font-display: swap; src: url("../fonts/ethiopic-700.511620d4e10e.woff2") format('woff2'); }

:root {
  --navy-900: #110048;
  --navy-800: #1a0a6e;
  --navy-700: #210093;
  --navy-600: #3524b3;
  --green: #11a348;
  --green-600: #0a7a33;   /* text on light green: 4.9:1 */
  --green-700: #0d7f36;   /* fills behind white text: 5.0:1 */
  --green-50: #eaf7ee;
  --blue: #1e6fe0;
  --blue-50: #e9f1fe;
  --link: #1a5fc4;        /* text/links on page and tinted backgrounds: ≥ 5.3:1 */
  --orange: #eb7a27;
  --amber: #f4b400;
  --purple: #7b3fd6;
  --purple-50: #f2ebfd;
  --teal: #0f9aa1;
  --red: #d93b3b;
  --bg: #eef3f9;
  --card: #ffffff;
  --text: #13213a;
  --muted: #5b6b85;
  --line: #e1e8f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 38, 77, .06), 0 4px 14px rgba(16, 38, 77, .06);
  --sidebar: 272px;
  --header: 84px;
  font-family: Inter, 'Noto Sans Ethiopic', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
html[lang="am"] { --font-local: 'Noto Sans Ethiopic'; }
html[lang="am"] body { font-family: 'Noto Sans Ethiopic', Inter, system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.ico { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Header ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--header);
  display: flex; align-items: stretch; color: #fff;
  background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-700) 45%, #2c1aa6 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.brand { min-width: var(--sidebar); flex: none; padding-right: 24px !important; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-right: 1px solid rgba(255,255,255,.14); color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { width: 62px; height: 60px; object-fit: contain; }
.brand .t1 { font-weight: 700; font-size: 16px; line-height: 1.25; white-space: nowrap; }
.brand .t2 { font-weight: 600; font-size: 15px; opacity: .95; white-space: nowrap; }
.system { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 24px; position: relative; overflow: hidden; }
.system .banner { position: absolute; inset: 0 0 0 auto; width: 62%; background: url("../img/header-banner.2610b62edb8d.jpg") right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); }
.system .name { position: relative; }
.system .name b { display: block; font-size: 34px; letter-spacing: .5px; font-weight: 700; line-height: 1; }
.system .name span { display: block; font-size: 15px; margin-top: 4px; opacity: .95; }
.top-actions { display: flex; align-items: center; gap: 6px; padding: 0 16px; background: rgba(6, 40, 30, .55); }
.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

.dd { position: relative; }
.dd > button, .dd > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #fff;
  background: transparent; border: 0; padding: 8px 10px; border-radius: 10px; font: inherit; font-weight: 600; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:hover { background: rgba(255,255,255,.1); }
.lang > summary { border: 2px solid var(--green); padding: 7px 12px; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; color: var(--text); border-radius: 10px; min-width: 190px;
  box-shadow: 0 10px 30px rgba(17,0,72,.25); padding: 6px; z-index: 60; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; color: var(--text);
  background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--bg); text-decoration: none; }
.dd-menu button.on { font-weight: 700; background: var(--green-50); }
.dd-menu .head { padding: 8px 10px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.flag { width: 22px; height: 15px; border-radius: 2px; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.bell { position: relative; }
.bell .badge { position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.notif-menu { width: 320px; }
.notif-menu a { align-items: flex-start; }
.notif-menu .unread { font-weight: 600; }
.user-menu .who { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Layout ─────────────────────────────────────────────── */
.shell { display: flex; min-height: calc(100vh - var(--header)); }
.sidebar { width: var(--sidebar); flex: none; background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #dbe6f7; display: flex; flex-direction: column; position: sticky; top: var(--header); height: calc(100vh - var(--header)); }
.nav { flex: 1; overflow-y: auto; padding: 12px 0; scrollbar-width: thin; }
.nav details > summary { list-style: none; }
.nav details > summary::-webkit-details-marker { display: none; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 20px; color: #e3ebf8; font-size: 14.5px; white-space: nowrap; font-weight: 500;
  cursor: pointer; border-radius: 0 10px 10px 0; margin-right: 10px; }
.nav-item:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav-item .chev { margin-left: auto; opacity: .75; transition: transform .15s; }
.nav details[open] > summary .chev { transform: rotate(180deg); }
.nav-item.active { background: var(--green-700); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(34,164,71,.35); }
.nav-sub { padding: 2px 0 6px 58px; display: grid; gap: 1px; }
.nav-sub a { color: #b9c9e3; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; margin-right: 10px; }
.nav-sub a:hover, .nav-sub a.on { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.side-art { height: 200px; flex: none; position: relative; background: url("../img/sidebar-art.c81af3e39e19.jpg") center bottom / cover no-repeat; }
.side-art::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--navy-900) 0%, transparent 35%, rgba(17,0,72,.15) 60%, rgba(17,0,72,.9) 100%); }
.side-art div { position: absolute; left: 22px; bottom: 16px; color: #fff; }
.side-art b { font-size: 20px; font-weight: 600; display: block; }
.side-art span { font-size: 13.5px; opacity: .95; }

.main { flex: 1; min-width: 0; padding: 20px 22px 32px; }
.page-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .pico { color: var(--blue); }
.page-head h1 { font-size: 26px; font-weight: 700; color: var(--navy-900); }
.page-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.page-head .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; box-shadow: var(--shadow); font-size: 14px; }

/* ── KPI cards ──────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { border-radius: var(--radius); color: #fff; padding: 16px 16px 14px; display: flex; gap: 14px; align-items: center; min-height: 96px;
  box-shadow: var(--shadow); position: relative; overflow: hidden; text-decoration: none !important; }
.kpi::after { content: ''; position: absolute; right: -30px; bottom: -50px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.1); }
.kpi .ico { width: 44px; height: 44px; opacity: .95; }
.kpi .lbl { font-size: 14px; font-weight: 600; line-height: 1.15; }
.kpi .lbl small { display: block; font-weight: 500; opacity: .9; font-size: 12.5px; }
.kpi .val { font-size: 30px; font-weight: 700; line-height: 1.1; margin-top: 4px; white-space: nowrap; }
.kpi .delta { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; opacity: .95; }
.kpi .body { min-width: 0; flex: 1; text-align: right; position: relative; z-index: 1; }
.kpi.blue { background: linear-gradient(135deg, #1d6fe0, #0f4fb3); }
.kpi.green { background: linear-gradient(135deg, #27ae4f, #138a36); }
.kpi.orange { background: linear-gradient(135deg, #f7931e, #e8650f); }
.kpi.purple { background: linear-gradient(135deg, #8a4be0, #6a2fc4); }
.kpi.teal { background: linear-gradient(135deg, #16a5a8, #0d7f89); }

/* ── Cards / panels ─────────────────────────────────────── */
.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.row2 { grid-template-columns: 1.25fr 1.2fr .78fr; }
.grid.row3 { grid-template-columns: 1fr 1.2fr 1.07fr; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 16px 18px; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h2 { font-size: 18px; font-weight: 700; color: var(--navy-900); }
.card-h .ico { color: var(--navy-600); }
.card-h .more { margin-left: auto; font-size: 13.5px; font-weight: 600; }

/* Sector donut */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { position: relative; width: 190px; height: 190px; flex: none; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut .center b { font-size: 26px; color: var(--navy-900); }
.donut .center span { max-width: 112px; margin: 0 auto; font-size: 12.5px; line-height: 1.2; }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; gap: 8px; font-size: 13px; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend .sw { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.legend .n { margin-left: auto; font-weight: 700; padding-left: 8px; }
.legend a { color: var(--text); }

/* Zone map */
.map-wrap { display: flex; gap: 10px; align-items: flex-start; }
.map-wrap svg { flex: 1; min-width: 0; max-height: 320px; overflow: visible; }
.zone path { stroke: #fff; stroke-width: 1.4; cursor: pointer; transition: filter .15s; }
.zone:hover path { filter: brightness(.92) saturate(1.2); }
.zone text { font-size: 17px; font-weight: 700; fill: #10331b; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.75); stroke-width: 3.5px; }
.zone text.n { font-weight: 600; font-size: 15px; }
.zone.dark text { fill: #fff; stroke: rgba(0,60,10,.45); }
.zone circle { stroke: #2f7d3a; stroke-width: 2; }
.zone.marker text { text-anchor: start; }
.zone.out path { opacity: .35; }
.map-legend { font-size: 12.5px; flex: none; }
.map-legend b { display: block; margin-bottom: 8px; font-size: 12.5px; }
.map-legend div { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.map-legend i { width: 18px; height: 16px; border-radius: 3px; display: inline-block; }
.map-note { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* Quick actions */
.qa { display: grid; gap: 10px; }
.qa a { display: flex; align-items: center; gap: 12px; border: 1px solid #cbd8ea; border-radius: 9px; padding: 9px 14px; color: var(--text);
  background: linear-gradient(#fff, #f7faff); font-weight: 500; }
.qa a:hover { border-color: var(--blue); text-decoration: none; background: var(--blue-50); }
.qa .ico { color: var(--blue); }
.qa a:first-child .ico { color: var(--green); }

/* KPI bars */
.bars { display: grid; gap: 4px; }
.bar-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-row .top { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.bar-row .top b { margin-left: auto; font-size: 15px; }
.track { height: 10px; border-radius: 6px; background: #e8edf4; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 6px; }
.track .green { background: linear-gradient(90deg, #2bb655, #1a9a40); }
.track .blue { background: linear-gradient(90deg, #2f80ed, #1660d0); }
.track .amber { background: linear-gradient(90deg, #f6c445, #f0a800); }
.track .purple { background: linear-gradient(90deg, #9a5cf0, #7330d4); }

/* Finance */
.fin-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.fin-tile { border-radius: 9px; padding: 9px 12px; color: #fff; }
.fin-tile span { font-size: 13px; display: block; opacity: .95; }
.fin-tile b { font-size: 16px; white-space: nowrap; }
.fin-tile { min-width: 0; overflow: hidden; }
.fin-tile.green { background: linear-gradient(135deg, #27ae4f, #148a37); }
.fin-tile.blue { background: linear-gradient(135deg, #2179e8, #1158c4); }
.fin-tile.purple { background: linear-gradient(135deg, #8a4be0, #6a2fc4); }
.chart-h { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: 14px; margin-bottom: 4px; flex-wrap: wrap; }
.chart-h .lg { margin-left: auto; display: flex; gap: 14px; font-weight: 500; font-size: 13px; }
.chart-h .lg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.chart-box { position: relative; height: 170px; }

/* Activities */
.acts { list-style: none; margin: 0; padding: 0; }
.acts li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.acts li:last-child { border-bottom: 0; }
.acts .ai { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; }
.acts .ai.green { background: var(--green); }
.acts .ai.blue { background: var(--blue-50); color: var(--link); }
.acts .ai.purple { background: var(--purple-50); color: var(--purple); }
.acts .ai.orange { background: #fff1e4; color: var(--orange); }
.acts .t { font-weight: 500; }
.acts .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* ── Tables, filters, forms ─────────────────────────────── */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.input, select.input, textarea.input { font: inherit; color: var(--text); border: 1px solid #c9d5e6; border-radius: 9px; padding: 9px 11px; background: #fff;
  width: 100%; min-width: 0; }
.input:focus { outline: 2px solid rgba(30,111,224,.25); border-color: var(--blue); }
.toolbar .input { width: auto; min-width: 150px; }
.toolbar .search { min-width: 240px; flex: 1; max-width: 360px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; border-radius: 9px; padding: 9px 15px; border: 1px solid transparent;
  cursor: pointer; background: var(--blue); color: #fff; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn.green { background: var(--green-700); }
.btn.ghost { background: #fff; color: var(--text); border-color: #c9d5e6; }
.btn.danger { background: var(--red); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-weight: 600; color: var(--muted); background: #f6f9fd; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover { background: #f8fbff; }
.t .num, .t th.num { text-align: right; }
.t tfoot td { font-weight: 700; background: #f6f9fd; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.tag.green, .tag.active, .tag.valid, .tag.approved, .tag.resolved { background: var(--green-50); color: var(--green-600); }
.tag.blue, .tag.submitted, .tag.in_progress, .tag.open { background: var(--blue-50); color: var(--link); }
.tag.orange, .tag.pending, .tag.under_review, .tag.returned, .tag.high { background: #fff1e4; color: #a34f08; }
.tag.red, .tag.suspended, .tag.rejected, .tag.expired, .tag.revoked, .tag.dissolved, .tag.urgent, .tag.withdrawn, .tag.deceased { background: #fdeaea; color: #b42727; }
.tag.purple { background: var(--purple-50); color: var(--purple); }
.pager { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager .pg { display: flex; gap: 6px; }

.form-card { max-width: 980px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13.5px; }
.field .help { font-size: 12px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--red); }
.field.has-err .input { border-color: var(--red); }
.field ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.field.check { flex-direction: row; align-items: center; gap: 10px; }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.alert.success { background: var(--green-50); border-color: #bfe6cb; color: #145f2b; }
.alert.error { background: #fdeaea; border-color: #f4c2c2; color: #8c1d1d; }
.alert.info, .alert.warning { background: #fff7e6; border-color: #f6dca3; color: #7a5200; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy-900); border-color: var(--green); }
.tabs a:hover { text-decoration: none; color: var(--text); }
dl.facts { display: grid; grid-template-columns: 180px 1fr; gap: 9px 14px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 500; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat span { color: var(--muted); font-size: 13px; display: block; }
.stat b { font-size: 22px; color: var(--navy-900); }

/* Login */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-hero { background: linear-gradient(160deg, rgba(17,0,72,.92), rgba(33,0,147,.78)), url("../img/header-banner.2610b62edb8d.jpg") center / cover; color: #fff;
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-hero img { width: 92px; }
.login-hero h1 { font-size: 44px; margin: 22px 0 8px; }
.login-hero p { font-size: 18px; opacity: .92; max-width: 460px; }
.login-box { display: grid; place-items: center; padding: 32px 16px; }
.login-box .card { width: 100%; max-width: 400px; padding: 28px; }
.login-box h2 { font-size: 22px; margin-bottom: 4px; }
.login-langs { display: flex; gap: 6px; margin-bottom: 18px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1400px) {
  .grid.row2 { grid-template-columns: 1fr 1fr; }
  .grid.row2 > .quick { grid-column: 1 / -1; }
  .grid.row2 .qa { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .grid.row3 { grid-template-columns: 1fr 1fr; }
  .grid.row3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .system .name b { font-size: 26px; }
  .system .banner { width: 50%; }
}
@media (max-width: 960px) {
  :root { --header: 64px; }
  .menu-toggle { display: block; }
  .brand { width: auto; border: 0; padding: 0 8px; }
  .brand img { width: 44px; height: 42px; }
  .brand .txt { display: none; }
  .system { padding: 0 8px; }
  .system .name span, .system .banner { display: none; }
  .system .name b { font-size: 22px; }
  .top-actions { padding: 0 6px; background: transparent; gap: 2px; }
  .user-menu .who { display: none; }
  .sidebar { position: fixed; left: 0; top: var(--header); z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 10px 0 30px rgba(0,0,0,.3); }
  .main { padding: 16px; }
  .grid.row2, .grid.row3, .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { padding: 28px; }
  .login-hero h1 { font-size: 30px; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .val { font-size: 24px; }
  .kpi .ico { width: 32px; height: 32px; }
  .donut-wrap, .map-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .fin-tiles { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 22px; }
  dl.facts { grid-template-columns: 1fr; }
  .toolbar .search { min-width: 0; max-width: none; }
  .notif-menu { width: 280px; right: -60px; }
}
@media print {
  .topbar, .sidebar, .toolbar, .form-actions, .pager { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
}

/* ── Security / auth pages ─────────────────────────────────────────────── */
.stack { display: grid; gap: 14px; }
.small { font-size: 13px; }
.lead { margin: 0 0 18px; }
.login-tag { font-size: 14px; opacity: .8; }
.btn.block { width: 100%; justify-content: center; }
.tag.ok { background: var(--green-50); color: var(--green-600); }
.tag.warn { background: #fff1e4; color: #a34f08; }
.qr { display: flex; justify-content: center; padding: 8px; }
.qr svg { width: 220px; height: 220px; max-width: 100%; }
code.key { display: inline-block; margin-top: 6px; font-size: 15px; letter-spacing: 1px; background: var(--bg); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
ol.codes { columns: 2; font-size: 17px; line-height: 2; padding-left: 26px; }
.req { color: var(--red); }
.plain-link { color: inherit; }
.plain-link.b { font-weight: 600; }
.pre-wrap { white-space: pre-wrap; }
.card-h.pad { padding: 14px 16px 0; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.tag.pending { background: #fff1e4; color: #a34f08; }
.tag.posted { background: var(--green-50); color: var(--green-600); }

/* ── Mobile & touch (B1) ───────────────────────────────────────────────── */
.nav-backdrop { display: none; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas { max-width: 100%; }
@media (max-width: 960px) {
  .nav-backdrop { position: fixed; inset: var(--header) 0 0 0; background: rgba(5, 18, 40, .45); z-index: 45; }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .sidebar { height: calc(100vh - var(--header)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .menu-toggle { min-width: 44px; min-height: 44px; }
}
@media (max-width: 640px) {
  .main { padding: 12px 16px 28px; }
  /* 16px inputs stop iOS from zooming in; 44px is the minimum comfortable touch target */
  .input, select.input, textarea.input { font-size: 16px; min-height: 44px; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .nav-item, .nav-sub a { min-height: 44px; display: flex; align-items: center; }
  .toolbar, .toolbar form { flex-direction: column; align-items: stretch; }
  .toolbar .input, .toolbar .search, .toolbar .btn { width: 100%; max-width: none; min-width: 0; }
  .page-head { gap: 10px; }
  .page-head .spacer { display: none; }
  .page-head > .btn, .page-head > a.btn { width: 100%; justify-content: center; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; justify-content: center; }
  .card { padding: 14px; }
  .dd-menu { max-width: calc(100vw - 16px); }
  .notif-menu { position: fixed; left: 8px; right: 8px; top: var(--header); width: auto; }
  ol.codes { columns: 1; }

  /* Tables become stacked cards: each cell shows its column name (data-label added by app.js) */
  table.t.stack-sm thead { display: none; }
  table.t.stack-sm, table.t.stack-sm tbody, table.t.stack-sm tr, table.t.stack-sm td { display: block; width: 100%; }
  table.t.stack-sm tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.t.stack-sm tr:last-child { border-bottom: 0; }
  table.t.stack-sm td { border: 0; padding: 4px 14px; display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 10px; text-align: left !important; }
  table.t.stack-sm td::before { content: attr(data-label); color: var(--muted); font-weight: 600; font-size: 12.5px; }
  table.t.stack-sm td:not([data-label])::before, table.t.stack-sm td[data-label=""]::before { content: none; }
  table.t.stack-sm td:not([data-label]), table.t.stack-sm td[data-label=""] { grid-template-columns: 1fr; }
  table.t.stack-sm td.empty { display: block; text-align: center !important; }
  table.t.stack-sm tfoot td { background: #f6f9fd; }
  .table-wrap { overflow-x: visible; }
}

/* ── PWA install banner ────────────────────────────────────────────────── */
.install-banner { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--green-600); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(11,36,71,.06); }
.install-banner[hidden] { display: none; }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.install-banner .txt span { color: var(--muted); }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--muted); cursor: pointer; min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--bg); }
@media (max-width: 640px) { .install-banner { flex-wrap: wrap; } .install-banner .txt { flex-basis: calc(100% - 110px); } .install-banner [data-install-go] { order: 3; width: 100%; } }
@media (display-mode: standalone) { .install-banner { display: none !important; } }

/* ── Field capture / sync ──────────────────────────────────────────────── */
.sync-panel { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sync-state { display: flex; align-items: center; gap: 8px; }
.sync-count { flex: 1; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa7b8; display: inline-block; }
.dot.on { background: var(--green-600); box-shadow: 0 0 0 3px var(--green-50); }
.dot.off { background: #d9822b; box-shadow: 0 0 0 3px #fff1e4; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.tab { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 44px; }
.tab.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.badge-inline { background: var(--green-600); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 12px; }
.sync-badge { position: relative; color: #ffd28a; display: inline-flex; align-items: center; padding: 8px; }
.sync-badge[hidden] { display: none; }
.sync-badge .badge { position: absolute; top: 2px; right: 0; background: #d9822b; color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 5px; min-width: 18px; text-align: center; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
p.pad { padding: 0 16px 14px; }

/* Header on small screens: brand must not keep the desktop sidebar width */
@media (max-width: 960px) {
  .brand { min-width: 0; padding: 0 6px !important; }
}
@media (max-width: 480px) {
  .system { padding: 0 4px; }
  .system .name b { font-size: 17px; letter-spacing: 0; }
  .top-actions { padding: 0 4px 0 0; gap: 0; }
  .top-actions .chev { display: none; }
  .dd > summary { padding: 6px; }
  .lang > summary { padding: 4px 8px; }
  .brand img { width: 38px; height: 36px; }
  .menu-toggle { padding: 4px; }
}
.install-banner [data-install-go] { justify-content: center; }
.center { text-align: center; }

/* ── Finance: sub-navigation, printable documents ──────────────────────── */
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.subnav a { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--navy-900); }
.stat b.bad { color: var(--red); } .stat b.good { color: var(--green-600); }
.input.num { text-align: right; }
.print-doc { background: #eef2f7; }
.doc { max-width: 760px; margin: 24px auto; background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 20px rgba(11,36,71,.08); }
.doc-head { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--navy-900); padding-bottom: 14px; margin-bottom: 18px; }
.doc-title { margin-left: auto; text-align: right; font-size: 15px; }
.doc .big { font-size: 22px; }
.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0 16px; }
.signs > div { border-top: 1px solid var(--text); padding-top: 6px; font-size: 13px; color: var(--muted); }
.cert { text-align: center; border: 6px double var(--navy-900); }
.cert h1 { font-size: 34px; margin: 8px 0; color: var(--navy-900); letter-spacing: 1px; }
.cert .lead { font-size: 18px; line-height: 1.7; }
.licence-cert .signs { grid-template-columns: repeat(2, 1fr); margin: 0; flex: 1; }
.cert-foot { display: flex; gap: 24px; align-items: flex-end; margin-top: 36px; text-align: left; }
.cert-qr { margin: 0; text-align: center; font-size: 11px; color: var(--muted); max-width: 200px; }
.cert-qr svg { display: block; margin: 0 auto 4px; width: 132px; height: 132px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.verify-page h1 { font-size: 22px; margin: 14px 0; }
.verify-page .toolbar { margin-top: 20px; }
@media (max-width: 640px) { .cert-foot { flex-direction: column; align-items: center; } dl.facts { grid-template-columns: 1fr; gap: 2px; } dl.facts dd { margin-bottom: 8px; } }
.radio-list label, div.radio-list > div > label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 6px 0; }
.notice-banner { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.notice-banner form { margin: 0; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line, #dfe5ee); }
.timeline li { position: relative; padding: 0 0 12px 6px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy-900); }
@media print { .noprint, .install-banner { display: none !important; } .print-doc { background: #fff; } .doc { box-shadow: none; margin: 0; max-width: none; } .subnav { display: none; } }
@media (max-width: 640px) { .doc { margin: 0; padding: 18px; border-radius: 0; } .signs { grid-template-columns: 1fr; gap: 28px; } }
.record-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rec-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy-900); background: #fff; }
.rec-card:hover { border-color: var(--blue); text-decoration: none; }
.rec-card span { flex: 1; font-weight: 600; font-size: 14px; }
.rec-card b { font-size: 18px; color: var(--link); }
.self-page .toolbar h1 { margin: 0; }
.self-page .toolbar form { display: inline; }

/* ── E11 member ID cards (CR80, 85.6 × 54 mm, 10 per A4) ─────────────────── */
.cards-bar { max-width: 760px; }
.cards-bar h1 { margin: 0 0 6px; }
.cards-bar .form-actions form { display: inline; }
.idcards { display: grid; grid-template-columns: repeat(2, 85.6mm); justify-content: center; gap: 0; margin: 0 auto 24px; }
.idcard { width: 85.6mm; height: 54mm; box-sizing: border-box; padding: 2.6mm 3mm; background: #fff; color: #150058;
  border: 1px dashed #9aa5b5; display: flex; flex-direction: column; overflow: hidden; break-inside: avoid; page-break-inside: avoid;
  font-size: 6.6pt; line-height: 1.25; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.idc-head { display: flex; gap: 2mm; align-items: center; border-bottom: .5mm solid #150058; padding-bottom: 1.2mm; font-size: 6pt; }
.idc-head b { font-size: 6.8pt; }
.idc-title { background: #150058; color: #fff; text-align: center; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-size: 6.4pt; padding: .7mm 0; margin: 1.2mm 0 1.2mm; }
.idc-body { display: flex; gap: 2mm; flex: 1; min-height: 0; }
.idc-body dl { margin: 0; flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 1.6mm; row-gap: .4mm; align-content: start; }
.idc-body dt { color: #5b6b82; }
.idc-body dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idc-body .idc-name { font-weight: 700; font-size: 7.6pt; white-space: normal; }
.idc-qr { width: 22mm; text-align: center; font-size: 5.4pt; color: #5b6b82; }
.idc-qr svg { width: 22mm; height: 22mm; display: block; }
.idc-foot { font-size: 5.6pt; color: #5b6b82; border-top: .3mm solid #d7dde6; padding-top: .8mm; }
@media print { @page { size: A4; margin: 10mm; } .cards-doc .idcards { margin: 0; } }
@media (max-width: 640px) { .idcards { grid-template-columns: 85.6mm; } }

/* ── E11 GPS maps ──────────────────────────────────────────────────────────── */
.geo-map { position: relative; }
.geo-map svg { width: 100%; height: auto; display: block; }
.geo-map .zo { fill: #eef2f7; stroke: #9aa5b5; stroke-width: .8; }
.geo-map .zo.hl { fill: #dbe7fb; stroke: #1f6feb; stroke-width: 1.4; }
.geo-map .pin { stroke: #fff; stroke-width: .6; }
.geo-map a:focus-visible .pin, .geo-map a:hover .pin { stroke: #150058; stroke-width: 1.2; }
.geo-map .me { fill: #d92d20; stroke: #fff; stroke-width: 1.5; }
.geo-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin-top: 10px; }
.geo-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.mini-map { max-width: 340px; }

/* ── In-app help (F2) ──────────────────────────────────────────────────── */
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.help-toc { position: sticky; top: 80px; font-size: 14px; }
.help-toc ul { list-style: none; margin: 0; padding: 0 0 0 10px; }
.help-toc > .toc > ul { padding: 0; }
.help-toc li { margin: 4px 0; }
.help-toc a { color: var(--ink, inherit); }
.prose { line-height: 1.6; max-width: 900px; }
.prose h1 { font-size: 24px; margin: 0 0 12px; }
.prose h2 { font-size: 20px; margin: 28px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 16px; margin: 20px 0 8px; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 10px 0 16px; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg, #f4f7fb); }
.prose pre { overflow-x: auto; background: var(--bg, #f4f7fb); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 13px; line-height: 1.35; }
.prose code { font-size: .92em; }
.prose blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid var(--blue); background: var(--blue-50, #eef4fd); }
.prose li { margin: 3px 0; }
.help-list { display: grid; gap: 14px; }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-toc { position: static; } }
@media print { .help-toc, .help-nav { display: none !important; } .help-layout { display: block; } .prose { max-width: none; } .prose h2 { break-after: avoid; } .prose table, .prose pre { display: table; overflow: visible; break-inside: avoid; } }

/* ── Accessibility (F3, WCAG 2.2 AA) ───────────────────────────────────── */
/* 1.4.1: links inside running text are underlined, not identified by colour alone */
p a:not(.btn), li a.inline, ol.steps a:not(.btn), .muted a:not(.btn), .map-note a, .alert a:not(.btn), .prose a, td small a, .help-text a { text-decoration: underline; text-underline-offset: 2px; }
/* 2.5.8: targets at least 24 × 24 px */
.map-note a { display: inline-block; min-height: 24px; padding: 3px 0; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 2px 8px 2px 0; accent-color: var(--green-700); vertical-align: middle; }
/* 2.4.7 / 2.4.13: clearly visible keyboard focus everywhere */
:focus-visible { outline: 3px solid #1a5fc4; outline-offset: 2px; }
.input:focus-visible { outline: 3px solid #1a5fc4; outline-offset: 0; }
/* 2.4.11: focused elements are not hidden under the sticky top bar */
html { scroll-padding-top: calc(var(--header) + 12px); }
/* 2.4.1: skip link */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: #fff; color: var(--link); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-weight: 600; }
.skip-link:focus { top: 8px; }
/* 2.3.3 / user preference: honour reduced motion */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Off-site storage settings: grouped fields */
.mt-8 { margin-top: 8px; }
fieldset { border: 1px solid var(--line, #d9dee7); border-radius: 10px; padding: 12px 16px 4px; margin-left: 0; margin-right: 0; min-width: 0; }
fieldset > legend { font-weight: 600; padding: 0 6px; }

/* Phase H — public portal */
body.portal { background: var(--bg); color: var(--text); margin: 0; }
.p-wrap { max-width: 1160px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.p-top { background: var(--navy-900); color: #fff; }
.p-top-row { display: flex; align-items: center; gap: 14px; padding-top: 12px; padding-bottom: 10px; flex-wrap: wrap; }
.p-brand { display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; margin-right: auto; min-width: 0; }
.p-brand b { display: block; font-size: 17px; }
.p-brand small { display: block; opacity: .85; font-size: 13px; }
.p-langs { display: flex; gap: 6px; flex-wrap: wrap; }
.p-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-menu-btn { display: none; align-items: center; gap: 6px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 8px 12px; min-height: 44px; font: inherit; font-weight: 600; cursor: pointer; }
.p-menu-btn:hover { background: rgba(255,255,255,.1); }
.p-menu-btn .ico { display: block; }
.p-ico-close { display: none; }
.p-top.open .p-ico-open { display: none; }
.p-top.open .p-ico-close { display: inline; }
.p-nav { display: flex; gap: 0; flex-wrap: wrap; padding-bottom: 8px; }
.p-nav a { color: #fff; padding: 8px 9px; border-radius: 8px; font-weight: 600; font-size: 14px; text-decoration: none; min-height: 24px; white-space: nowrap; }
.p-nav a:hover { background: rgba(255,255,255,.1); }
.p-nav a[aria-current] { background: var(--green-700); }
.p-main { padding-top: 22px; padding-bottom: 32px; min-height: 60vh; }
.p-main h1 { font-size: 26px; color: var(--navy-900); margin: 4px 0 10px; }
.p-hero { background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); color: #fff; border-radius: var(--radius); padding: 28px 24px; margin-bottom: 18px; }
.p-hero h1 { color: #fff; font-size: 30px; }
.p-hero .lead { color: #e8eef8; max-width: 720px; }
.p-search { display: flex; gap: 8px; margin-top: 16px; max-width: 720px; }
.p-search .input { flex: 1; min-width: 0; }
.p-figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.p-figures div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.p-figures b { display: block; font-size: 26px; color: var(--navy-900); }
.p-figures span { color: var(--muted); font-size: 14px; }
.p-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.p-tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.p-tile:hover { border-color: var(--green); text-decoration: none; }
.p-tile .ico { color: var(--green-700); }
.p-tile b { color: var(--navy-900); font-size: 16px; }
.p-tile span { color: var(--muted); font-size: 14px; }
.p-section { margin-bottom: 16px; }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.p-chips .chip { padding: 6px 10px; text-decoration: none; color: var(--text); min-height: 24px; }
.p-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.p-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.p-filters .form-actions { margin: 0; }
.p-check { display: flex; align-items: center; min-height: 40px; }
.p-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 14px; }
.p-coop h2 { font-size: 17px; margin: 0 0 4px; }
.p-coop p { margin: 4px 0; }
.p-foot { background: #fff; border-top: 1px solid var(--line); padding: 18px 0; }
.p-foot p { margin: 4px 0; }
.p-steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 8px; }
.p-steps li { counter-increment: s; padding-left: 36px; position: relative; }
.p-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--green-700); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.p-ref { font-family: ui-monospace, monospace; font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.p-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) {
  .p-figures { grid-template-columns: repeat(2, 1fr); }
  .p-hero { padding: 20px 16px; } .p-hero h1 { font-size: 24px; }
  .p-search { flex-direction: column; }
}
/* Below desktop width the header links fold into a Menu button (portal.js adds .p-js). */
@media (max-width: 1180px) {
  .p-top.p-js .p-menu-btn { display: inline-flex; }
  .p-top.p-js:not(.open) .p-tools, .p-top.p-js:not(.open) .p-nav { display: none; }
  .p-top.p-js .p-tools { flex-basis: 100%; justify-content: space-between; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }
  .p-top.p-js .p-nav { flex-direction: column; flex-wrap: nowrap; gap: 0; padding-bottom: 12px; }
  .p-top.p-js .p-nav a { padding: 12px; border-radius: 8px; min-height: 44px; box-sizing: border-box; display: flex; align-items: center; white-space: normal; }
  .p-top.p-js .p-nav a + a { margin-top: 2px; }
}
@media (max-width: 480px) {
  .p-brand b { font-size: 15px; } .p-brand small { font-size: 12px; }
  .p-brand img { width: 36px; height: auto; }
  .p-menu-btn span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .p-top.p-js .p-tools { flex-direction: column; align-items: stretch; }
  .p-top.p-js .p-langs .btn { flex: 1; justify-content: center; }
  .p-top.p-js .p-staff { justify-content: center; }
}
.portal h2.h3 { font-size: 18px; color: var(--navy-900); margin: 0 0 10px; }
.ussd-screen { background: #10233f; color: #e8f1ff; font: 15px/1.5 ui-monospace, monospace; padding: 14px 16px; border-radius: 10px; white-space: pre-wrap; max-width: 320px; margin: 12px 0; }
.p-trend { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.p-trend li { display: grid; grid-template-columns: 56px 1fr 72px; gap: 8px; align-items: center; font-size: 13.5px; }
.p-trend .bar { background: var(--line); border-radius: 4px; height: 14px; overflow: hidden; }
.p-trend .bar span { display: block; height: 100%; background: var(--green-700); }
.p-trend .val { text-align: right; font-variant-numeric: tabular-nums; }
.p-barcol { width: 22%; min-width: 80px; }
.p-hbar { display: block; background: var(--line); border-radius: 4px; height: 12px; overflow: hidden; }
.p-hbar span { display: block; height: 100%; background: var(--blue); }

/* Branding: seal and signature on printed certificates */
.signs.signed { padding-top: 96px; }
.signs.signed > .sign-box { position: relative; }
.sig-img { position: absolute; left: 0; bottom: calc(100% + 2px); max-height: 72px; max-width: 90%; object-fit: contain; mix-blend-mode: multiply; }
.seal-img { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); max-height: 118px; max-width: 118px; object-fit: contain; mix-blend-mode: multiply; opacity: .92; }
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.brand-img { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line, #e3e8ef); border-radius: 10px; padding: 14px; }
.brand-img .preview { height: 120px; display: flex; align-items: center; justify-content: center; border-radius: 8px;
  background: repeating-conic-gradient(#f1f4f8 0% 25%, #fff 0% 50%) 0 0 / 16px 16px; }
.brand-img .preview img { max-height: 108px; max-width: 100%; object-fit: contain; }
.brand-img .preview .muted { font-size: 13px; }
.brand-sec { margin: 22px 0 10px; font-size: 15px; color: var(--navy-900); border-bottom: 1px solid var(--line, #e3e8ef); padding-bottom: 6px; }
@media (max-width: 800px) { .brand-grid { grid-template-columns: 1fr; } }

/* Ethiopian calendar helper under date fields */
.ec-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; }
.ec-pick .ec-lab { color: var(--muted); }
.ec-pick .input { width: auto; min-width: 0; padding: 6px 8px; min-height: 36px; }
.ec-pick input.input { width: 6.5em; }

/* I2 risk watch-list */
.risk-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 28px; border-radius: 14px; font-weight: 700; font-size: 14px; padding: 0 8px; }
.risk-badge.high { background: #fdeaea; color: #b42727; }
.risk-badge.medium { background: #fff1e4; color: #a34f08; }
.risk-badge.low { background: var(--green-50); color: var(--green-600); }
.risk-stat { color: inherit; text-decoration: none; border-left: 4px solid transparent; }
.risk-stat.high { border-left-color: #b42727; } .risk-stat.medium { border-left-color: #d9730d; } .risk-stat.low { border-left-color: var(--green-600); }
.risk-reasons { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.risk-reasons a { color: inherit; display: flex; justify-content: space-between; gap: 8px; }
ul.risk-why { margin: 0; padding-left: 16px; font-size: 13px; }
ul.risk-why li { margin: 1px 0; }
.federal-card { display: block; color: inherit; margin-bottom: 16px; text-decoration: none; }
ul.plain { list-style: none; margin: 0; padding: 0; } ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--line); } ul.plain li:last-child { border-bottom: 0; }
form.inline { display: inline; }

/* Link to the Dire Dawa Administration portal on the sign-in page */
.login-portal { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
