/* CityPump-E Dashboard: house style after the brand book (Q3 2026), denser for daily professional use. */

@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap;
  src: url("../fonts/bebas-neue-latin-400-normal.5853435d21b1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap;
  src: url("../fonts/bebas-neue-latin-ext-400-normal.089e175e5cfe.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap;
  src: url("../fonts/open-sans-latin-400-normal.289ab8c3689e.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap;
  src: url("../fonts/open-sans-latin-ext-400-normal.e1a2aef42b3c.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/open-sans-latin-400-italic.1ab20c159c8c.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap;
  src: url("../fonts/open-sans-latin-600-normal.a6d99d784ef0.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap;
  src: url("../fonts/open-sans-latin-ext-600-normal.55e10958c8c5.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap;
  src: url("../fonts/open-sans-latin-700-normal.a957c7ebe6c1.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --green: #31827C;         /* Jungle Green: primary */
  --green-dark: #24675f;
  --green-soft: #e6f1f0;
  --orange: #FF9900;        /* Vivid Gamboge: calls to action only */
  --orange-dark: #e08600;
  --gunmetal: #24383F;
  --gunmetal-2: #2e464e;
  --wintergreen: #59817E;
  --opal: #98C1BE;
  --flash: #F2F2F2;
  --lotion: #FCFCFC;
  --line: #dfe5e4;
  --line-strong: #c8d3d1;
  --text: #1d2b30;
  --muted: #5d6f73;
  --yes: #2f7d4f;  --yes-bg: #e3f3e8;
  --maybe: #8a5a00; --maybe-bg: #fff1d6;
  --no: #6b7579;   --no-bg: #edf0f0;
  --danger: #b3261e; --danger-bg: #fbe9e7;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(36, 56, 63, .06), 0 2px 8px rgba(36, 56, 63, .05);
  --sidebar: 228px;
  --font: "Open Sans", Arial, sans-serif;
  --display: "Bebas Neue", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--flash); }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 400; letter-spacing: .02em; line-height: 1.05; margin: 0; color: var(--gunmetal); }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0 0 .6em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
mark { background: #ffe7b3; color: inherit; padding: 0 1px; border-radius: 2px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
pre { background: var(--lotion); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-word; }

/* --- layout --------------------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--gunmetal); color: #d9e3e2; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--green); display: grid; place-items: center; }
.brand-text { font-family: var(--display); font-size: 25px; line-height: .9; letter-spacing: .03em; }
.brand-text small { display: block; font-size: 13px; color: var(--opal); letter-spacing: .12em; }
.nav { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8fa3a6; padding: 14px 10px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: #d9e3e2; font-weight: 600; font-size: 13.5px; }
.nav a:hover { background: var(--gunmetal-2); text-decoration: none; color: #fff; }
.nav a.active { background: var(--green); color: #fff; }
.nav a .count { margin-left: auto; background: var(--orange); color: var(--gunmetal); border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 12px 14px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; }
.desktop-pill { display: flex; align-items: center; gap: 8px; color: #d9e3e2; padding: 6px 8px; border-radius: 8px; }
.desktop-pill:hover { background: var(--gunmetal-2); text-decoration: none; color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--no); flex: none; }
.dot.working { background: #3ec37a; box-shadow: 0 0 0 3px rgba(62,195,122,.2); }
.dot.free { background: var(--opal); }
.dot.busy, .dot.paused, .dot.outside { background: var(--orange); }
.dot.offline { background: #7d8a8d; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--gunmetal); }
.search { flex: 1; max-width: 560px; position: relative; }
.search input[type=search] { width: 100%; height: 36px; border-radius: 999px; border: 1px solid var(--line-strong); padding: 0 14px 0 36px; font: inherit; background: var(--lotion); }
.search input[type=search]:focus { outline: 2px solid var(--opal); border-color: var(--green); background: #fff; }
.search svg { position: absolute; left: 13px; top: 10px; color: var(--muted); pointer-events: none; }
.search kbd { position: absolute; right: 12px; top: 8px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: #fff; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--gunmetal); }
.icon-btn:hover { background: var(--flash); text-decoration: none; }
.icon-btn .badge-count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; border-radius: 9px; background: var(--orange); color: var(--gunmetal); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .dropdown { position: absolute; right: 0; top: 42px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 220px; padding: 6px; z-index: 30; }
.user-menu .dropdown a, .user-menu .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.user-menu .dropdown a:hover, .user-menu .dropdown button:hover { background: var(--flash); text-decoration: none; }

.content { padding: 22px 26px 40px; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .titles { min-width: 0; }
.page-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--wintergreen); font-weight: 700; margin-bottom: 4px; }
.page-head .eyebrow a { color: var(--wintergreen); }
.page-head .subtitle { color: var(--muted); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* --- building blocks ----------------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 16px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 20px; }
.card-head .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-body { padding: 14px 16px; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.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-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.stack > * + * { margin-top: 16px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .value { font-family: var(--display); font-size: 36px; line-height: 1; color: var(--gunmetal); margin-top: 6px; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi.accent { border-top: 3px solid var(--green); }
.kpi.attention { border-top: 3px solid var(--orange); }
.trend-up { color: var(--yes); font-weight: 700; }
.trend-down { color: var(--danger); font-weight: 700; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--gunmetal); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--flash); text-decoration: none; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: var(--gunmetal); font-family: var(--display); font-size: 17px; letter-spacing: .04em; padding: 0 18px; }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); border-color: #f0c6c2; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--no-bg); color: var(--no); white-space: nowrap; line-height: 1.6; }
.badge-yes { background: var(--yes-bg); color: var(--yes); }
.badge-maybe { background: var(--maybe-bg); color: var(--maybe); }
.badge-no, .badge-muted { background: var(--no-bg); color: var(--no); }
.badge-green { background: var(--green-soft); color: var(--green-dark); }
.badge-orange { background: #fff1d6; color: #8a5a00; }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.tag { display: inline-block; padding: 0 7px; border-radius: 4px; background: var(--flash); border: 1px solid var(--line); font-size: 11.5px; color: var(--gunmetal); margin: 1px 2px 1px 0; }

/* tables: dense, sortable look */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line-strong); background: var(--lotion); position: sticky; top: 0; white-space: nowrap; }
table.data th a { color: var(--muted); }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:hover td { background: #f7fbfa; }
table.data td.title { font-weight: 600; min-width: 260px; }
table.data td.title a { color: var(--gunmetal); }
table.data .sub { font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv th { text-align: left; color: var(--muted); font-weight: 600; padding: 5px 12px 5px 0; width: 38%; vertical-align: top; }
table.kv td { padding: 5px 0; vertical-align: top; }

.empty { padding: 28px; text-align: center; color: var(--muted); }
.empty h3 { margin-bottom: 6px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.filters input[type=search], .filters input[type=text], .filters select, .filters input[type=date] { width: auto; max-width: 100%; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; background: #fff; }
.filters input[type=search] { flex: 1 1 240px; min-width: 200px; max-width: 380px; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: #fff; }
.segmented a { padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.segmented a.active { background: var(--green); color: #fff; }
.segmented a:hover { text-decoration: none; }

/* forms */
.form-grid { display: grid; gap: 14px; max-width: 760px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 3px; }
.field .error, .errorlist { color: var(--danger); font-size: 12.5px; list-style: none; padding: 0; margin: 4px 0 0; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--opal); border-color: var(--green); }
textarea { min-height: 80px; resize: vertical; }
.checkbox-list { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 0; list-style: none; }
.checkbox-list label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 14px; text-align: center; background: var(--lotion); }
.dropzone input[type=file] { width: 100%; }

/* messages */
.messages { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.messages li { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--green-soft); border: 1px solid #c6e0dd; }
.messages li.error { background: var(--danger-bg); border-color: #f0c6c2; color: var(--danger); }
.messages li.warning { background: #fff6e6; border-color: #ffe0a8; }

/* notifications */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed li.unread { background: #fbfdf6; }
.feed li.unread .feed-title { font-weight: 700; }
.feed .icon { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-dark); }
.feed .icon.important { background: #fff1d6; color: #8a5a00; }
.feed .icon.warning { background: var(--danger-bg); color: var(--danger); }
.feed .feed-title { color: var(--gunmetal); }
.feed .feed-meta { font-size: 12px; color: var(--muted); }

/* project page */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; }
.fact .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.fact .v { font-weight: 600; margin-top: 2px; }
.quote { border-left: 3px solid var(--opal); padding: 4px 10px; margin: 8px 0; background: var(--lotion); }
.quote .meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { padding: 6px 0 6px 20px; position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--opal); }
.timeline li.ai::before { background: var(--green); }
.timeline li.sluiting::before { background: var(--orange); }
.timeline li.gunning::before { background: var(--gunmetal); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos figure { margin: 0; }
.photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--flash); }
.photos figcaption { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.doc-list li:last-child { border-bottom: 0; }
.doc-list .meta { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

.chart { width: 100%; height: 260px; }
.progress { height: 6px; background: var(--flash); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); }

.pagination { display: flex; gap: 6px; align-items: center; padding: 10px 14px; font-size: 13px; }
.pagination .current { color: var(--muted); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--gunmetal) 0%, #2b4a50 55%, var(--green) 140%); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 28px 28px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card .brand { padding: 0 0 18px; color: var(--gunmetal); }
.auth-card .brand-text small { color: var(--wintergreen); }
.auth-card h1 { font-size: 30px; margin-bottom: 10px; }
.auth-card p { color: var(--muted); }
.auth-card form p { margin: 0 0 12px; color: var(--text); }
.auth-card label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.auth-card input[type=checkbox] { width: auto; }
.auth-card form p:has(input[type=checkbox]) label { display: inline; margin-left: 6px; font-weight: 400; }
.auth-card button, .auth-card a.button { width: 100%; justify-content: center; margin-top: 4px; }
.auth-card ul.errorlist { margin-bottom: 8px; }
.auth-foot { color: rgba(255,255,255,.7); font-size: 12px; margin-top: 14px; text-align: center; }

@media (max-width: 1100px) {
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 12px; }
  .search kbd { display: none; }
  .content { padding: 16px 14px 32px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 28px; }
  .filters input[type=search] { min-width: 0; width: 100%; }
  .hide-sm { display: none; }
}

/* --- map ------------------------------------------------------------------------------------ */
.content.content-full { padding: 0; max-width: none; }
.content-full .messages { margin: 10px 14px; }
.map-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 56px); min-height: 520px; }
.map-panel { background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.map-panel-head { padding: 16px 16px 10px; }
.map-panel-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--wintergreen); font-weight: 700; }
.map-panel-head h1 { margin-bottom: 4px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.map-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.map-tabs button { flex: 1; border: 0; background: none; padding: 9px 6px; font: 600 13px var(--font); color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.map-tabs button.active { color: var(--gunmetal); border-bottom-color: var(--green); }
.map-tab { padding: 12px 16px 24px; }
.map-tab h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 6px; }
.map-tab h4:first-child { margin-top: 2px; }
.map-field { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 10px; }
.map-field select, .map-field input[type=range] { margin-top: 4px; display: block; width: 100%; }
.map-field select { padding: 6px 8px; font-size: 13px; }
label.check { display: flex; align-items: center; gap: 7px; padding: 3px 0; font-size: 13px; cursor: pointer; }
label.check input { margin: 0; }
.weight-group h4 { margin-top: 14px; }
label.weight { display: grid; grid-template-columns: minmax(0, 1fr) 88px 24px; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; line-height: 1.25; cursor: help; }
label.weight span { min-width: 0; }
label.weight input[type=range] { width: 100%; accent-color: var(--green); }
label.weight output { font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; color: var(--gunmetal); }
label.weight.off span, label.weight.off output { color: #9aa6a8; font-weight: 400; }
#opacity { accent-color: var(--green); }
ol.ranking { list-style: none; margin: 0; padding: 0; }
ol.ranking button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 6px 2px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; color: var(--text); }
ol.ranking button:hover { background: var(--green-soft); }
ol.ranking .rank { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
ol.ranking .score { margin-left: auto; font-weight: 700; color: var(--gunmetal); font-variant-numeric: tabular-nums; }

.map-stage { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: #eef1f0; }
.map-message { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 120px)); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; font-size: 13px; z-index: 3; }
.map-legend { position: absolute; left: 10px; bottom: 26px; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 10px; font-size: 12px; max-width: 270px; z-index: 2; }
.map-legend:empty { display: none; }
.map-legend h4 { font-family: var(--font); font-size: 12px; font-weight: 700; margin: 0 0 6px; color: var(--gunmetal); }
.map-legend hr { margin: 8px 0; }
.legend-scale { display: flex; height: 10px; border-radius: 3px; overflow: hidden; }
.legend-scale span { flex: 1; }
.legend-ends { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; margin: 3px 0 6px; }
.legend-row { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.swatch { width: 16px; height: 10px; border-radius: 2px; display: inline-block; flex: none; border: 1px solid rgba(0,0,0,.08); }
.dot-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; border: 1.5px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

.map-drawer { position: absolute; top: 10px; right: 54px; bottom: 26px; width: 400px; max-width: calc(100% - 70px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(36,56,63,.18); padding: 14px 16px 18px; z-index: 4; }
.map-drawer h3 { margin: 14px 0 4px; }
.drawer-head { display: flex; align-items: flex-start; gap: 8px; }
.drawer-head > div { flex: 1; min-width: 0; }
.drawer-head .eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--wintergreen); font-weight: 700; }
.drawer-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.drawer-kpis > div { background: var(--lotion); border: 1px solid var(--line); border-radius: 8px; padding: 6px 7px; min-width: 0; }
.drawer-kpis b { display: block; font-family: var(--display); font-size: 21px; font-weight: 400; line-height: 1; color: var(--gunmetal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-kpis span { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.25; margin-top: 3px; }
.why-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.why-row:last-of-type { border-bottom: 0; }
.why-row.missing { opacity: .65; }
.why-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.why-points { margin-left: auto; white-space: nowrap; font-weight: 700; color: var(--green-dark); font-variant-numeric: tabular-nums; }
.why-points small { color: var(--muted); font-weight: 400; }
.why-sentence { font-size: 13px; margin-top: 2px; }
.why-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.why-row .bar { height: 4px; background: var(--flash); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.why-row .bar span { display: block; height: 100%; background: var(--green); }
.maplibregl-popup-content { font: 13px/1.4 var(--font); border-radius: 8px; padding: 10px 12px; }

/* municipality pages */
.score-hero { display: flex; gap: 12px; flex-wrap: wrap; }
.score-hero .kpi { flex: 1 1 150px; }
.mini-map { width: 100%; height: 240px; border-radius: var(--radius-sm); background: var(--lotion); border: 1px solid var(--line); }
.mini-map path { fill: var(--opal); stroke: var(--green-dark); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.score-bar { display: inline-block; width: 64px; height: 6px; background: var(--flash); border-radius: 3px; overflow: hidden; vertical-align: middle; margin-left: 6px; }
.score-bar span { display: block; height: 100%; background: var(--green); }

@media (max-width: 860px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: 62vh auto; height: auto; }
  .map-stage { order: -1; min-height: 62vh; }
  .map-panel { border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
  .map-drawer { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-width: none; max-height: 70%; }
  .map-legend { bottom: 8px; max-width: 200px; }
  .map-message { width: calc(100% - 24px); }
}

/* activities and contacts */
.activity-form { display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.activity-row { display: flex; gap: 8px; flex-wrap: wrap; }
.activity-row select, .activity-row input { width: auto; flex: 1 1 140px; padding: 6px 8px; font-size: 13px; }
.activity-form textarea { min-height: 54px; font-size: 13px; }
.feed .icon.important { background: #fff1d6; color: #8a5a00; }
.dot-list > span + span::before { content: " · "; color: var(--muted); }

/* reports */
.callout { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--green-soft); border: 1px solid #c6e0dd; margin-bottom: 16px; font-size: 13px; }
.callout.warning { background: #fff6e6; border-color: #ffe0a8; }
.callout.danger { background: var(--danger-bg); border-color: #f0c6c2; }
.tracker { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; counter-reset: step; }
.tracker li { flex: 1 1 110px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--muted); counter-increment: step; }
.tracker li::before { content: counter(step) " "; color: var(--line-strong); }
.tracker li.done { background: var(--green-soft); color: var(--green-dark); border-color: #c6e0dd; }
.tracker li.done::before { content: "✓ "; color: var(--green); }
.tracker li.now { background: #fff1d6; color: #8a5a00; border-color: #ffe0a8; }
table.checklist td { font-size: 12.5px; }
table.checklist tr.row-error td { background: #fdf3f2; }
table.checklist tr.row-attention td { background: #fffaf0; }
table.checklist input[type=text], table.checklist select { padding: 5px 7px; font-size: 12.5px; }
.report-preview h3 { margin: 14px 0 6px; }
.report-preview p { font-size: 13.5px; }
table.checklist { table-layout: fixed; min-width: 1000px; }
table.checklist th:nth-child(1) { width: 15%; } table.checklist th:nth-child(2) { width: 19%; }
table.checklist th:nth-child(3) { width: 27%; } table.checklist th:nth-child(4) { width: 13%; }
table.checklist th:nth-child(5) { width: 7%; } table.checklist th:nth-child(6) { width: 19%; }
table.checklist td { overflow-wrap: anywhere; }

/* Knowledge bank: search by meaning, Vraag het, research */
a.cite { display: inline-block; min-width: 16px; padding: 0 4px; margin: 0 1px; border-radius: 4px; background: var(--green-soft); color: var(--green-dark); font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: 1px; }
a.cite:hover { text-decoration: none; background: var(--green); color: #fff; }
.answer p { margin: 0 0 10px; line-height: 1.6; }
.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { padding: 8px 16px; border-bottom: 1px solid var(--line); }
.source-list li:last-child { border-bottom: 0; }
.source-list li:target { background: #fff8e8; }
.source-list .label { display: inline-block; min-width: 26px; font-weight: 700; color: var(--green-dark); }
.hit-why { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; }
.ask-box { display: flex; gap: 8px; }
.ask-box textarea, .ask-box input[type=text] { flex: 1; min-height: 40px; }
.waiting { display: flex; gap: 10px; align-items: center; }
.waiting .spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--green); animation: cpe-spin 0.9s linear infinite; flex: none; }
@keyframes cpe-spin { to { transform: rotate(360deg); } }
.finding { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.finding:last-child { border-bottom: 0; }
.finding .finding-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
table.candidates td.score { text-align: right; font-variant-numeric: tabular-nums; width: 60px; }
table.candidates td.url { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .waiting .spinner { animation: none; } }
.timeline li.onderzoek::before { background: #c58a00; }
