/* ZEMA Integrated Environmental Platform — design system */
:root {
  /* Colours taken from the ZEMA emblem: ring green, water blue, sky, sun, soil orange, earth brown */
  --green-900: #004a1c;
  --green-800: #006327;
  --green-700: #008131;   /* ZEMA brand green (emblem ring) */
  --green-600: #0f9a42;
  --green-100: #e2f3e7;
  --green-50: #f1f9f3;
  --blue-900: #002870;    /* emblem navy */
  --blue-700: #00579e;    /* emblem water */
  --sky: #77cff3;
  --sun: #ffcd00;
  --orange: #f8900a;
  --brown: #482018;
  --ink: #17221a;
  --ink-2: #4a5a4e;
  --ink-3: #7a887d;
  --line: #dde5de;
  --line-2: #eef2ee;
  --bg: #f6f8f6;
  --card: #ffffff;
  --good: #008131;  --good-bg: #e2f3e7;
  --warn: #a35a00;  --warn-bg: #fff1dc;
  --bad: #b42318;   --bad-bg: #fde8e6;
  --info: #00579e;  --info-bg: #e6f1fa;
  --neutral-bg: #eef1ee;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 20, .06), 0 1px 1px rgba(16, 40, 20, .04);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.5; }
a { color: var(--green-800); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.5rem; font-weight: 650; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--ink-3); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---- Layout: staff shell with green sidebar (echoes eZEMA) ---- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--green-700) 250px, var(--bg) 250px); }
.sidebar { background: var(--green-700); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.18); }
.sidebar .brand .mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; line-height: 1.2; }
.sidebar .brand .portal { font-size: 12px; opacity: .85; margin-top: 6px; letter-spacing: .02em; }
.sidebar nav { padding: 8px 0; flex: 1; }
.sidebar nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; padding: 14px 18px 4px; }
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 9px 18px; font-size: 14px; border-left: 3px solid transparent; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.sidebar nav a.active { background: #fff; color: var(--green-800); border-left-color: var(--green-900); font-weight: 600; }
.sidebar nav a .count { background: rgba(255,255,255,.22); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.sidebar nav a.active .count { background: var(--green-100); }
.sidebar .me { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.18); font-size: 13px; }
.sidebar .me a { color: #fff; opacity: .9; }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 500; }
.topbar .crumbs { color: var(--ink-3); font-size: 13px; }
.topbar .crumbs a { color: var(--ink-2); }
.topbar .actions { display: flex; gap: 12px; align-items: center; }
.content { padding: 24px 28px 60px; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.page-head .sub { color: var(--ink-2); margin-top: 2px; }

/* ---- Industry / public shell: top navigation ---- */
.topnav { background: var(--green-700); color: #fff; }
.topnav .inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 60px; }
.topnav .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #fff; }
.topnav .brand small { color: rgba(255,255,255,.8); font-weight: 400; display: block; font-size: 12px; }
.topnav nav { display: flex; gap: 4px; }
.topnav nav a { color: #fff; padding: 8px 12px; border-radius: 6px; font-size: 14px; }
.topnav nav a.active, .topnav nav a:hover { background: rgba(255,255,255,.16); text-decoration: none; }
.page { max-width: 1240px; margin: 0 auto; padding: 24px; }
.topnav .inner { max-width: 1240px; }

/* ---- Cards, grids ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* ---- KPI tiles ---- */
.kpi { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); color: var(--ink); }
.kpi:hover { border-color: var(--green-600); text-decoration: none; }
.kpi .label { font-size: 12.5px; color: var(--ink-2); }
.kpi .value { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
.kpi .hint { font-size: 12px; color: var(--ink-3); }
.kpi.bad .value { color: var(--bad); }
.kpi.warn .value { color: var(--warn); }
.kpi.good .value { color: var(--good); }

/* ---- Tables ---- */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--green-50); }
table.t td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr:hover td { background: #fafcfa; }
table.t td.num, table.t th.num { text-align: right; }
.t-wrap { overflow-x: auto; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--ink-3); font-size: 13px; }
dl.kv dd { margin: 0; }

/* ---- Badges, clocks ---- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-neutral { background: var(--neutral-bg); color: var(--ink-2); }
.badge-info { background: var(--info-bg); color: var(--info); }
.clock { display: inline-block; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.clock-ok { background: var(--neutral-bg); color: var(--ink-2); }
.clock-warn { background: var(--warn-bg); color: var(--warn); }
.clock-bad { background: var(--bad-bg); color: var(--bad); }
.clock-done { background: var(--good-bg); color: var(--good); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--neutral-bg); color: var(--ink-2); }
.tag-sim { background: #fff4e5; color: #8a4b00; border: 1px dashed #e0a24a; }

/* ---- Buttons and forms ---- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--green-700); background: var(--green-700); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn:hover { background: var(--green-800); text-decoration: none; color: #fff; }
.btn-secondary { background: #fff; color: var(--green-800); border-color: var(--line); }
.btn-secondary:hover { background: var(--green-50); color: var(--green-900); }
.btn-good { background: var(--good); border-color: var(--good); }
.btn-bad { background: #fff; color: var(--bad); border-color: #f1b8b2; }
.btn-bad:hover { background: var(--bad-bg); color: var(--bad); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d3ca; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-100); border-color: var(--green-600); }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 12px; }
.help { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink); }
.check input { width: auto; }

/* ---- Messages / callouts ---- */
.messages { margin-bottom: 14px; }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid; font-size: 14px; }
.msg-success { background: var(--good-bg); border-color: #b9dfbc; color: var(--green-900); }
.msg-error { background: var(--bad-bg); border-color: #f1b8b2; color: #7a1a12; }
.msg-warning { background: var(--warn-bg); border-color: #efd39a; color: #6b4500; }
.msg-info { background: var(--info-bg); border-color: #bcd3ef; color: #133f72; }
.callout { border-left: 4px solid var(--green-700); background: var(--green-50); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.callout.warn { border-color: #d99a1e; background: var(--warn-bg); }
.callout.bad { border-color: var(--bad); background: var(--bad-bg); }
.callout.info { border-color: var(--info); background: var(--info-bg); }

/* ---- Timeline / steps ---- */
.steps { display: flex; gap: 0; overflow-x: auto; margin: 4px 0 8px; }
.steps .s { flex: 1; min-width: 110px; position: relative; padding-top: 22px; text-align: center; font-size: 12px; color: var(--ink-3); }
.steps .s:before { content: ""; position: absolute; top: 8px; left: 0; right: 0; height: 3px; background: var(--line); }
.steps .s:after { content: ""; position: absolute; top: 3px; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line); }
.steps .s.done { color: var(--green-800); }
.steps .s.done:before { background: var(--green-600); }
.steps .s.done:after { background: var(--green-600); border-color: var(--green-600); }
.steps .s.now { color: var(--ink); font-weight: 650; }
.steps .s.now:after { border-color: var(--green-700); background: #fff; box-shadow: 0 0 0 4px var(--green-100); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li:before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--green-600); }
.timeline li.denied:before { border-color: var(--bad); }
.timeline .when { font-size: 12px; color: var(--ink-3); }

/* ---- Map ---- */
.map { height: 420px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 1; }
.map-tall { height: 620px; }
.map-sm { height: 260px; }
.map-no-tiles { background: #eef3ee; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }

/* ---- Misc ---- */
.empty { color: var(--ink-3); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: #fff; }
.hash { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--neutral-bg); padding: 1px 6px; border-radius: 4px; color: var(--ink-2); }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sim-banner { background: repeating-linear-gradient(45deg, #fff4e5, #fff4e5 10px, #ffecd1 10px, #ffecd1 20px); color: #6b3a00; text-align: center; font-size: 13px; padding: 6px; font-weight: 600; border-bottom: 1px solid #f0c98d; }
.notice-official { border-left: 4px solid var(--green-800); }
.spark { width: 100%; height: auto; max-height: 300px; display: block; }
.chip-role { display: inline-block; font-size: 11.5px; background: var(--green-100); color: var(--green-900); padding: 1px 7px; border-radius: 10px; margin: 2px 2px 0 0; }
.denied-row td { background: #fff7f6; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt { margin-top: 16px; }
details summary { cursor: pointer; font-weight: 600; color: var(--green-800); }

/* ---- Landing ---- */
.landing-hero { background: linear-gradient(135deg, var(--green-800), var(--green-700)); color: #fff; padding: 46px 24px 64px; }
.landing-hero .inner { max-width: 1100px; margin: 0 auto; }
.landing-hero h1 { font-size: 2rem; }
.landing-hero p { opacity: .92; max-width: 760px; font-size: 1.05rem; }
.portal-cards { max-width: 1100px; margin: -38px auto 0; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.portal-card { background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 18px; box-shadow: 0 4px 14px rgba(16,40,20,.07); color: var(--ink); }
.portal-card:hover { border-color: var(--green-600); text-decoration: none; }
.portal-card h3 { color: var(--green-800); }
.portal-card p { color: var(--ink-2); font-size: 14px; margin: 0; }
.portal-card.sim { border-style: dashed; }

/* ---- Field app (mobile-first) ---- */
.field-body { background: #eef3ee; }
.field-top { background: var(--green-700); color: #fff; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 600; }
.field-top .t { font-weight: 700; }
.field-top .net { font-size: 12px; padding: 3px 8px; border-radius: 10px; background: rgba(255,255,255,.2); }
.field-top .net.offline { background: #ffd8a8; color: #7a3d00; }
.field-wrap { max-width: 640px; margin: 0 auto; padding: 14px; }
.field-card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); }
.field-card h3 { margin-bottom: 6px; }
.field-wrap { padding-bottom: 80px; }
.field-top .field-me { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--green-800); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.field-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-around; z-index: 600; padding-bottom: env(safe-area-inset-bottom); }
.field-nav a { flex: 1; text-align: center; padding: 8px 0 7px; font-size: 11.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 2px; border-top: 2px solid transparent; }
.field-nav a .ico { font-size: 18px; } .field-nav a.active { color: var(--green-800); border-top-color: var(--green-700); font-weight: 600; }
.field-nav a:hover { text-decoration: none; }
.field-hello { margin: 4px 0 12px; }
.field-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.field-stats > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.field-stats b { display: block; font-size: 22px; font-weight: 750; line-height: 1.1; } .field-stats b.warn { color: var(--warn); }
.field-stats span { font-size: 11px; color: var(--ink-3); line-height: 1.2; display: block; }
.field-h3 { margin: 10px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.field-item { display: block; color: inherit; } .field-item:hover { text-decoration: none; border-color: var(--green-600); }
.field-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.big-btn { display: block; width: 100%; padding: 14px; font-size: 16px; border-radius: 10px; text-align: center; }
.q { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.q .opts { display: flex; gap: 8px; margin-top: 6px; }
.q .opts label { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 9px; text-align: center; font-weight: 600; cursor: pointer; margin: 0; }
.q .opts input { display: none; }
.q .opts input:checked + span { color: var(--green-800); }
.q .opts label:has(input:checked) { background: var(--green-100); border-color: var(--green-600); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.sync-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px; }

/* ---- GSB simulator (deliberately different, neutral look) ---- */
.gsb-body { background: #f2f4f7; font-family: Arial, Helvetica, sans-serif; }
.gsb-top { background: #2f3b4c; color: #fff; }
.gsb-top .inner { max-width: 1050px; margin: 0 auto; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
.gsb-top .name { font-weight: 700; letter-spacing: .02em; }
.gsb-top a { color: #dfe6ef; margin-left: 14px; font-size: 14px; }
.gsb-page { max-width: 1050px; margin: 0 auto; padding: 22px 20px; }
.gsb-card { background: #fff; border: 1px solid #d6dbe2; border-radius: 6px; padding: 18px; margin-bottom: 14px; }
.gsb-btn { background: #3d5a80; border: 1px solid #3d5a80; color: #fff; padding: 9px 16px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 14px; display: inline-block; }
.gsb-btn:hover { background: #2c4462; color: #fff; text-decoration: none; }
.gsb-btn.alt { background: #fff; color: #3d5a80; }
.gsb-steps { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.gsb-steps span { background: #e3e8ef; color: #55606e; padding: 5px 10px; border-radius: 3px; font-size: 13px; }
.gsb-steps span.on { background: #3d5a80; color: #fff; }
.gsb-body a { color: #2c4f7c; }
.receipt { border: 2px dashed #9aa7b8; padding: 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; background: #fbfcfd; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .portal-cards { grid-template-columns: 1fr; }
  .topnav nav { display: none; }
  dl.kv { grid-template-columns: 1fr; }
}

.pt-label { font-size: 11px; padding: 1px 5px; }
.row.between > :first-child { flex: 1 1 260px; min-width: 0; }
.row.between > .right { flex: 0 0 auto; }
.gsb-body .gsb-top a { color: #dfe6ef; }
.gsb-body a.gsb-btn, .gsb-body a.gsb-btn:hover { color: #fff; }
.gsb-body a.gsb-btn.alt { color: #3d5a80; }
td.num.bad { color: var(--bad); font-weight: 700; }
.leaflet-control-layers { font-size: 12.5px; border-radius: 8px !important; box-shadow: var(--shadow) !important; }
.leaflet-control-layers label { font-weight: 400; margin: 0; }
@media (max-width: 1200px) { .grid[style*="repeat(9"] { grid-template-columns: repeat(3, minmax(0,1fr)) !important; } }
.topbar .search { flex: 1; max-width: 520px; margin: 0 20px; }
.topbar .search input { padding: 7px 12px; border-radius: 999px; font-size: 13.5px; background: var(--bg); }
.result-kind { display: inline-block; min-width: 110px; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
/* Printable documents */
.doc { max-width: 820px; margin: 0 auto; background: #fff; padding: 44px 56px; font-size: 14px; color: #111; }
.doc .head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--green-700); padding-bottom: 14px; margin-bottom: 20px; }
.doc .head h1 { font-size: 20px; color: var(--green-900); margin: 0; }
.doc .head .agency { font-weight: 700; font-size: 15px; }
.doc .head .agency small { display: block; font-weight: 400; color: #555; }
.doc h2 { font-size: 15px; margin: 20px 0 8px; color: var(--green-900); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.doc table.t th { background: #f3f6f3; }
.doc .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.doc .meta div b { color: #555; font-weight: 600; display: block; font-size: 12px; }
.doc .sign { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.doc .sign div { border-top: 1px solid #333; padding-top: 6px; font-size: 13px; }
.doc .foot { margin-top: 30px; font-size: 11px; color: #666; border-top: 1px solid var(--line); padding-top: 8px; display: flex; justify-content: space-between; }
.doc .watermark { position: fixed; top: 40%; left: 10%; right: 10%; text-align: center; font-size: 56px; color: rgba(180, 35, 24, .10); transform: rotate(-20deg); pointer-events: none; font-weight: 800; }
.print-bar { max-width: 820px; margin: 14px auto; display: flex; justify-content: space-between; align-items: center; }
@media print { .print-bar { display: none; } body { background: #fff; } .doc { padding: 0; } }
.sticky { position: sticky; top: 70px; align-self: start; }

/* ===== Staff shell v3: app bar + workspaces (replaces the left sidebar) ===== */
body.staff { background: var(--bg); }
.appbar { display: flex; align-items: center; gap: 14px; height: 58px; padding: 0 22px; background: var(--green-800); color: #fff; position: sticky; top: 0; z-index: 600; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.appbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; line-height: 1.1; white-space: nowrap; }
.appbar .brand small { display: block; font-weight: 400; font-size: 11.5px; opacity: .85; }
.appbar .search { flex: 1; max-width: 560px; margin: 0 8px; }
.appbar .search input { width: 100%; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; font-size: 13.5px; }
.appbar .search input::placeholder { color: rgba(255,255,255,.75); }
.appbar .search input:focus { background: #fff; color: var(--ink); outline: none; }
.appbar .actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.appbar .bell { color: #fff; position: relative; font-size: 17px; padding: 4px 6px; border-radius: 8px; }
.appbar .bell b { position: absolute; top: -2px; right: -4px; background: #e06c00; color: #fff; font-size: 10.5px; border-radius: 999px; padding: 0 5px; line-height: 16px; }
.appbar details { position: relative; }
.appbar summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #fff; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); font-size: 13.5px; font-weight: 600; user-select: none; }
.appbar summary::-webkit-details-marker { display: none; }
.appbar details[open] summary, .appbar summary:hover { background: rgba(255,255,255,.18); }
.appbar .caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .8; }
.grid-ico { width: 14px; height: 14px; background: linear-gradient(#fff,#fff) 0 0/5px 5px, linear-gradient(#fff,#fff) 9px 0/5px 5px, linear-gradient(#fff,#fff) 0 9px/5px 5px, linear-gradient(#fff,#fff) 9px 9px/5px 5px; background-repeat: no-repeat; opacity: .95; }
.appbar .menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 330px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16,40,20,.18); padding: 8px; z-index: 700; }
.appbar .menu.right { left: auto; right: 0; min-width: 260px; }
.appbar .menu-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 6px 10px 8px; }
.appbar .menu-head .muted { text-transform: none; letter-spacing: 0; }
.appbar .menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 13.5px; }
.appbar .menu a:hover { background: var(--bg); text-decoration: none; }
.appbar .menu a.active { background: var(--green-50); }
.appbar .menu a small { display: block; color: var(--ink-3); font-size: 12px; }
.appbar .menu a .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ws, var(--green-700)); background: color-mix(in srgb, var(--ws, var(--green-700)) 12%, #fff); flex: none; }
.appbar .menu a .count { margin-left: auto; background: var(--bad-bg); color: var(--bad); font-weight: 700; font-size: 12px; border-radius: 999px; padding: 1px 8px; }
.appbar .menu a.all { justify-content: center; color: var(--green-800); font-weight: 600; border-top: 1px solid var(--line-2); margin-top: 4px; border-radius: 0; }
.appbar .menu .roles { padding: 4px 10px 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.appbar .usermenu summary { padding: 4px 10px 4px 4px; }
.appbar .avatar { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--green-800); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }
.appbar .who { line-height: 1.1; text-align: left; } .appbar .who small { display: block; font-weight: 400; opacity: .8; font-size: 11px; }

.wsband { background: #fff; border-bottom: 1px solid var(--line); border-top: 3px solid var(--ws, var(--green-700)); }
.wsband .inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 14px 28px 0; max-width: 1400px; margin: 0 auto; }
.wsname { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.wsname .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.wsname h2 { margin: 0; font-size: 1.2rem; }
.wsicon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ws); background: color-mix(in srgb, var(--ws) 12%, #fff); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tabs a { padding: 10px 14px 12px; color: var(--ink-2); font-weight: 500; border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ws); border-bottom-color: var(--ws); font-weight: 650; }
.tabs .count { background: var(--neutral-bg); color: var(--ink-2); border-radius: 999px; font-size: 11.5px; padding: 0 7px; font-weight: 700; }
.tabs a.active .count { background: color-mix(in srgb, var(--ws) 14%, #fff); color: var(--ws); }

.crumbbar { padding: 10px 28px 0; max-width: 1400px; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.crumbs a { color: var(--ink-2); } .crumbs .sep { color: var(--ink-3); padding: 0 4px; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.content { padding: 16px 28px 60px; max-width: 1400px; margin: 0 auto; }

/* ---- Launcher ---- */
.launcher-head { display: flex; justify-content: space-between; align-items: flex-end; margin: 8px 0 18px; gap: 16px; }
.launcher-head .eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--green-700); font-weight: 700; }
.launcher-head h1 { margin: 2px 0 0; font-size: 1.6rem; }
.access-chip { font-size: 12.5px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.wsgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.wscard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--ws); border-radius: 12px; padding: 18px 18px 14px; box-shadow: var(--shadow); color: var(--ink); position: relative; transition: transform .12s ease, box-shadow .12s ease; }
.wscard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,40,20,.12); }
.wscard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.wscard .wsicon { width: 44px; height: 44px; }
.wscard .badge-soft { font-size: 12px; background: var(--bad-bg); color: var(--bad); border-radius: 999px; padding: 3px 10px; font-weight: 600; display: flex; gap: 5px; align-items: center; }
.wscard .badge-soft::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.wscard h3 { margin: 14px 0 4px; font-size: 1.05rem; }
.wscard p { color: var(--ink-2); font-size: 13.5px; min-height: 40px; margin: 0; }
.wscard .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.wscard .stats b { display: block; font-size: 22px; font-weight: 700; line-height: 1.1; }
.wscard .stats span { font-size: 12px; color: var(--ink-3); }
.wscard .open { margin-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--ws); font-weight: 650; font-size: 13.5px; }
.wscard .open i { width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--ws) 12%, #fff); display: grid; place-items: center; font-style: normal; }
.wscard .sections { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wscard .sections a { font-size: 12px; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 9px; }
.wscard .sections a:hover { border-color: var(--ws); color: var(--ws); text-decoration: none; }

/* ---- Attention strip and KPI strip ---- */
.attention { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.attn { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; color: var(--ink); }
.attn:hover { text-decoration: none; border-color: var(--green-600); }
.attn .n { font-size: 26px; font-weight: 750; min-width: 44px; line-height: 1; }
.attn .l { font-size: 13px; color: var(--ink-2); line-height: 1.25; }
.attn.bad .n { color: var(--bad); } .attn.warn .n { color: var(--warn); } .attn.good .n { color: var(--good); } .attn.info .n { color: var(--info); }
.kpistrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpistrip .kpi { display: block; min-width: 0; position: relative; overflow: hidden; }
.kpistrip .sparkline { color: var(--green-700); position: absolute; right: 14px; bottom: 12px; opacity: .9; width: 64px; height: 22px; display: block; }
.kpistrip .kpi .label { padding-right: 70px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.activity li i { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--green-600); margin-top: 5px; }
.activity li i.denied { background: var(--bad); }
.activity .when { color: var(--ink-3); font-size: 12px; }
.queue-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.queue-row:last-child { border-bottom: 0; }
.queue-row .right { text-align: right; flex: none; }
@media (max-width: 1100px) { .wsgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .attention { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpistrip { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 720px) { .wsgrid, .attention, .kpistrip { grid-template-columns: 1fr; } .appbar .search { display: none; } .appbar .who { display: none; } .wsband .inner { flex-direction: column; align-items: flex-start; } }

/* ===== Command centre ===== */
.appbar .cc-title { font-weight: 600; font-size: 14px; padding: 5px 12px; border-radius: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.appbar .cc-province { display: flex; align-items: center; gap: 8px; margin-left: 8px; color: #fff; font-size: 12.5px; }
.appbar .cc-province select { width: auto; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.14); color: #fff; font-size: 13px; }
.appbar .cc-province select option { color: var(--ink); }
.appbar .cc-province label { color: rgba(255,255,255,.85); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.appbar .actions > a:not(.tag) { color: #fff; font-size: 13.5px; }
.cc-hero { background: linear-gradient(135deg, var(--green-900) 0%, var(--green-700) 55%, var(--blue-700) 100%); color: #fff; }
.cc-hero .inner { max-width: 1560px; margin: 0 auto; padding: 26px 28px 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.cc-hero .eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .85; font-weight: 600; }
.cc-hero h1 { margin: 4px 0 4px; font-size: 1.7rem; }
.cc-hero .sub { opacity: .88; font-size: 13.5px; } .cc-hero .sub a { color: #fff; text-decoration: underline; }
.cc-totals { display: flex; gap: 10px; flex-wrap: wrap; }
.cc-totals a { color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 10px 16px; min-width: 128px; display: flex; flex-direction: column; }
.cc-totals a:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.cc-totals b { font-size: 24px; line-height: 1.1; font-weight: 750; } .cc-totals span { font-size: 12px; opacity: .85; }
.cc-page { max-width: 1560px; margin: 0 auto; padding: 22px 28px 60px; display: grid; gap: 18px; }
.cc-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cc-group { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 16px; border-top: 4px solid var(--g); }
.cc-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.cc-group-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--g); align-self: center; }
.cc-group-head h3 { margin: 0; font-size: 1rem; } .cc-group-head .muted { font-size: 12.5px; }
.cc-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cc-metric { display: flex; flex-direction: column; padding: 12px 12px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); min-height: 118px; }
.cc-metric:hover { text-decoration: none; border-color: var(--g); background: #fff; }
.cc-metric .value { font-size: 30px; font-weight: 750; line-height: 1; }
.cc-metric.bad .value { color: var(--bad); } .cc-metric.warn .value { color: var(--warn); } .cc-metric.good .value { color: var(--good); }
.cc-metric .label { font-size: 13px; font-weight: 600; margin-top: 8px; line-height: 1.25; }
.cc-metric .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.3; }
.cc-maprow { display: grid; grid-template-columns: minmax(0, 1fr) 450px; gap: 18px; }
.cc-mapcard, .cc-regions, .cc-trust { margin-bottom: 0; }
.cc-table { table-layout: fixed; width: 100%; } .cc-table td { padding: 6px 3px; font-size: 12.5px; white-space: normal; }
.cc-table th { padding: 6px 2px; font-size: 10.5px; letter-spacing: 0; white-space: nowrap; overflow: hidden; }
.cc-table th:first-child, .cc-table td:first-child { width: 90px; }
.cc-h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 16px 0 8px; }
.cc-bars a { display: grid; grid-template-columns: 96px 1fr 28px; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); padding: 2px 0; }
.cc-bars a:hover { text-decoration: none; color: var(--ink); }
.cc-bars .bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.cc-bars .bar i { display: block; height: 100%; background: var(--warn); border-radius: 4px; }
.cc-bars .v { text-align: right; font-weight: 600; }
.cc-table tr.is-current { background: var(--green-50); }
.cc-table td.bad { color: var(--bad); font-weight: 700; } .cc-table td.warn { color: var(--warn); font-weight: 700; }
.cc-truststrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.cc-truststrip > div { background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.cc-truststrip b { display: block; font-size: 24px; font-weight: 750; line-height: 1.1; } .cc-truststrip span { font-size: 12.5px; color: var(--ink-2); }
.cc-truststrip .warn b { color: var(--warn); } .cc-truststrip .bad b { color: var(--bad); }
.cc-stale { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cc-stale span { font-size: 12.5px; background: var(--info-bg); color: var(--ink-2); border-left: 3px solid var(--info); padding: 5px 10px; border-radius: 6px; }
.cc-charts .card { margin-bottom: 0; }
@media (max-width: 1200px) { .cc-groups { grid-template-columns: 1fr; } .cc-maprow { grid-template-columns: 1fr; } .cc-truststrip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cond-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.cond-list label { font-size: 13px; }
.btn-block { display: block; width: 100%; text-align: center; }

.tabs .ro { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); background: var(--neutral-bg); border-radius: 4px; padding: 1px 5px; }

/* ---- Access rights (per-user, Odoo-style) ---- */
.avatar-lg { width: 48px; height: 48px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; }
.access-grid section h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: 14px 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.access-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 12px; align-items: start; padding: 8px 6px; border-radius: 8px; }
.access-row.is-custom { background: var(--info-bg); }
.access-row .help { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; font-size: 10px; color: var(--info); border: 1px solid var(--info); margin-left: 6px; vertical-align: 1px; cursor: help; }
.access-row select.lvl { font-size: 13px; padding: 6px 8px; border-radius: 8px; width: 100%; }
.lvl-none { color: var(--ink-3); } .lvl-read { color: var(--info); font-weight: 600; } .lvl-write { color: var(--warn); font-weight: 600; } .lvl-full { color: var(--good); font-weight: 600; }
@media (max-width: 1000px) { .access-grid { grid-template-columns: 1fr; } }
