:root {
  --bg: #eef1f6;
  --panel: #ffffff;
  --ink: #161b26;
  --ink-2: #485164;
  --mute: #677084;
  --line: #e9ecf2;
  --soft: #f3f5f9;
  --track: #e8ecf2;
  --org: #f39200;
  --org-d: #b56c00;
  --org-s: #fff3e2;
  --dark: #161b26;
  --dark-2: #232a38;
  --green: #1d8a5f;
  --green-s: #e8f6ef;
  --red: #c9442f;
  --red-s: #fdecea;
  --blue: #3f6290;
  --blue-s: #eaf0f8;
  --amber-s: #fff6dc;
  --r: 22px;
  --num: "Bricolage Grotesque", system-ui, sans-serif;
  --ui: "Schibsted Grotesk", system-ui, sans-serif;
  /* type colours */
  --c-land: #7c95b8;
  --c-vehicle: #f39200;
  --c-plant: #24324d;
  --c-equip: #ffc76a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--mute); font-size: 13px; }

.app { display: grid; grid-template-columns: 244px 1fr; gap: 16px; padding: 16px; min-height: 100vh; max-width: 1680px; margin: 0 auto; }
.panel { background: var(--panel); border-radius: var(--r); box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 12px 32px -18px rgba(22,27,38,.18); }

/* ---------- Sidebar ---------- */
.side { position: sticky; top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 22px 16px 16px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 22px; border-bottom: 1px solid var(--line); }
.mark { width: 34px; height: 42px; color: var(--ink); }
.mark .facet { stroke-dasharray: 90; stroke-dashoffset: 0; animation: facet 2.4s .4s ease-out both; }
@keyframes facet { from { stroke-dashoffset: 90; } }
.word { display: grid; line-height: 1; }
.word b { font: 700 15px/1.02 var(--num); letter-spacing: .06em; }
.word small { color: var(--org-d); font-size: 8.5px; font-weight: 600; letter-spacing: .16em; margin-top: 3px; }

/* Active item is a tab cut into the sidebar in the page colour, flush with its right edge,
   with concave corners above and below so it flows into the page. It slides between items. */
.nav { display: grid; gap: 6px; padding: 20px 0; position: relative; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-right: -16px; padding-right: 30px; color: var(--ink-2); text-decoration: none; font-weight: 500; transition: color .3s; }
.nav a svg { transition: color .3s, transform .3s; }
.nav a:hover { color: var(--ink); }
.nav a:hover svg { transform: translateX(2px); }
.nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on svg { color: var(--org); }
.nav em { margin-left: auto; font-style: normal; font-size: 12px; }
.nav-ind { position: absolute; left: 0; right: -17px; top: 0; height: 46px; background: var(--bg); border-radius: 16px 0 0 16px; transform: translateY(var(--y, 0)); transition: transform .5s cubic-bezier(.65,0,.25,1), height .3s; pointer-events: none; }
.nav-ind.instant { transition: none; }
.nav-ind::before, .nav-ind::after { content: ""; position: absolute; right: 1px; width: 18px; height: 18px; }
.nav-ind::before { top: -18px; background: radial-gradient(circle at 0 0, transparent 17.5px, var(--bg) 18px); }
.nav-ind::after { bottom: -18px; background: radial-gradient(circle at 0 100%, transparent 17.5px, var(--bg) 18px); }
/* the sidebar casts its shadow down and to the left only, so no line shows where the tab meets the page */
.side { box-shadow: 0 1px 0 rgba(22,27,38,.04), -12px 16px 32px -24px rgba(22,27,38,.2); }

/* Page change: content fades out; entrances on the next page come from the Motion Kit (reveal, rise, count) */
/* The scrollbar is always reserved, so short and long pages sit at exactly the same width and the sidebar never jumps */
html { overflow-y: scroll; }
.main.leaving > *:not(.top) { opacity: 0 !important; transition: opacity .2s !important; }
/* One entrance for every block on every page: fade with a short rise, in reading order (delays set in shell.js) */
.main [data-mk-reveal] { transform: translateY(14px); transition: opacity .6s var(--mk-ease), transform .7s var(--mk-ease); }
:root { --mk-hl: #ffd9a3; }
/* greeting summary: the two numbers that matter as inline chips */
.hello p#helloS { font-size: 16.5px; color: var(--ink-2); margin-top: 10px; line-height: 2.1; }
.lchip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 5px; margin: 0 3px; border-radius: 999px; text-decoration: none; vertical-align: middle; line-height: 1.3; transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s; }
.lchip > svg:first-child { width: 28px; height: 28px; padding: 6px; border-radius: 50%; }
.lchip b { font: 600 16px var(--num); }
.lchip .go { width: 15px; height: 15px; margin-left: -2px; transition: transform .3s; }
.lchip.v { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 6px 16px -10px rgba(22,27,38,.3); }
.lchip.v > svg:first-child { background: var(--org); color: #fff; }
.lchip.r { background: var(--red-s); color: var(--red); }
.lchip.r > svg:first-child { background: var(--red); color: #fff; }
.lchip:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line), 0 12px 22px -12px rgba(22,27,38,.35); }
.lchip.r:hover .go { transform: translateX(3px); }

/* Their own logo (traced from the flyer) */
.side .brand { display: grid; gap: 4px; padding: 2px 8px 20px; text-decoration: none; }
.side .brand .logo { width: 172px; height: auto; display: block; }
.side .brand small { color: var(--org-d); font: 600 9px var(--ui); letter-spacing: .34em; padding-left: 58px; }
.m-brand img { height: 36px; display: block; }

/* Intro (Motion Kit loader) */
.eg-loader { --mk-loader-bg: var(--dark); color: var(--org); }
.eg-loader .ld { display: grid; justify-items: center; gap: 10px; text-shadow: none !important; }
.eg-loader .ld img { width: 210px; height: auto; }
.eg-loader .ld b { font: 600 10px var(--ui); letter-spacing: .4em; color: var(--org); padding-left: 60px; }
[data-mk-loader].eg-loader .mk-ring-dot { fill: #ffd9a3; }
[data-mk-loader].eg-loader .mk-ring-line { stroke: var(--org); filter: drop-shadow(0 0 6px rgba(243,146,0,.7)); }

/* One card per asset type */
.types4 .tcard { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; transform-style: preserve-3d; }
.tc-top { display: flex; justify-content: space-between; align-items: center; }
.tc-n { font-size: 12.5px; color: var(--mute); background: var(--soft); border-radius: 999px; padding: 4px 10px; }
.tc-n b { color: var(--ink); font: 600 13px var(--num); }
.tcard p { margin-top: 12px !important; }
.tcard .num { font-size: 30px !important; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.tc-pics { display: flex; }
.tc-pics i { width: 30px; height: 30px; border-radius: 50%; background: var(--soft) center/cover; border: 2px solid #fff; margin-left: -8px; box-shadow: 0 1px 3px rgba(22,27,38,.15); display: grid; place-items: center; }
.tc-pics i:first-child { margin-left: 0; }
.tc-pics i.ic svg { width: 15px; height: 15px; color: var(--mute); }
.tc-foot small { font-size: 12px; font-weight: 600; white-space: nowrap; }
.tc-foot small.warn { color: var(--red); }
.tc-foot small.ok { color: var(--green); }
.kpis .kpi .k-ic.n { background: #e7eaf1; color: var(--c-plant); }
.tcard:hover { box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 24px 40px -22px rgba(22,27,38,.35); }
.count { color: var(--mute); }
.badge { background: var(--org); color: #fff; border-radius: 50%; min-width: 22px; height: 22px; padding: 0 4px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; line-height: 1; box-sizing: border-box; }

.side-foot { margin-top: auto; display: flex; gap: 10px; align-items: flex-start; padding: 14px 12px; border-radius: 16px; background: var(--soft); font-size: 12px; color: var(--mute); line-height: 1.4; }
.side-foot svg { width: 16px; height: 16px; color: var(--org-d); margin-top: 1px; }

/* Signed-in person, top right */
.me { position: relative; }
.me-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; transition: background .2s; }
.me-btn:hover { background: var(--soft); }
.me-t { display: grid; text-align: left; line-height: 1.2; }
.me-t b { font-size: 13px; font-weight: 600; }
.me-t small { font-size: 11.5px; color: var(--mute); }
.me .chev { width: 16px; height: 16px; color: var(--mute); }
.me-menu { position: absolute; right: 0; top: 52px; width: 260px; padding: 8px; z-index: 1200; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); animation: menuIn .2s cubic-bezier(.2,.7,.2,1); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.me-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.me-head b { display: block; font-size: 13.5px; }
.me-head small { color: var(--mute); font-size: 12px; }
.me-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.me-menu a:hover { background: var(--soft); color: var(--ink); }
.me-menu a svg { width: 17px; height: 17px; }
.me-menu a.out { color: var(--red); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--org); color: var(--ink); display: grid; place-items: center; font: 600 13px var(--num); flex: none; }

/* Segmented control */
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--mute); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, color .2s; }
.seg button svg { width: 16px; height: 16px; }
.seg { background: var(--track); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(22,27,38,.14); }
.role .seg { background: var(--track); }

/* ---------- Main ---------- */
.main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.row > *, .kpis > * { min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 14px; position: relative; z-index: 1000; }
.m-brand { display: none; }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 0 12px; height: 46px; position: relative; }
.search svg { color: var(--mute); }
.search input { flex: 1; border: 0; background: none; outline: none; font: inherit; font-size: 14.5px; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--mute); }
.search:focus-within { box-shadow: 0 0 0 2px var(--org); background: #fff; }
.results .r-all { position: sticky; bottom: -8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px -8px -8px; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; font-weight: 600; color: var(--org-d); text-decoration: none; }
.results .r-all:hover { background: var(--soft); }
.results .r-all kbd { font: 600 11px var(--ui); color: var(--mute); border: 1px solid #dcd9d2; border-radius: 6px; padding: 1px 6px; }
.date { margin-left: auto; color: var(--ink-2); font-weight: 500; white-space: nowrap; display: grid; justify-items: end; line-height: 1.25; }
/* when the figures were last pulled from ERPNext */
.date .sync { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500; color: var(--mute); }
.date .sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.results { position: absolute; left: 0; right: 0; top: 54px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); padding: 8px; max-height: 420px; overflow: auto; }
.results h6 { margin: 8px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.results button { display: flex; width: 100%; text-align: left; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.results button:hover, .results button.hl { background: var(--soft); }
.results .r-main { flex: 1; min-width: 0; }
.results .r-main b { display: block; font-weight: 600; }
.results .r-main small { color: var(--mute); }
.results mark { background: var(--org-s); color: var(--ink); border-radius: 3px; padding: 0 1px; }
.results .empty { padding: 18px; color: var(--mute); text-align: center; }

.hello { display: flex; align-items: end; justify-content: space-between; padding: 6px 6px 0; }
.hello h1 { font: 600 30px/1.1 var(--num); letter-spacing: -.01em; }
.hello p { color: var(--mute); margin-top: 4px; font-size: 15px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { padding: 20px 22px 18px; display: grid; gap: 2px; position: relative; overflow: hidden; }
.kpi p { color: var(--ink-2); font-weight: 500; margin-top: 14px; }
.kpi .num { font: 600 34px/1.1 var(--num); letter-spacing: -.02em; margin-top: 2px; }
.kpi .num .u { font-size: .5em; font-weight: 500; color: var(--mute); margin-left: 4px; letter-spacing: 0; }
.kpi small { color: var(--mute); font-size: 12.5px; }
.k-ic { width: 42px; height: 42px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; }
.k-ic.warn { background: var(--org-s); color: var(--org-d); }
.kpi.hero .num { font-size: 38px; }
.kpi.hero .k-ic { background: var(--org-s); color: var(--org-d); box-shadow: inset 0 0 0 2px var(--org); }
.kpi:nth-child(2) .k-ic { background: var(--blue-s); color: var(--blue); }
.kpi:nth-child(3) .k-ic { background: var(--red-s); color: var(--red); }
.kpi:nth-child(4) .k-ic { background: var(--amber-s); color: var(--org-d); }

/* Look switch (dashboard / website) */
.seg.look a { padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--mute); text-decoration: none; }
.seg.look a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Places */
.locCard { padding: 20px 22px 22px; }
.places { display: grid; gap: 2px; }
.place { display: grid; grid-template-columns: 32px 1fr auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 8px 10px; border-radius: 14px; cursor: pointer; text-align: left; width: 100%; }
.place:hover, .place.on { background: var(--soft); }
.place .cc { width: 32px; height: 32px; border-radius: 10px; background: var(--blue-s); color: var(--blue); display: grid; place-items: center; font: 700 11.5px var(--num); letter-spacing: .04em; }
.place.sub { padding: 4px 10px; }
.place.sub .cc { height: 20px; background: none; color: var(--mute); font-weight: 500; }
.place.sub b, .place.sub small { display: inline; margin-right: 6px; }
.place.sub b { font-weight: 500; }
.place.sub .meter { display: none; }
.place b { font-weight: 600; display: block; }
.place small { color: var(--mute); font-size: 12.5px; }
.place .pv { font: 600 14.5px var(--num); text-align: right; white-space: nowrap; }
.place .pv small { display: block; font: 500 12px var(--ui); color: var(--mute); }
.place .meter { grid-column: 2 / -1; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 2px; }
.place .meter i { display: block; height: 100%; background: var(--org); border-radius: 2px; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.place.sub .meter i { background: #d9d4cb; }
a.tr { color: inherit; text-decoration: none; }

/* Rows */
.row { display: grid; gap: 16px; }
.mid { grid-template-columns: 1.05fr 1.25fr .95fr; }
.bottom { grid-template-columns: minmax(0, 1fr); align-items: start; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ph h3 { font: 600 17px var(--num); }
.panel.byType, .panel.mapCard, .panel.attn, .panel.assets, .panel.cal { padding: 20px 22px 22px; }

/* By type */
.bar { display: flex; height: 64px; border-radius: 14px; overflow: hidden; gap: 3px; }
.bar span { display: block; height: 100%; transition: flex-grow .9s cubic-bezier(.2,.7,.2,1), opacity .2s; cursor: pointer; min-width: 6px; }
.bar span:hover { opacity: .85; }
.donut { position: relative; width: 220px; max-width: 100%; aspect-ratio: 1; margin: 0 auto; }
.donut svg { width: 100%; height: 100%; overflow: visible; }
.donut .hit { fill: transparent; pointer-events: all; cursor: pointer; }
.donut .seg { pointer-events: none; stroke-linejoin: round; transform: translate(0, 0); transform-origin: 110px 110px; transition: transform .35s cubic-bezier(.3,1.5,.5,1), opacity .25s, filter .25s; }
.donut .seg.pop { transform: translate(var(--dx), var(--dy)) scale(1.04); filter: drop-shadow(0 6px 10px rgba(22,27,38,.25)); }
.donut .seg.dim { opacity: .3; }
.donut .sweep { fill: none; stroke: #fff; stroke-width: 46; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
/* waits for its panel to come into view, then fills */
[data-mk-reveal]:not(.is-in) .donut svg.intro .sweep { stroke-dashoffset: 1; }
[data-mk-reveal].is-in .donut svg.intro .sweep { animation: sweep 1.2s .25s cubic-bezier(.65,0,.35,1) both; }
@keyframes sweep { from { stroke-dashoffset: 1; } }
.dc { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; gap: 1px; }
.dc b { font: 600 20px/1.1 var(--num); letter-spacing: -.01em; }
.dc span { font-size: 12px; color: var(--mute); max-width: 110px; margin: 0 auto; }
.dc em { font: 600 12px var(--num); font-style: normal; color: var(--org-d); }
.legend li.hov { background: var(--soft); }
.legend { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 4px; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; cursor: pointer; transition: background .2s; }
.legend li:hover, .legend li.on { background: var(--soft); }
.legend i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.legend b { font: 600 15px var(--num); }
.legend em { font-style: normal; color: var(--mute); font-size: 12.5px; width: 38px; text-align: right; }

/* Map */
.mapCard { display: flex; flex-direction: column; }
#map { flex: 1; min-height: 270px; border-radius: 16px; overflow: hidden; background: var(--soft); }
.mapCard .ph { flex-wrap: wrap; row-gap: 10px; }
.regions { display: flex; gap: 6px; flex-wrap: wrap; }
.regions button { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 10px; background: var(--soft); color: var(--ink-2); }
.regions button.on { background: var(--dark); color: #fff; }
.pin { width: 14px; height: 14px; border-radius: 50%; background: var(--org); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pin.v { background: var(--dark); }
.bubble { background: var(--dark); color: #fff; border-radius: 14px; padding: 6px 10px; font: 600 12px var(--ui); white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(0,0,0,.4); transform: translate(-50%, -50%); display: inline-block; }
.bubble b { color: var(--org); font-family: var(--num); margin-left: 4px; }
.leaflet-div-icon { background: none; border: 0; }
.leaflet-container { font-family: var(--ui); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font: 13px var(--ui); }

/* Attention (dark card) */
.attn { background: var(--dark); color: #fff; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.attn .ph h3 { color: #fff; }
.pager { font: 600 13px var(--num); color: rgba(255,255,255,.55); }
.pager b { color: var(--org); }
.stack { position: relative; flex: 1; min-height: 210px; margin-right: 26px; }
/* Needs attention: ranked rows on the dark panel, what's at stake on the right */
.alist { display: grid; gap: 2px; flex: 1; align-content: start; }
.arow2 { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 8px; margin: 0 -8px; border-radius: 12px; color: #fff; text-decoration: none; transition: background .2s; }
.arow2 + .arow2 { box-shadow: 0 -1px 0 rgba(255,255,255,.08); }
.arow2:hover { background: rgba(255,255,255,.07); box-shadow: none; }
.arow2:hover + .arow2 { box-shadow: none; }
.aic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.aic svg { width: 19px; height: 19px; }
.atx { min-width: 0; display: grid; }
.atx b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atx small { font-size: 12px; color: rgba(255,255,255,.55); }
.arow2 em { font: 600 14px var(--num); font-style: normal; white-space: nowrap; color: #fff; }
.arow2 em.bad { color: #ff8a73; }
.arow2 em.warn { color: var(--org); }
.amore { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.07); color: #fff; font-weight: 600; font-size: 13px; text-decoration: none; transition: background .2s; }
.amore:hover { background: rgba(255,255,255,.12); }
.amore svg { width: 16px; height: 16px; color: var(--org); }
.note { position: absolute; inset: 0 0 auto 0; background: #fff; color: var(--ink); border-radius: 18px; padding: 16px 16px 14px; transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .55s; transform-origin: left center; cursor: pointer; }
.note .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; }
.note h4 { margin: 12px 0 4px; font: 600 16px/1.25 var(--num); }
.note p { color: var(--ink-2); font-size: 13px; }
.note .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.note .meta { gap: 10px; }
.note .meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note .meta b { color: var(--ink); font: 600 14px var(--num); white-space: nowrap; }
.next { position: absolute; right: 14px; top: 50%; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.4); transition: transform .2s; }
.next:hover { transform: scale(1.08); }

.t-court { background: var(--red-s); color: var(--red); }
.t-underinsured, .t-rent, .t-titles { background: var(--org-s); color: var(--org-d); }
.t-bank { background: var(--blue-s); color: var(--blue); }
.t-ops { background: var(--red-s); color: var(--red); }
.t-insurance { background: var(--org-s); color: var(--org-d); }
.t-collateral { background: var(--blue-s); color: var(--blue); }
.t-repair { background: var(--red-s); color: var(--red); }

/* Assets table */
.assets .ph { align-items: flex-start; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--soft); font-weight: 600; font-size: 13px; color: var(--ink-2); transition: background .2s, color .2s; }
.chip em { font-style: normal; font-weight: 500; color: var(--mute); font-size: 12px; }
.chip.on { background: var(--org); color: #fff; box-shadow: 0 6px 14px -8px rgba(243,146,0,.8); }
.chip.on em { color: rgba(255,255,255,.85); }
.chip.x { background: var(--org-s); color: var(--org-d); }

.tbl .thead, .tbl .tr { display: grid; grid-template-columns: minmax(0, 2.4fr) 1.1fr 1.3fr 1.1fr 1.15fr 28px; align-items: center; gap: 12px; }
.tbl .thead { color: var(--mute); font-size: 12px; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl .tr { padding: 10px; border-radius: 14px; border-bottom: 1px solid var(--line); transition: background .2s; }
.tbl .tr:hover { background: var(--soft); }
.tbl .tr.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 30% { background: var(--org-s); } }
.a-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.thumb { width: 52px; height: 40px; border-radius: 10px; background: var(--soft) center/cover; flex: none; display: grid; place-items: center; color: var(--ink-2); overflow: hidden; }
.thumb svg { width: 20px; height: 20px; }
.a-cell b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-cell small { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tr .v { font: 600 14.5px var(--num); white-space: nowrap; }
.tr .loc { color: var(--ink-2); font-size: 13px; min-width: 0; }
.tr .loc, .tr .loc small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr .loc small { display: block; color: var(--mute); font-size: 12px; }
.tr .ty { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; overflow: hidden; }
.tr .ty i { width: 8px; height: 8px; border-radius: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-good { background: var(--green-s); color: var(--green); }
.p-new { background: var(--blue-s); color: var(--blue); }
.p-repair, .p-court { background: var(--red-s); color: var(--red); }
.p-collateral, .p-bank { background: var(--blue-s); color: var(--blue); }
.p-title, .p-survey, .p-term { background: var(--org-s); color: var(--org-d); }
.p-underinsured, .p-insurance, .p-rent { background: var(--org-s); color: var(--org-d); }
.edit { width: 28px; height: 28px; border-radius: 8px; display: none; place-items: center; color: var(--mute); }
.edit:hover { background: #fff; color: var(--org-d); }
.edit svg { width: 16px; height: 16px; }
body[data-role="admin"] .edit { display: grid; }
.more { margin-top: 12px; width: 100%; padding: 12px; border-radius: 14px; background: var(--soft); font-weight: 600; color: var(--ink-2); }
.more:hover { background: var(--org-s); color: var(--org-d); }

/* Cards view */
body[data-view="cards"] .tbl .thead { display: none; }
body[data-view="cards"] .tbl .rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
body[data-view="cards"] .tbl .tr { display: flex; flex-direction: column; align-items: stretch; gap: 8px; border: 1px solid var(--line); padding: 8px 8px 12px; }
body[data-view="cards"] .a-cell { flex-direction: column; align-items: stretch; gap: 10px; }
body[data-view="cards"] .thumb { width: 100%; height: 120px; border-radius: 10px; }
body[data-view="cards"] .thumb svg { width: 30px; height: 30px; }
body[data-view="cards"] .tr > * { padding: 0 4px; }
body[data-view="cards"] .tr .ty { display: none; }
body[data-view="cards"] .tr .edit { position: absolute; }

/* Calendar */
.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
#calHead span { font-size: 11.5px; color: var(--mute); font-weight: 600; padding: 4px 0 8px; }
#calBody span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; font: 500 13px var(--num); background: var(--soft); position: relative; cursor: default; }
#calBody span.o { background: none; color: #c9c5bd; }
#calBody span.today-c { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
#calBody span.ev { color: #fff; font-weight: 600; cursor: pointer; }
#calBody span.past { color: var(--mute); }
.e-insurance { background: var(--org) !important; }
.e-payment { background: var(--dark) !important; }
.e-service { background: var(--blue) !important; }
.e-valuation { background: var(--green) !important; }
.evlist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 2px; }
.evlist li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; cursor: pointer; }
.evlist li:hover, .evlist li.hl { background: var(--soft); }
.evlist .d { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 600 13px var(--num); }
.evlist b { font-weight: 600; font-size: 13px; display: block; }
.evlist small { color: var(--mute); font-size: 12px; }
.evlist .in { font-size: 12px; color: var(--mute); white-space: nowrap; }
.evlist .in.soon { color: var(--org-d); font-weight: 600; }

/* Role: viewer masks money */
body[data-role="viewer"] .money-v { filter: blur(7px); user-select: none; }
body[data-role="viewer"] .kpi .money { filter: blur(9px); }

/* ---------- Asset page (dash-asset.html) ---------- */
.dpage { display: grid; gap: 16px; }
.dback { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); text-decoration: none; padding: 4px 6px; justify-self: start; }
.dback:hover { color: var(--org-d); }
.dtop { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; }
.dmedia { min-height: 380px; background: var(--dark) center/cover; position: relative; overflow: hidden; }
.dmedia.ic { display: grid; place-items: center; background: linear-gradient(140deg, #2a251f, #171512); }
.dmedia.ic svg { width: 110px; height: 110px; color: rgba(255,255,255,.18); }
#heroMap { position: absolute; inset: 0; }
.dsum { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.dkind { font-size: 12px; font-weight: 600; color: var(--mute); letter-spacing: .08em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.dkind i { width: 10px; height: 10px; border-radius: 3px; }
.dsum h1 { font: 600 30px/1.1 var(--num); letter-spacing: -.01em; }
.dwhere { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.dwhere svg { width: 17px; height: 17px; }
.dpills { display: flex; gap: 6px; flex-wrap: wrap; }
.dfacts dl { margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.dfacts dl div { padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.dfacts dt { font-size: 12px; color: var(--mute); }
.dfacts dd { margin: 1px 0 0; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.dedit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 14px; background: var(--org); color: var(--ink); font-weight: 600; margin-top: auto; }
.dedit svg { width: 16px; height: 16px; }
body:not([data-role="admin"]):not([data-role="owner"]) .admin-only { display: none !important; }
.dmanaged { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mute); margin-top: auto; }
body[data-role="admin"] .dmanaged { margin-top: 0; }
.dmanaged svg { width: 15px; height: 15px; }
.drow { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dcol { display: grid; gap: 16px; }
.dbox { padding: 20px 22px 22px; }
#locMap { height: 380px; border-radius: 16px; overflow: hidden; background: var(--soft); }
.dlocmeta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; font-size: 13.5px; }
.dlocmeta small { display: block; color: var(--mute); font-size: 12px; }
.gm { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: var(--soft); font-weight: 600; text-decoration: none; color: var(--ink); font-size: 13px; }
.gm svg { width: 16px; height: 16px; }
.dal { min-height: 0; }
.note.static { position: static; margin-bottom: 8px; cursor: default; }
.cov .pct { font: 600 22px var(--num); color: var(--green); }
.cov.low .pct { color: var(--org-d); }
.cbar { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; margin-bottom: 10px; }
.cbar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 6px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.cov.low .cbar i { background: var(--org); }
.ddoc { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 12px; }
.ddoc:hover { background: var(--soft); }
.ddoc .fi { width: 36px; height: 42px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font: 700 10px var(--num); color: var(--org-d); }
.ddoc b { display: block; font-weight: 600; font-size: 13.5px; }
.ddoc small { color: var(--mute); font-size: 12px; }
/* Taarifa zaidi lists: Nyaraka rows, two columns, no rules */
.xlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; }
.xr .xi { width: 36px; height: 36px; border-radius: 10px; flex: none; }
.xr .xi svg { width: 18px; height: 18px; color: var(--org-d); }
.xr .xt { flex: 1; min-width: 0; }
.xr .xt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xr .xa { font: 600 14px var(--num); white-space: nowrap; }
.xtot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--soft); font-size: 13px; color: var(--ink-2); font-weight: 600; }
.xtot b { font: 600 15px var(--num); color: var(--ink); }
@media (max-width: 860px) { .xlist { grid-template-columns: minmax(0, 1fr); } }
.pin.big { width: 18px; height: 18px; box-shadow: 0 0 0 6px rgba(243,146,0,.3), 0 2px 8px rgba(0,0,0,.4); }
@media (max-width: 1100px) { .dtop, .drow { grid-template-columns: minmax(0, 1fr); } .dmedia { min-height: 280px; } }
@media (max-width: 860px) { .dfacts dl { grid-template-columns: 1fr; } #locMap { height: 260px; } .dsum { padding: 18px; } .dsum h1 { font-size: 24px; } }

/* ---------- Spacing and mobile pass ---------- */
a.place { text-decoration: none; color: inherit; }
.dsum { padding: 22px; }
@media (max-width: 860px) {
  /* one inner padding for every panel on phones */
  .panel.byType, .panel.locCard, .panel.attn, .panel.assets, .dbox, .plc, .agroup, .rbox, .trendCard, .changeCard, .kpi, .dsum { padding: 16px; }
  .main, .pbody, .dpage, .row, .drow, .dtop, .dcol, .cgroup { gap: 12px; }
  .ph { margin-bottom: 12px; }
  .phead { padding: 4px 4px 0; }
  .hello { padding: 4px 4px 0; }
  /* greeting: chips sit on their own lines instead of breaking mid-sentence */
  .hello p#helloS { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.5; font-size: 15px; }
  .lchip { margin: 0; }
  /* six tabs fit evenly */
  .tabs { display: grid; grid-template-columns: repeat(6, 1fr); padding: 6px; gap: 2px; }
  .tabs a { padding: 6px 2px; font-size: 9.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tabs a svg { width: 19px; height: 19px; }
  .tabs .badge { right: 2px; }
  .kpi .num { font-size: 28px; }
  .tcard .num { font-size: 26px !important; }
  .dmedia { min-height: 240px; }
  .dsum h1 { font-size: 23px; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dfacts dl { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .assets .tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .assets .tools .sel select { width: 100%; }
  .assets .tools .seg.view, .assets .tools .find { grid-column: 1 / -1; justify-self: start; }
  .assets .tools .find { justify-self: stretch; }
  .vlegend { gap: 8px 14px; }
  .xtabs .chips { margin: 0; flex-wrap: wrap; }
  .acards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .acard { padding: 6px; border-radius: 18px; }
  .ac-body { padding: 10px 4px 4px; }
  .ac-body > b { font-size: 14px; }
  .ac-meta span:nth-child(2) { display: none; }
  .ac-v { font-size: 15px; }
  .ac-go { width: 28px; height: 28px; }
  .ac-media .pill { font-size: 10.5px; padding: 3px 8px; left: 6px; top: 6px; }
  .ac-tr { left: 6px; bottom: 6px; }
  .ac-type, .ac-alert { width: 26px; height: 26px; }
}


/* ---------- Asset page additions ---------- */
/* gallery lives inside the big top image */
.gal { background: var(--dark); }
.gal .gs { position: absolute; inset: 0; background: center/cover; opacity: 0; transition: opacity .6s cubic-bezier(.22,1,.36,1), transform 1.2s cubic-bezier(.22,1,.36,1); transform: scale(1.03); display: grid; place-items: center; }
.gal .gs.on { opacity: 1; transform: none; z-index: 1; }
.gal .gs > svg { width: 100px; height: 100px; color: rgba(255,255,255,.18); }
.g-count { position: absolute; left: 14px; bottom: 14px; z-index: 600; background: rgba(22,27,38,.72); color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(8px); }
.g-nav { position: absolute; top: 50%; z-index: 600; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); opacity: 0; transition: opacity .25s, transform .25s; }
.g-nav svg { width: 18px; height: 18px; }
.g-nav.prev { left: 14px; } .g-nav.next { right: 14px; }
.gal:hover .g-nav { opacity: 1; }
.g-nav:hover { transform: scale(1.08); }
.g-dots { position: absolute; right: 14px; bottom: 18px; z-index: 600; display: flex; gap: 6px; }
.g-dots i { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.55); cursor: pointer; transition: width .3s, background .3s; }
.g-dots i.on { width: 22px; background: #fff; }
@media (hover: none) { .g-nav { opacity: 1; } }

/* value chart */
.vchart { position: relative; }
.vtag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--blue-s); color: var(--blue); white-space: nowrap; }
.vtag svg { width: 14px; height: 14px; }
.vtag.low { background: var(--red-s); color: var(--red); }
.vtag.up { background: var(--green-s); color: var(--green); }
.vlegend { align-items: center; }
.vlegend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: -4px 0 10px; }
.vlegend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.vlegend i.dash { background: repeating-linear-gradient(90deg, #9aa6b8 0 4px, transparent 4px 7px); }
.vplot { position: relative; }
.vsvg { width: 100%; height: auto; display: block; overflow: visible; }
.vsvg .grid { stroke: var(--line); stroke-width: 1; }
.vsvg .costl { stroke: #9aa6b8; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.vsvg .vline { fill: none; stroke: var(--org); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.22,1,.36,1) .2s; }
.vchart.drawn .vline { stroke-dashoffset: 0; }
.vsvg .varea { opacity: 0; transition: opacity 1s .8s; }
.vchart.drawn .varea { opacity: 1; }
.vsvg .todayl { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .5; }
.vsvg .yl { font: 500 11px var(--ui); fill: var(--mute); text-anchor: middle; }
.vdot { position: absolute; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: var(--org); box-shadow: 0 0 0 5px rgba(243,146,0,.22), 0 0 0 1px #fff inset; pointer-events: none; }
.vdot b, .vdot small { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.vdot b { bottom: 22px; background: var(--dark); color: #fff; font: 600 12.5px var(--num); padding: 4px 9px; border-radius: 8px; }
.vdot small { top: 20px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.vbars { display: grid; gap: 14px; margin-top: 6px; }
.vb { display: grid; grid-template-columns: 150px 1fr 100px; gap: 14px; align-items: center; font-size: 13.5px; font-weight: 500; }
.vb-t { height: 18px; border-radius: 9px; background: var(--soft); overflow: hidden; }
.vb-t i { display: block; height: 100%; width: 0; border-radius: 9px; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.vchart.drawn .vb-t i { width: var(--w); }
.vb b { font: 600 14.5px var(--num); text-align: right; white-space: nowrap; }
.vnote { display: flex; gap: 8px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: 12px; background: var(--red-s); color: var(--red); font-weight: 600; font-size: 13px; }
.vnote svg { width: 16px; height: 16px; }

/* what it affects */
.imp { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.imp:first-of-type { border-top: 0; padding-top: 0; }
.imp .k-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.imp .k-ic svg { width: 18px; height: 18px; }
.imp .k-ic.b { background: var(--blue-s); color: var(--blue); } .imp .k-ic.a { background: var(--amber-s); color: var(--org-d); } .imp .k-ic.r { background: var(--red-s); color: var(--red); }
.imp b { font-weight: 600; font-size: 14px; display: block; }
.imp p { color: var(--ink-2); font-size: 13px; margin-top: 2px; }

/* GPS: current location only */
.ph-r { display: flex; gap: 10px; align-items: center; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-s); padding: 5px 10px; border-radius: 999px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: livep 1.6s infinite; }
@keyframes livep { 50% { box-shadow: 0 0 0 5px rgba(29,138,95,.18); } }
.pin.live { width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid #fff; animation: pinp 1.8s infinite; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
@keyframes pinp { 0% { box-shadow: 0 0 0 0 rgba(29,138,95,.5), 0 2px 8px rgba(0,0,0,.35); } 100% { box-shadow: 0 0 0 18px rgba(29,138,95,0), 0 2px 8px rgba(0,0,0,.35); } }

/* bottom tabs: history, repairs, full details */
.xtabs .ph { flex-wrap: wrap; }
.xtabs .chips { margin: 0; }
.tl { list-style: none; margin: 0; padding: 4px 0 0 6px; display: grid; gap: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 23px; top: 18px; bottom: 18px; width: 2px; background: var(--line); }
.tl li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center; padding: 8px 0; position: relative; }
.tl-ic { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; color: var(--ink-2); z-index: 1; }
.tl-ic svg { width: 16px; height: 16px; }
.tl li.now .tl-ic { background: var(--org); color: var(--ink); box-shadow: 0 0 0 5px var(--org-s); }
.tl b { font-weight: 600; font-size: 14px; display: block; }
.tl small { color: var(--mute); font-size: 12.5px; }
.nexts { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--amber-s); margin-bottom: 12px; }
.nexts .k-ic { width: 38px; height: 38px; border-radius: 12px; background: #fff; color: var(--org-d); display: grid; place-items: center; }
.nexts .k-ic svg { width: 18px; height: 18px; }
.nexts small { display: block; font-size: 12px; color: var(--org-d); font-weight: 600; }
.nexts b { font-weight: 600; }
.slog .sl { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.sl-d { font-size: 12.5px; color: var(--mute); font-weight: 600; }
.sl-w b { display: block; font-weight: 600; font-size: 13.5px; }
.sl-w small { color: var(--mute); font-size: 12px; }
.sl-c { font: 600 14px var(--num); white-space: nowrap; }
/* Historia rows: an icon beside the event, same columns as the repairs log */
.sl-ev { display: flex; align-items: center; gap: 12px; }
.sl-ic { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--soft); color: var(--ink-2); display: grid; place-items: center; }
.sl-ic svg { width: 15px; height: 15px; }
.slog .sl.sl-tot { border-bottom: 0; padding-top: 14px; }
.sl-tot .sl-w b { color: var(--mute); }
/* an odd last fact spans both columns, so a group never ends with an empty slot */
.fx-g .dfacts dl > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.spec { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.spec span { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 12px; background: var(--org-s); color: var(--org-d); display: grid; place-items: center; }
.spec span svg { width: 17px; height: 17px; }
.spec small { font-size: 11.5px; color: var(--mute); }
.spec b { font: 600 15px var(--num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fullg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 860px) { .fullg { grid-template-columns: minmax(0, 1fr); } }
.fullg section { background: #fff; border-radius: 18px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.fullg header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--soft); }
.fullg header span { width: 30px; height: 30px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--ink-2); box-shadow: 0 1px 2px rgba(22,27,38,.08); }
.fullg header span svg { width: 15px; height: 15px; }
.fullg h4 { margin: 0; font: 600 14px var(--num); }
.fullg header em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--mute); background: #fff; border-radius: 999px; padding: 2px 8px; }
.fullg dl { margin: 0; padding: 4px 14px 8px; display: grid; }
.fullg dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.fullg dl div:last-child { border-bottom: 0; }
.fullg dt { font-size: 12.5px; color: var(--mute); }
.fullg dd { margin: 0; font-weight: 600; font-size: 13px; text-align: right; overflow-wrap: anywhere; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.fullg dd.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.cp { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--mute); opacity: 0; transition: opacity .2s, background .2s, color .2s; }
.fullg dl div:hover .cp { opacity: 1; }
.cp:hover { background: var(--soft); color: var(--ink); }
.cp.ok { opacity: 1; background: var(--green-s); color: var(--green); }
.cp svg { width: 13px; height: 13px; }@media (max-width: 860px) {
  .vb { grid-template-columns: 96px 1fr 76px; gap: 8px; }
  .slog .sl { grid-template-columns: 1fr auto; }
  .sl-d { grid-column: 1 / -1; }

}

/* Hover lift on clickable cards. Needs to outrank the Motion Kit's `[data-mk-reveal].is-in { transform: none }`. */
.main .tcard[data-mk-reveal].is-in, .main .kbtn[data-mk-reveal].is-in, .main .plc[data-mk-reveal].is-in, .main .acard {
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s, opacity .8s cubic-bezier(.22,1,.36,1);
}
.main .tcard[data-mk-reveal].is-in:hover, .main .kbtn[data-mk-reveal].is-in:hover, .main .plc[data-mk-reveal].is-in:hover {
  transform: translateY(-5px); box-shadow: 0 1px 0 rgba(22,27,38,.04), 0 26px 44px -24px rgba(22,27,38,.38);
}

/* ---------- Value over time ---------- */
.trendrow { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: stretch; }
.trendCard, .changeCard { padding: 20px 22px 18px; }
.trend { position: relative; }
.tsvg { width: 100%; height: auto; display: block; overflow: visible; }
.tsvg .grid { stroke: var(--line); }
.tsvg .projbg { fill: var(--soft); }
.tsvg .projt { font: 600 11px var(--ui); fill: var(--mute); letter-spacing: .06em; text-transform: uppercase; }
.tsvg .ta { opacity: 0; transition: opacity .9s cubic-bezier(.22,1,.36,1); }
.tsvg .ta.proj { opacity: 0; }
.drawn .ta { opacity: .92; }
.drawn .ta.proj { opacity: .35; }
.tsvg .tline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(.22,1,.36,1) .3s; }
.drawn .tline { stroke-dashoffset: 0; }
.tsvg .todayl { stroke: var(--ink); stroke-dasharray: 3 3; opacity: .45; }
/* "Jumla": one orange total line, dashed for the projection */
.tsvg .tfill { fill: var(--org); }
.drawn .tsvg .tfill { opacity: .12; }
.tsvg .tline.tl-org { stroke: var(--ink); stroke-width: 3; }
.tsvg .tline.tl-type { stroke-width: 2; }
.tsvg .tdash.tl-type { stroke-width: 2; stroke-dasharray: 2 6; }
.drawn .tsvg .tdash.tl-type { opacity: .6; }
.tsvg .tdash { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 8; opacity: 0; transition: opacity .6s 1.2s; }
.drawn .tsvg .tdash { opacity: .7; }
.tsvg .tdot { fill: #fff; stroke: var(--ink); stroke-width: 3; opacity: 0; transition: opacity .4s 1.1s; }
.drawn .tsvg .tdot { opacity: 1; }
/* "Nguzo": stacked columns that grow up from the axis, projection years lighter */
.tsvg .tcol { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .9s cubic-bezier(.22,1,.36,1); transition-delay: calc(var(--i) * 70ms); }
.drawn .tsvg .tcol { transform: none; }
.tsvg .tcol.proj path { opacity: .4; }
.tsvg .tcol path.zero { opacity: .22; }
.tsvg .tcol.proj path.zero { opacity: .1; }
/* switching style: start the new chart undrawn for a frame so it draws in */
.drawn .trend.redraw .ta, .drawn .trend.redraw .tdash, .drawn .trend.redraw .tdot { opacity: 0; transition: none; }
.drawn .trend.redraw .tline { stroke-dashoffset: 1; transition: none; }
.drawn .trend.redraw .tcol { transform: scaleY(0); transition: none; }
.rbox .ph .seg { flex-shrink: 0; }
.tsvg .yl { font: 500 11px var(--ui); fill: var(--mute); text-anchor: middle; }
.tsvg .thover rect { fill: transparent; cursor: crosshair; }
.tsvg .thover rect:hover { fill: rgba(22,27,38,.04); }
.ttip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--dark); color: #fff; border-radius: 14px; padding: 10px 12px; font-size: 12px; display: grid; gap: 4px; min-width: 210px; pointer-events: none; box-shadow: 0 16px 32px -14px rgba(22,27,38,.6); z-index: 5; }
.ttip[hidden] { display: none; }
.ttip b { font: 600 13px var(--num); margin-bottom: 2px; }
.ttip span { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.8); }
.ttip span i { width: 8px; height: 8px; border-radius: 50%; }
.ttip em { margin-left: auto; font-style: normal; font-weight: 600; color: #fff; font-family: var(--num); }
.ttip .tt-t { border-top: 1px solid rgba(255,255,255,.15); padding-top: 5px; margin-top: 2px; color: #fff; font-weight: 600; }
.trend .mixlegend { margin-top: 10px; }
.trend .mixlegend li.muted { margin-left: auto; font-size: 11.5px; }
.chg-net { padding: 14px 16px; border-radius: 16px; background: var(--green-s); display: grid; gap: 2px; margin-bottom: 10px; }
.chg-net.down { background: var(--red-s); }
.chg-net small { font-size: 12px; font-weight: 600; color: var(--green); }
.chg-net.down small { color: var(--red); }
.chg-net b { font: 600 26px var(--num); letter-spacing: -.01em; }
.chg-net span { font-size: 12px; color: var(--mute); }
.chg { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.chg li { display: grid; grid-template-columns: 34px 1fr auto 26px; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.chg li:last-child { border-bottom: 0; }
.chg .ci { width: 34px; height: 34px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; color: var(--ink-2); }
.chg .ci svg { width: 16px; height: 16px; }
.chg .cn { font-weight: 600; font-size: 13.5px; }
.chg .cn small { display: block; font-weight: 500; font-size: 12px; color: var(--mute); }
.chg b { font: 600 14px var(--num); white-space: nowrap; }
.chg .ca { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.chg .ca svg { width: 14px; height: 14px; }
.chg li.up b { color: var(--green); } .chg li.up .ca { background: var(--green-s); color: var(--green); }
.chg li.down b { color: var(--red); } .chg li.down .ca { background: var(--red-s); color: var(--red); }
.movers { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.movers h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 600 13px var(--num); text-transform: uppercase; letter-spacing: .06em; }
.movers h4 svg { width: 15px; height: 15px; }
.movers h4.up { color: var(--green); } .movers h4.down { color: var(--red); }
.mv { display: grid; grid-template-columns: 150px 1fr 96px; gap: 12px; align-items: center; padding: 7px 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.mv:hover { background: var(--soft); }
.mv-l { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-l small { display: block; font-weight: 500; font-size: 11.5px; color: var(--mute); }
.mv-t { height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.mv-t i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1s cubic-bezier(.22,1,.36,1); }
.drawn .mv-t i { width: var(--w); }
.mv.up .mv-t i { background: var(--green); } .mv.down .mv-t i { background: var(--red); }
.mv b { font: 600 13.5px var(--num); text-align: right; white-space: nowrap; }
.mv.up b { color: var(--green); } .mv.down b { color: var(--red); }
@media (max-width: 1100px) { .trendrow { grid-template-columns: minmax(0, 1fr); } .movers { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .mv { grid-template-columns: 110px 1fr 80px; } .trend .mixlegend li.muted { margin-left: 0; } }

/* ---------- Grid view cards ---------- */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 236px), 1fr)); gap: 16px; margin-top: 4px; }
.acard { display: flex; flex-direction: column; background: #fff; border-radius: 22px; padding: 8px; text-decoration: none; color: inherit; box-shadow: 0 0 0 1px var(--line); transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s; }
.acard:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line), 0 22px 40px -22px rgba(22,27,38,.38); }
.ac-media { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--soft); }
.ac-media > i { position: absolute; inset: 0; background: center/cover; transition: transform .8s cubic-bezier(.22,1,.36,1); display: grid; place-items: center; }
.acard:hover .ac-media > i { transform: scale(1.06); }
.ac-media.ic > i { background: linear-gradient(140deg, #eef1f6, #e2e7ef); }
.ac-media.ic svg { width: 44px; height: 44px; color: #9aa6b8; }
.ac-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,27,38,.28), transparent 38%); pointer-events: none; }
.ac-media .pill { position: absolute; left: 10px; top: 10px; z-index: 1; box-shadow: 0 2px 8px rgba(22,27,38,.15); }
.ac-tr { position: absolute; left: 10px; bottom: 10px; z-index: 1; display: flex; gap: 6px; }
.ac-type { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); color: var(--ink-2); box-shadow: 0 2px 8px rgba(22,27,38,.15); }
.ac-type svg { width: 15px; height: 15px; }
/* alert badge peeks out over the card's top-right corner */
.acard { position: relative; }
.ac-alert { position: absolute; top: -9px; right: -9px; z-index: 3; width: 30px; height: 30px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(201,68,47,.45); animation: alertPulse 2.4s ease-in-out infinite; }
@keyframes alertPulse { 50% { box-shadow: 0 0 0 3px #fff, 0 0 0 9px rgba(201,68,47,.14), 0 6px 14px rgba(201,68,47,.45); } }
.acards { padding-top: 10px; }
.ac-alert svg { width: 15px; height: 15px; }
.ac-body { padding: 12px 8px 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ac-body > b { font: 600 15.5px/1.25 var(--num); }
.ac-body > small { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.ac-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ac-meta svg { width: 14px; height: 14px; color: var(--mute); }
.ac-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 12px; }
.ac-v { font: 600 18px var(--num); letter-spacing: -.01em; }
.ac-go { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; transition: background .25s, color .25s, transform .35s cubic-bezier(.22,1,.36,1); }
.ac-go svg { width: 16px; height: 16px; }
.acard:hover .ac-go { background: var(--org); color: var(--ink); transform: rotate(-45deg); }
body[data-view="cards"] .tbl .acards ~ .more { margin-top: 16px; }

/* ---------- Inner pages ---------- */
.phead { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 6px 6px 0; flex-wrap: wrap; }
.phead h1 { font: 600 30px/1.1 var(--num); letter-spacing: -.01em; }
.phead p { color: var(--mute); margin-top: 4px; font-size: 15px; max-width: 46em; }
.pact { display: flex; gap: 8px; }
.pbody { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.pbody > *, .cgroup > *, .dpage > *, .toolbar > * { min-width: 0; max-width: 100%; }
.dpage { grid-template-columns: minmax(0, 1fr); }
.rbox { overflow-x: auto; }
.kpis .kpi .k-ic.o { background: var(--org-s); color: var(--org-d); }
.kpis .kpi .k-ic.b { background: var(--blue-s); color: var(--blue); }
.kpis .kpi .k-ic.r { background: var(--red-s); color: var(--red); }
.kpis .kpi .k-ic.a { background: var(--amber-s); color: var(--org-d); }
.kpi .num .money-v { font: inherit; }
.btn-o, .btn-l { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 13px; font-weight: 600; font-size: 13.5px; }
.btn-o { background: var(--org); color: var(--ink); }
.btn-l { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(22,27,38,.08); }
.btn-o svg, .btn-l svg { width: 17px; height: 17px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .chips { margin: 0; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sel select { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--soft); border: 0; border-radius: 12px; padding: 9px 12px; cursor: pointer; max-width: 190px; }
.sel.find { display: flex; align-items: center; gap: 8px; background: var(--soft); border-radius: 12px; padding: 0 10px; height: 38px; }
.sel.find svg { width: 16px; height: 16px; color: var(--mute); }
.sel.find input { border: 0; background: none; outline: none; font: inherit; font-size: 13px; width: 180px; color: var(--ink); }
.chip.x2 { gap: 6px; }
.chip.x2.on { background: var(--red); color: #fff; box-shadow: 0 6px 14px -8px rgba(201,68,47,.8); }
.empty { padding: 40px 10px; text-align: center; color: var(--mute); }
.empty button { color: var(--org-d); font-weight: 600; margin-left: 6px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 500; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 2000; box-shadow: 0 16px 40px -12px rgba(22,27,38,.5); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Places page */
.cgroup { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.ch { font: 600 20px var(--num); display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; }
.ch small { margin-left: auto; font: 600 15px var(--num); color: var(--ink-2); }
.cc { min-width: 32px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--blue-s); color: var(--blue); display: inline-grid; place-items: center; font: 700 11.5px var(--num); letter-spacing: .04em; }
.plc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.plc { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.plc-h { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.plc-h h3 { font: 600 18px var(--num); }
.plc-h small { color: var(--mute); font-size: 12.5px; }
.plc-h b { font: 600 19px var(--num); }
.mixbar { display: flex; gap: 3px; height: 10px; border-radius: 5px; overflow: hidden; }
.mixbar i { display: block; min-width: 4px; }
.mixlegend { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.mixlegend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.mixlegend em { font-style: normal; color: var(--mute); margin-left: 2px; }
.plc-sub { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin-top: 4px; }
.plc-top { display: grid; gap: 2px; }
.plc-top a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 6px; border-radius: 12px; text-decoration: none; color: inherit; }
.plc-top a:hover { background: var(--soft); }
.plc-top .thumb { width: 44px; height: 34px; }
.plc-top b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plc-top span { min-width: 0; }
.plc-top small { color: var(--mute); font-size: 12px; }
.plc-top em { font: 600 13.5px var(--num); font-style: normal; white-space: nowrap; }
.cc svg { width: 15px; height: 15px; }
.place .cc { background: var(--blue-s); color: var(--blue); }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchips a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 11px; border-radius: 999px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.dchips a:hover { background: var(--org-s); color: var(--ink); }
.dchips em { font-style: normal; color: var(--mute); font-weight: 500; }
.plc .more { margin-top: auto; text-align: center; text-decoration: none; display: block; }

/* Alerts page */
.kpis.five { grid-template-columns: repeat(5, 1fr); }
.kbtn { text-align: left; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.kbtn:hover { transform: translateY(-2px); }
.kbtn.sel { box-shadow: inset 0 0 0 2px var(--org), 0 12px 32px -18px rgba(22,27,38,.18); }
.agroup { padding: 20px 22px; }
.agroup .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 9px; }
.arow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 16px; align-items: center; padding: 12px; border-radius: 16px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.arow:first-of-type { border-top: 0; }
.arow:hover { background: var(--soft); }
.arow .thumb { width: 76px; height: 58px; border-radius: 12px; }
.at b { font: 600 16px var(--num); display: block; }
.at small { color: var(--mute); font-size: 12.5px; }
.at p { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; }
.av { font: 600 16px var(--num); white-space: nowrap; }
.go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--org-d); white-space: nowrap; }
.go svg { width: 16px; height: 16px; }

/* Documents page */
.dtbl .dhead, .dtbl .drow2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.5fr) 110px 90px 150px 40px; gap: 12px; align-items: center; }
.dtbl .dhead { font-size: 12px; color: var(--mute); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dtbl .drow2 { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.dtbl .drow2:hover { background: var(--soft); border-radius: 12px; }
.dtbl .drow2.miss { background: #fffafa; }
.dn { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dn b, .da b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn small, .da small { color: var(--mute); font-size: 12px; }
.da { text-decoration: none; color: inherit; min-width: 0; }
.da:hover b { color: var(--org-d); }
.fi { width: 34px; height: 40px; flex: none; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font: 700 10px var(--num); color: var(--org-d); }
.miss .fi { color: var(--red); background: var(--red-s); }
.eye { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.eye:hover:not(:disabled) { background: #fff; color: var(--org-d); box-shadow: 0 1px 3px rgba(22,27,38,.14); }
.eye:disabled { opacity: .35; cursor: default; }
.eye svg { width: 18px; height: 18px; }
.ddoc.miss .fi { color: var(--red); background: var(--red-s); }
.ddoc.miss small { color: var(--red); }

/* Reports page */
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rbox { padding: 20px 22px 22px; }
.rbox.wide { grid-column: 1 / -1; }
.hb { display: grid; gap: 12px; }
.hb-r, .ins-r { display: grid; grid-template-columns: 170px 1fr 92px; gap: 14px; align-items: center; text-decoration: none; color: inherit; }
.hb-l { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-l small { display: block; font-weight: 500; color: var(--mute); font-size: 12px; }
.hb-t, .ins-t { height: 14px; border-radius: 7px; background: var(--soft); position: relative; overflow: hidden; }
.hb-t i, .ins-t i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 7px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.drawn .hb-t i, .drawn .ins-t i { width: var(--w); }
.hb-r b, .ins-r b { font: 600 14px var(--num); text-align: right; white-space: nowrap; }
.ins { display: grid; gap: 10px; }
.ins-r { padding: 4px 6px; border-radius: 10px; }
.ins-r:hover { background: var(--soft); }
/* insured part and gap sit side by side in one track, growing in as the page draws */
.ins-t { height: 14px; display: flex; background: none; border-radius: 0; overflow: visible; }
.ins-s { flex: none; width: 0; height: 100%; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.drawn .ins-s { width: var(--w); }
/* each part is its own rounded bar, with a small gap between the insured part and the gap */
.ins-t .ins-s i { position: static; display: block; width: 100%; height: 100%; border-radius: 7px; transition: none; }
.ins-t .ins-s + .ins-s { margin-left: 4px; }
.ins-t .ins-s:first-child[style*="--w:0.00%"] + .ins-s { margin-left: 0; }
.ins-t i.s { background: var(--org); }
.ins-t i.g { background: var(--owed); }
.ins-t i.o { background: var(--paid); }
.ins-r b.low { color: var(--red); }
.ins-r b.ok { color: var(--green); }
/* land rent: paid is a light, calm green and owed a strong red, so the two never look alike (also in greyscale) */
:root { --paid: #8fd3b0; --owed: #d93a2b; }
.ins-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.ins-legend .demo { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-style: italic; font-size: 12px; }
.ins-legend .demo svg { width: 14px; height: 14px; }
.ins-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.cols { display: flex; align-items: end; gap: 14px; height: 210px; padding-top: 10px; margin-bottom: 14px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.col-b { width: 100%; max-width: 56px; height: 0; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 10px; overflow: hidden; transition: height 1s cubic-bezier(.2,.7,.2,1); }
.drawn .col-b { height: var(--h); }
.col-b i { display: block; min-height: 4px; }
.col-n { font: 600 14px var(--num); }
.col-y { font-size: 12.5px; color: var(--mute); font-weight: 600; }
/* grouped towers: one bar per type per year, its count riding on top as it grows */
.cols.grp { padding-top: 24px; height: 230px; }
.cols.grp .col { gap: 4px; }
.towers { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.tw { flex: none; width: 12px; height: 100%; display: flex; align-items: flex-end; }
.tw i { position: relative; display: block; width: 100%; height: 0; border-radius: 4px 4px 0 0; transition: height 1s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--d) * 40ms); }
.drawn .tw i { height: var(--h); }
.tw.zero i { opacity: .22; }
.drawn .tw.zero i { height: 3px; }
.tw em { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -3px); font: 600 12px var(--num); font-style: normal; color: var(--ink-2); }
.col-t { font-size: 11.5px; color: var(--mute); margin-top: -2px; }
.cols.grp .col-y { white-space: nowrap; }
.sumt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sumt th { text-align: left; font-weight: 500; color: var(--mute); font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.sumt td { padding: 11px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sumt td:nth-child(n+3), .sumt th:nth-child(n+3) { text-align: right; font-family: var(--num); font-weight: 600; }
.sumt td i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
.sumt tr.tot td { font-weight: 700; border-bottom: 0; }

@media (max-width: 1100px) {
  .rgrid { grid-template-columns: minmax(0, 1fr); }
  .dtbl .dhead, .dtbl .drow2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) 140px 40px; }
  .dtbl .dhead span:nth-child(3), .dtbl .dhead span:nth-child(4), .dtbl .drow2 > span:nth-child(3), .dtbl .drow2 > span:nth-child(4) { display: none; }
}
@media (max-width: 860px) {
  .phead h1 { font-size: 24px; }
  .phead p { font-size: 14px; }
  .toolbar .chips { margin: 0 -16px; flex: 1 1 100%; max-width: calc(100% + 32px); }
  .tools { width: 100%; }
  .sel select { max-width: none; }
  .sel.find { flex: 1; }
  .sel.find input { width: 100%; }
  .kpis.five { display: flex; }
  .arow { grid-template-columns: auto 1fr; gap: 10px 12px; padding: 10px 4px; }
  .arow .av { grid-column: 2; }
  .arow .go { display: none; }
  .arow .thumb { width: 60px; height: 50px; }
  .dtbl .dhead { display: none; }
  .dtbl .drow2 { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .dtbl .drow2 > .da { grid-column: 1; font-size: 12.5px; }
  .dtbl .drow2 > span:nth-child(5) { grid-column: 2; grid-row: 1; }
  .dtbl .drow2 > .eye { display: none; }
  .hb-r, .ins-r { grid-template-columns: 110px 1fr 78px; gap: 10px; }
  .plc-grid { grid-template-columns: minmax(0, 1fr); }
  .tabs a { padding: 6px 4px; font-size: 10px; }
}

/* Tabs (phone) */
.tabs { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1320px) {
  .mid { grid-template-columns: 1fr 1fr; }
  .mid .attn { grid-column: 1 / -1; }
  .mid .attn .stack { min-height: 170px; }
  .bottom { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 96px; gap: 12px; }
  .side { display: none; }
  .main { gap: 12px; }
  .top { flex-wrap: wrap; gap: 10px; padding: 10px; position: sticky; top: 8px; }
  .m-brand { display: block; }
  .m-brand .mark { width: 28px; height: 34px; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 44px; }
  .results .r-all kbd { display: none; }
  .date { font-size: 13px; }
  .top .date { display: none; }
  .top .seg.lang { margin-left: auto; }
  .me-t, .me .chev { display: none; }
  .me-btn { padding: 2px; }
  .me .avatar { width: 34px; height: 34px; }
  .hello h1 { font-size: 24px; }
  .hello p { font-size: 14px; }
  .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 72%; scroll-snap-align: start; }
  .mid, .bottom { grid-template-columns: minmax(0, 1fr); }
  .mid .attn { order: -1; }
  .panel.byType, .panel.mapCard, .panel.attn, .panel.assets, .panel.cal { padding: 16px; }
  #map { min-height: 240px; }
  .ph { flex-wrap: wrap; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .tbl .thead { display: none; }
  .tbl .tr { grid-template-columns: 1fr auto; grid-template-areas: "a v" "a s"; row-gap: 4px; padding: 10px 4px; border-radius: 0; }
  .tbl .tr .a-cell { grid-area: a; }
  .tbl .tr .v { grid-area: v; text-align: right; }
  .tbl .tr .st { grid-area: s; text-align: right; }
  .tbl .tr .ty, .tbl .tr .loc { display: none; }
  .tbl .tr .edit { display: none !important; }
  body[data-view="cards"] .tbl .rows { grid-template-columns: 1fr 1fr; gap: 8px; }
  body[data-view="cards"] .thumb { height: 96px; }
  .view span { display: none; }
  .tabs { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; background: #fff; border-radius: 22px; padding: 8px; justify-content: space-around; z-index: 1100; box-shadow: 0 16px 40px -14px rgba(22,27,38,.35), 0 0 0 1px var(--line); padding-bottom: calc(8px + env(safe-area-inset-bottom) * .5); }
  .tabs a { display: grid; justify-items: center; gap: 3px; color: var(--mute); text-decoration: none; font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 14px; position: relative; }
  .tabs a.on { color: var(--ink); background: var(--org-s); }
  .tabs a.on svg { color: var(--org); }
  .tabs .badge { position: absolute; top: 0; right: 6px; font-size: 10px; min-width: 17px; height: 17px; padding: 0 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Taarifa kamili: same language as the summary block ---------- */
.fx-specs { display: flex; flex-wrap: wrap; border-radius: 18px; background: var(--soft); padding: 6px; gap: 6px; margin-bottom: 22px; }
.fx-specs > div { flex: 1 1 140px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; }
.fx-specs span { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--org-s); color: var(--org-d); display: grid; place-items: center; }
.fx-specs span svg { width: 16px; height: 16px; }
.fx-specs p { margin: 0; min-width: 0; display: grid; }
.fx-specs small { font-size: 12px; color: var(--mute); }
.fx-specs b { font: 600 14.5px var(--num); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; }
.fx-g { display: grid; gap: 4px; align-content: start; }
.fx-g .dfacts dl { margin-top: 2px; }
.fx-g dd.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; letter-spacing: .02em; }
.fx-g dd { display: flex; align-items: center; gap: 6px; }
.fx-g dl div:hover .cp { opacity: 1; }
@media (max-width: 860px) { .fx-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; } .fx-specs > div { flex-basis: calc(50% - 6px); } }

/* ---------- One spacing scale (desktop) ----------
   content panels 22px all round, stat tiles 20px 22px, 16px between blocks, 16px under panel headers, 17px panel titles */
@media (min-width: 861px) {
  .main .panel.byType, .main .panel.locCard, .main .panel.attn, .main .panel.assets, .main .dbox, .main .plc, .main .agroup, .main .rbox, .main .dsum { padding: 22px; }
  .main .kpi { padding: 20px 22px; }
  .cgroup, .plc-grid, .acards { gap: 16px; }
  .ph { margin-bottom: 16px; }
}
.plc-h h3, .ph h3 { font: 600 17px var(--num); }
.plc { gap: 14px; }
.agroup .arow { padding: 12px 10px; }

/* ---------- One spacing scale (phones), last so it wins ---------- */
@media (max-width: 860px) {
  .main .panel.byType, .main .panel.locCard, .main .panel.attn, .main .panel.assets, .main .dbox, .main .plc, .main .agroup, .main .rbox, .main .dsum, .main .kpi { padding: 16px; }
  .main, .pbody, .dpage, .row, .drow, .dtop, .dcol, .cgroup, .plc-grid, .rgrid, .acards { gap: 12px; }
  .ph { margin-bottom: 12px; }
}

/* ---------- Phone layout ---------- */
.me-nav { display: none; }
@media (max-width: 860px) {
  /* bottom bar: four sections; Nyaraka and Ripoti sit in the avatar menu */
  .tabs { grid-template-columns: repeat(4, 1fr); padding: 6px; }
  .tabs a { font-size: 11px; padding: 7px 4px; }
  .tabs a svg { width: 20px; height: 20px; }
  .me-menu { position: fixed; left: 12px; right: 12px; top: 74px; width: auto; border-radius: 22px; padding: 10px; }
  .me-nav { display: grid; gap: 2px; padding: 4px 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .me-nav a { font-weight: 600; color: var(--ink); }
  .me-nav a.on { background: var(--org-s); }
  .me-nav a .go { margin-left: auto; width: 15px; height: 15px; color: var(--mute); }

  /* top bar */
  .top { padding: 8px 8px 8px 12px; gap: 8px; border-radius: 20px; }
  .search { height: 42px; border-radius: 12px; }
  .search input { font-size: 14px; }

  /* greeting */
  .hello h1 { font-size: 22px; }
  .hello p#helloS { font-size: 14px; gap: 6px 4px; }
  .lchip { padding: 3px 11px 3px 3px; }
  .lchip > svg:first-child { width: 24px; height: 24px; padding: 5px; }
  .lchip b { font-size: 13.5px; }

  /* every set of tiles: a 2 × 2 grid of compact cards instead of a sideways row */
  .kpis, .kpis.five { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; margin: 0 !important; padding: 0 !important; overflow: visible; }
  .kpis > .kpi { flex: none; min-width: 0; }
  .main .kpi { padding: 14px !important; border-radius: 18px; gap: 0; }
  .kpi .k-ic { width: 34px; height: 34px; border-radius: 11px; }
  .kpi .k-ic svg { width: 17px; height: 17px; }
  .kpi p { margin-top: 10px !important; font-size: 12.5px; line-height: 1.3; }
  .kpi .num, .kpi.hero .num { font-size: 21px !important; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kpi .num .u { font-size: .55em; margin-left: 2px; }
  .kpi small { font-size: 11px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .kpis.five > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* asset-type cards on the home page */
  .tcard .tc-top { align-items: flex-start; }
  .tc-n { font-size: 11px; padding: 3px 8px; }
  .tc-n b { font-size: 12px; }
  .tcard p { margin-top: 10px !important; font-size: 12.5px; }
  .tcard .num { font-size: 20px !important; }
  .tc-foot { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; padding-top: 10px; }
  .tc-pics i { width: 24px; height: 24px; margin-left: -6px; }
  .tc-foot small { font-size: 11px; }

  /* home panels */
  .donut { width: 190px; }
  .dc b { font-size: 17px; }
  .legend li { padding: 8px 10px; gap: 8px; }
  .legend b { font-size: 14px; }
  .place { padding: 8px 6px; column-gap: 10px; }
  .place small { font-size: 11.5px; }
  .attn .stack { min-height: 200px; margin-right: 22px; }
  .note { padding: 14px; }
  .note h4 { font-size: 15px; }
  .next { right: 10px; width: 34px; height: 34px; }

  /* list rows */
  .tbl .tr { padding: 10px 2px; gap: 10px; }
  .thumb { width: 46px; height: 38px; }
  .tr .v { font-size: 13.5px; }
  .pill { font-size: 11px; padding: 3px 8px; }

  /* page heads */
  .phead h1 { font-size: 22px; }
  .phead p { font-size: 13.5px; }
  .pact { width: 100%; }
  .pact .btn-o, .pact .btn-l { flex: 1; justify-content: center; padding: 10px 12px; }

  /* asset page */
  .dback { padding: 2px 4px; font-size: 13.5px; }
  .dmedia { min-height: 230px; border-radius: 20px; }
  .g-count { font-size: 11.5px; padding: 6px 10px; left: 10px; bottom: 10px; }
  .dsum { gap: 8px; }
  .dsum h1 { font-size: 22px; }
  .dfacts dl div { padding: 8px 0; }
  .dfacts dd { font-size: 13px; }
  #locMap { height: 230px; }
  .dlocmeta { flex-direction: column; align-items: stretch; }
  .gm { justify-content: center; }
  .vlegend { font-size: 12px; }
  .vdot b { font-size: 11.5px; padding: 3px 7px; bottom: 18px; }
  .vsvg .yl { font-size: 15px; }
  .imp { gap: 10px; }
  .xtabs .ph { gap: 10px; }
  .xtabs .chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tl li { gap: 12px; }
  .fx-specs { margin-bottom: 16px; }
  .fx-specs > div { padding: 8px 10px; gap: 8px; }
  .fx-specs span { width: 30px; height: 30px; }
  .fx-specs b { font-size: 13.5px; }

  /* places, alerts, docs, reports */
  .plc-h { grid-template-columns: auto 1fr; }
  .plc-h b { grid-column: 1 / -1; font-size: 18px; }
  .agroup .arow { grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px 2px; }
  .arow .thumb { width: 56px; height: 48px; grid-row: 1 / 3; }
  .at b { font-size: 14.5px; }
  .at p { font-size: 13px; }
  .arow .av { grid-column: 2; font-size: 14px; }
  .dtbl .drow2 { padding: 10px 2px; }
  .hb-r, .ins-r { grid-template-columns: minmax(0, 1fr) 76px; row-gap: 6px; }
  .hb-t, .ins-t { grid-column: 1 / -1; grid-row: 2; }
  .mv { grid-template-columns: minmax(0, 1fr) 84px; row-gap: 6px; }
  .mv-t { grid-column: 1 / -1; grid-row: 2; }
  .cols { height: 170px; gap: 8px; }
  .sumt { font-size: 12.5px; }
}

/* greeting on phones: two small cards (total value, needs attention) instead of a broken sentence */
.lchip > span { display: inline-flex; flex-direction: column; line-height: 1.15; }
.m-only { display: none; }
@media (max-width: 860px) {
  .m-only { display: inline; }
  .d-only { display: none; }
  .hello p#helloS .ht { display: none; }
  .hello p#helloS { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .lchip { font-size: 14px; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; margin: 0; }
  .lchip > svg:first-child { width: 34px; height: 34px; padding: 8px; flex: none; }
  .lchip small.m-only { display: block; font-size: 11.5px; font-weight: 500; opacity: .8; margin-bottom: 2px; }
  .lchip b { font-size: 17px; }
  .lchip .go { margin-left: auto; }
}

/* grid cards on phones: two compact cards per row */
@media (max-width: 860px) {
  .acards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px 10px !important; padding-top: 8px; }
  .acard { padding: 5px; border-radius: 16px; }
  .ac-media { border-radius: 12px; aspect-ratio: 1 / 1; }
  .ac-media .pill { font-size: 10px; padding: 2px 7px; left: 5px; top: 5px; gap: 4px; }
  .ac-media .pill::before { width: 5px; height: 5px; }
  .ac-tr { left: 5px; bottom: 5px; }
  .ac-type { width: 24px; height: 24px; }
  .ac-type svg { width: 13px; height: 13px; }
  .ac-alert { width: 24px; height: 24px; top: -7px; right: -7px; box-shadow: 0 0 0 2px #fff, 0 4px 10px rgba(201,68,47,.45); }
  .ac-alert svg { width: 12px; height: 12px; }
  .ac-body { padding: 8px 4px 2px; gap: 1px; }
  .ac-body > b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ac-body > small { display: none; }
  .ac-meta { margin-top: 4px; font-size: 11px; }
  .ac-meta span:nth-child(2) { display: none; }
  .ac-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .ac-meta svg { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
  .ac-foot { padding-top: 8px; }
  .ac-v { font-size: 14px; }
  .ac-go { width: 26px; height: 26px; }
  .ac-go svg { width: 13px; height: 13px; }
}

/* alert-type tiles on phones: icon beside label and count */
@media (max-width: 860px) {
  .kpis.five .kbtn { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px !important; }
  .kpis.five .kbtn .k-ic { grid-row: 1 / 3; }
  .kpis.five .kbtn p { margin: 0 !important; font-size: 12px; }
  .kpis.five .kbtn .num { font-size: 19px !important; margin: 0; }
}

@media (max-width: 860px) {
  .dtbl .drow2 > .da { display: flex; gap: 6px; align-items: baseline; padding-left: 46px; margin-top: -2px; }
  .dtbl .drow2 > .da b { font-size: 12.5px; }
  .dtbl .drow2 > .da small::before { content: "· "; }
  .tsvg .yl { font-size: 22px; }
  .tsvg .projt { font-size: 18px; }
}

/* ---------- Mahali: map + ranked regions + selected region ---------- */
.psum { display: flex; gap: 8px; flex-wrap: wrap; }
.psum span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 13px; color: var(--ink-2); }
.psum svg { width: 15px; height: 15px; color: var(--org-d); }
.psum b { font: 600 14px var(--num); color: var(--ink); }
.mrow { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; }
.mapP { padding: 8px !important; position: relative; overflow: hidden; }
#pmap { height: 460px; border-radius: 16px; background: var(--soft); }
.mlegend { position: absolute; left: 20px; bottom: 20px; z-index: 500; list-style: none; margin: 0; padding: 8px 12px; display: flex; gap: 12px; flex-wrap: wrap; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-radius: 12px; font-size: 12px; color: var(--ink-2); box-shadow: 0 6px 16px -8px rgba(22,27,38,.3); }
.mlegend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.rbub { border-radius: 50%; background: rgba(243,146,0,.16); border: 2px solid var(--org); display: grid; place-content: center; text-align: center; gap: 1px; cursor: pointer; transition: transform .35s cubic-bezier(.3,1.5,.5,1), background .3s, box-shadow .3s; backdrop-filter: blur(2px); }
.rbub b { font: 600 12px var(--num); color: var(--ink); }
.rbub span { font: 600 11px var(--num); color: var(--org-d); }
.rbub:hover { transform: scale(1.06); }
.rbub.on { background: var(--org); box-shadow: 0 0 0 6px rgba(243,146,0,.22), 0 12px 24px -10px rgba(243,146,0,.8); }
.rbub.on b, .rbub.on span { color: #fff; }
.rlist { display: flex; flex-direction: column; }
.rlist .ph { flex-wrap: wrap; }
.rl { display: grid; gap: 8px; }
.ritem { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 10px; align-items: center; padding: 14px; border-radius: 16px; text-align: left; background: var(--soft); transition: background .25s, box-shadow .25s, transform .25s; }
.ritem:hover { transform: translateX(3px); }
.ritem .rk { width: 34px; height: 34px; border-radius: 11px; background: #fff; display: grid; place-items: center; font: 700 14px var(--num); color: var(--ink-2); }
.ritem .rn b { display: block; font: 600 15px var(--num); }
.ritem .rn small { color: var(--mute); font-size: 12px; }
.ritem .rv { text-align: right; }
.ritem .rv b { display: block; font: 600 15px var(--num); }
.ritem .rv small { font-size: 12px; font-weight: 600; color: var(--org-d); }
.rbar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: rgba(22,27,38,.07); overflow: hidden; }
.rbar i { display: block; height: 100%; border-radius: 3px; background: var(--org); transition: width .9s cubic-bezier(.22,1,.36,1); }
.ritem.on { background: #fff; box-shadow: inset 0 0 0 2px var(--org), 0 12px 26px -18px rgba(243,146,0,.9); }
.ritem.on .rk { background: var(--org); color: #fff; }
.rdetail.swap { animation: rdIn .5s cubic-bezier(.22,1,.36,1); }
@keyframes rdIn { from { opacity: .3; transform: translateY(8px); } }
.rd-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.rd-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--org-s); color: var(--org-d); display: grid; place-items: center; }
.rd-ic svg { width: 20px; height: 20px; }
.rd-h h2 { font: 600 24px var(--num); }
.rd-h small { color: var(--mute); font-size: 13px; }
.rd-v { text-align: right; }
.rd-v b { display: block; font: 600 24px var(--num); }
.rd-v span { font-size: 12.5px; color: var(--org-d); font-weight: 600; }
.rd-go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 13px; background: var(--org); color: #fff; font-weight: 600; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.rd-go svg { width: 16px; height: 16px; transition: transform .3s; }
.rd-go:hover svg { transform: translateX(3px); }
.rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 28px; }
.rd-grid h4 { margin: 0 0 10px; font: 600 12px var(--ui); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.rt { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; text-decoration: none; color: inherit; }
.rt:hover { background: var(--soft); }
.rt-ic { width: 36px; height: 36px; border-radius: 11px; background: var(--soft); display: grid; place-items: center; }
.rt-ic svg { width: 17px; height: 17px; }
.rt b { display: block; font-weight: 600; font-size: 13.5px; }
.rt small { color: var(--mute); font-size: 12px; }
.rt em, .rdist em { font: 600 14px var(--num); font-style: normal; white-space: nowrap; }
.rdist { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.rdist:last-child { border-bottom: 0; }
.rdist b { display: block; font-weight: 600; font-size: 13.5px; }
.rdist small { color: var(--mute); font-size: 12px; }
.rdist .rbar { height: 5px; }
.rtop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rtop a { text-decoration: none; color: inherit; display: grid; gap: 4px; }
.rp { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--soft) center/cover; display: grid; place-items: center; overflow: hidden; transition: transform .4s cubic-bezier(.22,1,.36,1); }
.rp.ic svg { width: 30px; height: 30px; color: #9aa6b8; }
.rp .pill { position: absolute; left: 6px; top: 6px; font-size: 10.5px; padding: 2px 8px; }
.rtop a:hover .rp { transform: translateY(-3px); }
.rtop b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtop em { font: 600 13px var(--num); font-style: normal; color: var(--ink-2); }
@media (max-width: 1100px) { .mrow { grid-template-columns: minmax(0, 1fr); } .rd-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rd-top { grid-column: 1 / -1; } .rtop { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .pact .psum { width: 100%; }
  .psum span { padding: 7px 11px; font-size: 12px; flex: 1; justify-content: center; }
  #pmap { height: 300px; border-radius: 14px; }
  .mapP { padding: 6px !important; }
  .mlegend { left: 12px; bottom: 12px; right: 12px; gap: 8px; font-size: 11px; padding: 6px 10px; }
  .ritem { padding: 12px; }
  .rd-h { grid-template-columns: auto minmax(0, 1fr); row-gap: 12px; }
  .rd-v { grid-column: 1 / -1; text-align: left; display: flex; align-items: baseline; gap: 10px; }
  .rd-go { grid-column: 1 / -1; justify-content: center; }
  .rd-h h2 { font-size: 21px; }
  .rd-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rtop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.main .rlist, .main .rdetail { padding: 22px; }
@media (max-width: 860px) { .main .rlist, .main .rdetail { padding: 16px; } }
.mreset { position: absolute; left: 20px; top: 20px; z-index: 500; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: #fff; font-weight: 600; font-size: 13px; color: var(--ink); box-shadow: 0 6px 16px -8px rgba(22,27,38,.35); }
.mreset svg { width: 16px; height: 16px; color: var(--org-d); }
.mreset[hidden] { display: none; }
.mapP.sat .rbub:not(.on) { background: rgba(255,255,255,.88); }
.apin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff center/cover; box-shadow: 0 0 0 3px var(--c), 0 0 0 5px #fff, 0 6px 14px rgba(0,0,0,.35); cursor: pointer; transition: transform .25s cubic-bezier(.3,1.5,.5,1); }
.apin:hover { transform: scale(1.18); }
.apin.ic svg { width: 16px; height: 16px; color: var(--ink-2); }
@media (max-width: 860px) { .rbub b { font-size: 10px; } .rbub span { font-size: 9.5px; } #pmap { height: 340px; } }

/* ---------- Hali ya mali: assets that aren't clean, one row each with their status chips ---------- */
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpis .kpi .k-ic.g { background: var(--green-s); color: var(--green); }
.hsl { display: grid; gap: 2px; }
.hsr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 18px; gap: 14px; align-items: center; padding: 12px 10px; border-radius: 14px; color: inherit; text-decoration: none; transition: background .2s; }
.hsr:hover { background: var(--soft); }
.hsr .thumb { width: 52px; height: 52px; }
.hst { min-width: 0; }
.hst b { display: block; font-weight: 600; font-size: 14px; }
.hst small { color: var(--mute); font-size: 12px; }
.ichs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ich { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.ich svg { width: 14px; height: 14px; }
.ich.bad { background: var(--red-s); color: var(--red); }
.ich.warn { background: var(--org-s); color: var(--org-d); }
.ich.info { background: var(--blue-s); color: var(--blue); }
.ich.ok { background: var(--green-s); color: var(--green); }
.hsv { font: 600 14px var(--num); white-space: nowrap; }
.hsr .go { width: 16px; height: 16px; color: var(--mute); }
.hsclear { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px; padding: 12px 10px; border-radius: 14px; background: var(--soft); cursor: pointer; font-size: 13px; }
.hsclear:hover { background: var(--line); }
.hsc { margin-top: 6px; }
@media (max-width: 860px) {
  .kpis.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.three > .kpi:last-child { grid-column: 1 / -1; }
  .hsr { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 12px 4px; }
  .hsr .thumb { width: 44px; height: 44px; }
  .hsr .go { display: none; }
  /* long chips wrap instead of pushing the page sideways */
  .ich { white-space: normal; max-width: 100%; line-height: 1.3; }
}/* Hali ya mali: an amount owed is shown in red; the "Nzuri" line closes the page */
.arow .av.owe { color: var(--red); }
.goodp .hsclear { margin-top: 0; }
.goodp .arow:first-of-type { margin-top: 10px; }/* asset page, land: legal status and ownership term under the summary facts */
.dlegal { display: grid; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.dl-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.dl-k { font-size: 12.5px; color: var(--mute); padding-top: 4px; }
.dl-v { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dl-term { display: grid; gap: 8px; }
.dl-yrs { font-size: 13px; color: var(--ink-2); }
.dl-yrs b { font: 600 14px var(--num); color: var(--ink); }
.dl-yrs em { font-style: normal; font-weight: 600; color: var(--green); }
.dl-yrs em.soon { color: var(--org-d); }
.dl-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.dl-bar i { display: block; height: 100%; border-radius: 4px; background: var(--c-land); }
.dl-bar.soon i { background: var(--org); }
@media (max-width: 860px) { .dl-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } .dl-k { padding-top: 0; } }
/* ---------- Export: the "Pakua" menu ---------- */
.dx { position: relative; }
.dx .chev { width: 14px; height: 14px; margin-left: 2px; color: var(--mute); }
.dx-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 1100; min-width: 220px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); animation: menuIn .2s cubic-bezier(.2,.7,.2,1); }
.dx-menu[hidden] { display: none; }
.dx-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; text-align: left; }
.dx-menu button:hover { background: var(--soft); }
.dx-menu button svg { width: 18px; height: 18px; color: var(--org-d); }
.dtools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#printArea { display: none; }
/* phones: the page buttons sit on the left there, so their menu opens to the right */
@media (max-width: 860px) { .pact .dx-menu { left: 0; right: auto; } }

/* ---------- Print and PDF ---------- */
@media print {
  /* no page margin, so the browser prints no date, title or web address around the page; the margin is
     padding inside the document instead. Lists print landscape (a named page), single records portrait. */
  @page { size: A4; margin: 0; }
  @page wide { size: A4 landscape; margin: 0; }
  body.printing #printArea { padding: 0 13mm; }
  .pa-page { width: 100%; border-collapse: collapse; }
  .pa-page > thead, .pa-page > tfoot { display: table-header-group; }
  .pa-page > tfoot { display: table-footer-group; }
  .pa-page > * > tr > td { padding: 0; }
  .pa-sp { height: 11mm; }
  /* the confidential line sits in the footer that repeats on every page */
  .pa-fs { height: 13mm; display: flex; align-items: flex-end; padding-bottom: 6mm; box-sizing: border-box; color: #677084; font-size: 9px; border-top: 1px solid #e3e7ee; margin-top: 4mm; }
  /* Ripoti cards inside the document: two per row, kept whole */
  #printArea .rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #printArea .rgrid .wide { grid-column: 1 / -1; }
  #printArea .rgrid .panel { box-shadow: none; border: 1px solid #e3e7ee; break-inside: avoid; }
  #printArea .tsvg .yl, #printArea .tsvg .projt { font-size: 11px; }
  #printArea .movers { grid-template-columns: 1fr 1fr; gap: 28px; }
  #printArea .ins { grid-template-columns: 1fr 1fr; column-gap: 28px; }
  #printArea .rbox { padding: 16px 18px; }
  /* the report's cards are scaled down a little so two fit on a landscape page */
  #printArea .rgrid { zoom: .74; }
  #printArea .tsvg { max-height: 330px; }
  body.printing #printArea.wide { page: wide; }
  body.print-page .main { padding: 12mm 13mm; }
  html, body { background: #fff !important; }
  .toast, .dx, .tabs, .eg-loader { display: none !important; }
  /* a one-off document (a filtered list, an asset summary) */
  body.printing .app { display: none !important; }
  body.printing #printArea { display: block; color: #161b26; font: 11px/1.45 "Schibsted Grotesk", system-ui, sans-serif; }
  .pa-h { display: flex; align-items: center; gap: 18px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid #f39200; }
  .pa-h img { width: 150px; }
  .pa-h h1 { font: 600 18px "Bricolage Grotesque", system-ui, sans-serif; margin: 0; }
  .pa-h p { margin: 3px 0 0; color: #677084; font-size: 11px; }
  .pa-f { margin-top: 16px; padding-top: 8px; border-top: 1px solid #e3e7ee; color: #677084; font-size: 9.5px; }
  .pa-t { width: 100%; border-collapse: collapse; }
  .pa-t th { text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: #677084; border-bottom: 1px solid #c9cfda; padding: 5px 6px; }
  .pa-t td { padding: 5px 6px; border-bottom: 1px solid #edf0f4; vertical-align: top; }
  .pa-t tr { break-inside: avoid; }
  .pa-t .n { text-align: right; white-space: nowrap; }
  .pa-t .id { white-space: nowrap; }
  .pa-t tr.tot td { font-weight: 700; border-top: 1.5px solid #161b26; border-bottom: 0; padding-top: 7px; }
  .pa-t thead { display: table-header-group; }
  .pa-t .pill { font-size: 9.5px; padding: 2px 7px; white-space: nowrap; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pa-sec { margin-top: 14px; break-inside: avoid; }
  .pa-sec h2 { font: 600 13px "Bricolage Grotesque", system-ui, sans-serif; margin: 0 0 6px; }
  .pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
  .pa-grid div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #edf0f4; }
  .pa-grid span { color: #677084; }
  .pa-grid b { white-space: nowrap; }
  .pa-dl > div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid #edf0f4; }
  .pa-dl dt { color: #677084; margin: 0; } .pa-dl dd { margin: 0; font-weight: 600; text-align: right; }
  .pa-b .xlist, .pa-b .fx-grid { gap: 2px 16px; } .pa-b .ddoc { padding: 4px 0; } .pa-b .nexts { padding: 8px; }
  .pa-top { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
  .pa-top img { width: 200px; height: 140px; object-fit: cover; border-radius: 8px; }
  .pa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
  .pa-b .ich, .pa-b .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* the page itself (Ripoti): no sidebar, top bar or buttons; every block visible and kept whole */
  body.print-page .side, body.print-page .top, body.print-page .pact { display: none !important; }
  body.print-page .app { display: block; padding: 0; }
  body.print-page .panel { box-shadow: none !important; border: 1px solid #e3e7ee; break-inside: avoid; }
  body.print-page .rgrid { display: block; }
  body.print-page .rgrid > * { margin-bottom: 12px; }
  body.print-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  [data-mk-reveal] { opacity: 1 !important; transform: none !important; }
}
/* ---------- tick boxes (download tray) ---------- */
.pick { flex: none; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px #c3c9d4; background: #fff; display: inline-grid; place-items: center; cursor: pointer; margin-right: 12px; position: relative; transition: background .15s, box-shadow .15s; }
.pick:hover { box-shadow: inset 0 0 0 1.5px var(--org); }
.pick svg { width: 13px; height: 13px; color: var(--ink); opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s cubic-bezier(.22,1,.36,1); }
.pick.on { background: var(--org); box-shadow: inset 0 0 0 1.5px var(--org); }
.pick.on svg { opacity: 1; transform: none; }
.pick.all i { position: absolute; width: 9px; height: 2px; border-radius: 2px; background: var(--ink); opacity: 0; }
.pick.all.some { box-shadow: inset 0 0 0 1.5px var(--org); }
.pick.all.some i { opacity: 1; }
.pick.off { visibility: hidden; }
.pick:focus-visible { outline: 2px solid var(--org); outline-offset: 2px; }
.tbl .thead > span:first-child, .dtbl .dhead > span:first-child { display: flex; align-items: center; }
.tbl .tr.picked, .dtbl .drow2.picked { background: #fff7ea; }
.acard .pick { position: absolute; top: 16px; left: 16px; z-index: 3; margin: 0; box-shadow: inset 0 0 0 1.5px #c3c9d4, 0 4px 12px -4px rgba(22,27,38,.35); opacity: 0; transition: opacity .2s, background .15s; }
.acard:hover .pick, .acard .pick.on, body.has-tray .acard .pick { opacity: 1; }
@media (hover: none) { .acard .pick { opacity: 1; } }
.acard.picked { box-shadow: 0 0 0 2px var(--org); }
.ltools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 6px; }

/* ---------- the tray bar ---------- */
.tray { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; background: var(--dark, #161b26); color: #fff; border-radius: 20px; box-shadow: 0 24px 60px -18px rgba(22,27,38,.55); animation: trayIn .35s cubic-bezier(.22,1,.36,1); }
.tray[hidden] { display: none; }
@keyframes trayIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.tr-sum { display: flex; align-items: center; gap: 10px; color: #fff; text-align: left; padding: 2px 8px 2px 0; }
.tr-n { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 11px; background: var(--org); color: var(--ink); display: grid; place-items: center; font: 700 15px var(--num); }
.tr-t b { display: block; font-size: 13.5px; }
.tr-t small { display: block; font-size: 11.5px; color: #aab1c0; white-space: nowrap; }
.tr-sum .chev { width: 14px; height: 14px; color: #aab1c0; transform: rotate(180deg); }
.tr-dl { position: relative; }
.tr-x { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.tr-x:hover { background: rgba(255,255,255,.16); }
.tr-x svg { width: 16px; height: 16px; }
.tr-menu, .tr-pop { position: absolute; bottom: calc(100% + 10px); color: var(--ink); z-index: 2; box-shadow: 0 24px 60px -20px rgba(22,27,38,.35), 0 0 0 1px var(--line); animation: menuIn .2s; }
.tr-menu[hidden], .tr-pop[hidden] { display: none; }
.tr-menu { right: 0; min-width: 270px; padding: 6px; display: grid; gap: 2px; }
.tr-menu button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; text-align: left; }
.tr-menu button:hover { background: var(--soft); }
.tr-menu button svg { width: 18px; height: 18px; color: var(--org-d); }
.tr-pop { left: 0; width: 380px; max-height: 52vh; overflow: auto; padding: 14px; }
.tr-pop header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tr-pop header b { font: 600 15px var(--num); }
.tr-pop header button { color: var(--org-d); font-weight: 600; font-size: 13px; }
.tr-pop h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); margin: 12px 0 4px; }
.tr-pop h4 em { font-style: normal; margin-left: 4px; }
.tr-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.tr-row > svg { width: 18px; height: 18px; color: var(--mute); }
.tr-row b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-row small { display: block; font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-row button { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--mute); }
.tr-row button:hover { background: var(--soft); color: var(--red, #c0392b); }
.tr-row button svg { width: 14px; height: 14px; }
body.has-tray .main { padding-bottom: 96px; }
body.has-tray .toast { bottom: 96px; }

/* ---------- Ripoti: report list + the report as a document ---------- */
.rlayout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.rlist2 { position: sticky; top: 16px; padding: 20px 14px 14px; }
.rlist2 .ph { padding: 0 8px; }
.rlist2 .ph span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; }
.rpicks { display: grid; gap: 4px; }
.rpick { display: flex; align-items: center; border-radius: 14px; padding-right: 8px; transition: background .2s; }
.rpick:hover { background: var(--soft); }
.rpick.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--org); }
.rpick .pick { margin: 0; }
.rp-open { flex: 1; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; min-width: 0; }
.rp-open .k-ic { width: 38px; height: 38px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; flex: none; color: var(--org-d); }
.rp-open .k-ic svg { width: 20px; height: 20px; }
.rpick.on .rp-open .k-ic { background: var(--org); color: var(--ink); box-shadow: none; }
.rp-tx { min-width: 0; }
.rp-tx b { display: block; font-size: 14px; }
.rp-tx small { display: block; color: var(--mute); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.rview { display: grid; gap: 16px; min-width: 0; }
.rv-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 22px; }
.rv-bar h3 { font: 600 17px var(--num); }
.rv-bar .muted { font-size: 13px; }
.paperwrap { overflow-x: auto; padding: 2px 2px 12px; }
.paper { background: #fff; color: #161b26; max-width: 1080px; margin: 0 auto; padding: 44px 48px 36px; border-radius: 4px; box-shadow: 0 1px 2px rgba(22,27,38,.06), 0 24px 60px -30px rgba(22,27,38,.35); font: 12.5px/1.5 "Schibsted Grotesk", system-ui, sans-serif; }
.paper:not(.wide) { max-width: 840px; }
.paper.wide { padding: 36px 30px 30px; }
.paper.wide .rp-t th, .paper.wide .rp-t td { padding: 5px 6px; }
.rp-lh { display: grid; grid-template-columns: 150px 1fr 150px; gap: 20px; align-items: center; padding-bottom: 14px; border-bottom: 3px double #161b26; }
.rp-lh img { width: 150px; }
.rp-co { text-align: center; }
.rp-co b { display: block; font: 700 17px/1.25 "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: .07em; }
.rp-co span { color: #677084; font-size: 11.5px; }
.rp-ref { text-align: right; font-size: 10.5px; color: #677084; }
.rp-ref b { display: block; color: #161b26; font-weight: 600; font-size: 11.5px; }
.rp-title { text-align: center; margin: 20px 0 18px; }
.rp-title h1 { font: 700 20px/1.2 "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: .08em; }
.rp-title p { color: #677084; font-size: 11.5px; letter-spacing: .04em; margin-top: 5px; }
.rp-title p span { margin-right: .7em; padding-right: .7em; border-right: 1px solid #c9cfda; }
.rp-lead { margin: 0 0 14px; color: #2c3445; max-width: 78em; }
.rp-kf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #c9cfda; margin-bottom: 16px; }
.rp-kf div { padding: 10px 14px; border-right: 1px solid #c9cfda; }
.rp-kf div:last-child { border-right: 0; }
.rp-kf span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #677084; }
.rp-kf b { font: 700 16px "Bricolage Grotesque", system-ui, sans-serif; white-space: nowrap; }
.rp-sec { margin-top: 20px; }
.rp-sec h2 { display: flex; gap: 8px; font: 700 12.5px "Bricolage Grotesque", system-ui, sans-serif; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.rp-sec h2 span { color: var(--org-d); }
.rp-sec h2 em { font-style: normal; color: #677084; font-weight: 500; }
.rp-t { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.rp-t th, .rp-t td { border: 1px solid #c9cfda; padding: 6px 8px; vertical-align: top; }
.rp-t th { background: #f1f3f7; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; text-align: left; font-weight: 700; color: #2c3445; vertical-align: bottom; }
.rp-t .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-t .c { text-align: center; width: 34px; }
.rp-t .id { white-space: nowrap; }
.rp-t th.n { white-space: normal; min-width: 7em; }
.rp-t td small { display: block; color: #677084; font-size: 10.5px; }
.rp-t thead { display: table-header-group; }
.rp-t tr { break-inside: avoid; }
.rp-t tr.band td { font-weight: 700; letter-spacing: .06em; font-size: 10.5px; padding: 7px 8px; background: #fdebd0; }
.rp-t tr.b-land td { background: color-mix(in srgb, var(--c-land) 20%, #fff); }
.rp-t tr.b-vehicle td { background: color-mix(in srgb, var(--c-vehicle) 20%, #fff); }
.rp-t tr.b-plant td { background: color-mix(in srgb, var(--c-plant) 20%, #fff); }
.rp-t tr.b-equip td { background: color-mix(in srgb, var(--c-equip) 20%, #fff); }
.rp-t tr.sub td { font-weight: 700; background: #fafbfc; }
.rp-t tr.tot td { font-weight: 800; border-top: 2px solid #161b26; background: #fff7ea; }
.rp-t .neg { color: #c0392b; }
.rp-t .okt { color: #1e8e5a; font-weight: 600; }
.rp-t .pill { font-size: 10px; padding: 2px 8px; white-space: nowrap; }
.rp-kv th { width: 18%; text-transform: none; font-size: 11.5px; letter-spacing: 0; background: #f7f8fa; font-weight: 600; color: #677084; vertical-align: top; }
.rp-asset { display: flex; gap: 18px; align-items: center; margin-bottom: 6px; }
.rp-asset img { width: 180px; height: 120px; object-fit: cover; border-radius: 4px; }
.rp-asset h2 { font: 600 20px "Bricolage Grotesque", system-ui, sans-serif; }
.rp-asset p { color: #677084; margin: 2px 0 8px; }
.rp-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 34px; break-inside: avoid; }
.rp-sign span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #677084; }
.rp-sign b { display: block; margin-top: 4px; font-size: 12.5px; min-height: 1.4em; }
.rp-sign i { display: block; border-bottom: 1px solid #161b26; height: 34px; }
.rp-sign small { color: #677084; font-size: 10.5px; }
.rp-note { margin-top: 14px; color: #8a92a3; font-size: 10px; font-style: italic; }
.paper .pill, .rp-t tr.band td, .rp-t tr.tot td, .rp-t th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.paper { min-width: 700px; }
.paper.wide { min-width: 860px; }
@media (max-width: 1280px) {
  .rlayout { grid-template-columns: minmax(0, 1fr); }
  .rlist2 { position: static; }
  .rlist2 .ph span { display: none; }
  .rlist2 .ph { margin-bottom: 10px; }
  .rpicks { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 2px; scrollbar-width: none; }
  .rpicks::-webkit-scrollbar { display: none; }
  .rpick { flex: 0 0 auto; background: var(--soft); padding-right: 10px; }
  .rpick.on { box-shadow: inset 0 0 0 2px var(--org); }
  .rp-tx small { display: none; }
  .rp-tx b { white-space: nowrap; }
}
@media (max-width: 860px) {
  .rlayout { grid-template-columns: minmax(0, 1fr); }
  .rlist2 { position: static; padding: 16px 12px 12px; }
  .rlist2 .ph { padding: 0 4px; margin-bottom: 10px; }
  .rlist2 .ph span { display: none; }
  .rpicks { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 2px; scrollbar-width: none; }
  .rpicks::-webkit-scrollbar { display: none; }
  .rpick { flex: 0 0 auto; background: var(--soft); padding-right: 10px; }
  .rpick.on { box-shadow: inset 0 0 0 2px var(--org); }
  .rp-open { padding: 8px; gap: 10px; }
  .rp-open .k-ic { width: 32px; height: 32px; border-radius: 10px; }
  .rp-tx b { font-size: 13px; white-space: nowrap; }
  .rv-bar { padding: 14px 16px; }
  .paperwrap { padding: 10px; border-radius: 12px; }
  .paper { padding: 22px 18px 20px; font-size: 11.5px; }
  .paper.wide { min-width: 860px; }
  .rp-lh { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .paper.wide .rp-lh { grid-template-columns: 150px 1fr 150px; justify-items: stretch; }
  .rp-ref { text-align: center; }
  .paper.wide .rp-ref { text-align: right; }
  .rp-kf { grid-template-columns: 1fr 1fr; }
  .rp-kf div:nth-child(2) { border-right: 0; }
  .rp-kf div:nth-child(-n+2) { border-bottom: 1px solid #c9cfda; }
  .rp-sign { gap: 20px; }
  .rp-asset { flex-direction: column; align-items: flex-start; }
  .tray { left: 12px; right: 12px; transform: none; bottom: calc(92px + env(safe-area-inset-bottom) * .5); border-radius: 18px; }
  @keyframes trayIn { from { opacity: 0; transform: translateY(16px); } }
  .tr-t small { white-space: normal; }
  .tr-sum { flex: 1; min-width: 0; }
  .tr-dl .btn-o span { display: none; }
  .tr-dl .btn-o { padding: 10px 12px; }
  .tr-pop { width: auto; left: 0; right: 0; }
  body.has-tray .main { padding-bottom: 170px; }
  body.has-tray .toast { bottom: 170px; }
  .ltools { padding: 0 2px; }
}

@media print {
  #printArea.plain .paper { box-shadow: none; padding: 0; max-width: none; min-width: 0; margin: 0; border-radius: 0; font-size: 10.5px; }
  #printArea .paper + .paper { break-before: page; }
  #printArea .rp-t { font-size: 9.5px; }
  #printArea .rp-t th, #printArea .rp-t td { padding: 4px 6px; }
  #printArea .rp-lh img { width: 130px; }
  #printArea .rp-lh { grid-template-columns: 130px 1fr 130px; }
  #printArea .rp-lh { justify-items: stretch; }
  #printArea .rp-ref { text-align: right; }
  #printArea .rp-kf { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; }
  #printArea .rp-kf div { border-right: 1px solid #c9cfda; border-bottom: 0; padding: 8px 12px; }
  #printArea .rp-kf div:last-child { border-right: 0; }
  #printArea .rp-kf b { font-size: 14px; }
  #printArea .rp-title { margin: 14px 0 12px; }
  #printArea .rp-sec { margin-top: 14px; }
  #printArea .rp-sign { margin-top: 22px; }
  #printArea .rp-sign i { height: 26px; }
  #printArea .rp-asset { flex-direction: row; align-items: center; }
  #printArea .rp-sec h2 { break-after: avoid; }
  #printArea .paper[data-asset] .rp-sec { break-inside: avoid; }
  #printArea .rp-asset img { width: 150px; height: 100px; }
  .tray { display: none !important; }
}
/* the top bar fits at tablet widths: the search box gives way first */
.top .search, .top .search input { min-width: 0; }
@media (min-width: 861px) { .top .search { min-width: 220px; } }

/* Pakua always sits at the far end of its row (as on Hali ya mali), also when the tools wrap on phones */
.tools > .dx { margin-left: auto; }
@media (max-width: 860px) { .tools > .dx { grid-column: -2 / -1; justify-self: end; } }

/* ---------- Ripoti in the list-page style: chips, view switch, then the document or the workbook ---------- */
.rpanel .tools { flex: 1 1 100%; }
.rpanel .rp-about { margin: -2px 0 14px; font-size: 13.5px; }
.rpanel .paperwrap { background: var(--soft); border-radius: 16px; padding: 24px; }
.xl { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.xl-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.xl-bar svg { width: 18px; height: 18px; color: #1d6f42; }
.xl-bar span { color: var(--mute); }
.xl-scroll { overflow: auto; max-height: 68vh; }
.xl-t { border-collapse: separate; border-spacing: 0; font: 12px/1.35 "Segoe UI", "Schibsted Grotesk", system-ui, sans-serif; table-layout: fixed; width: max-content; color: #161b26; }
.xl-t col.rn { width: 42px; }
.xl-t th { position: sticky; top: 0; z-index: 3; background: #f3f5f9; color: #677084; font-weight: 500; font-size: 11px; height: 22px; border-right: 1px solid #dfe3ea; border-bottom: 1px solid #dfe3ea; text-align: center; }
.xl-t td { border-right: 1px solid #e6e9ef; border-bottom: 1px solid #e6e9ef; padding: 4px 6px; vertical-align: top; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-t .rn { position: sticky; left: 0; z-index: 2; background: #f3f5f9; color: #677084; text-align: center; font-size: 11px; padding: 4px 0; }
.xl-t thead th.rn { z-index: 5; }
.xl-t tr.lh td:not(.rn) { text-align: center; font-weight: 700; border-right: 0; font-size: 13px; padding: 6px; }
.xl-t tr.l0 td:not(.rn) { font-size: 17px; padding: 9px 6px; }
.xl-t tr.l2 td:not(.rn) { font-size: 14px; }
.xl-t tr.bd td:not(.rn) { background: var(--tab); text-align: center; font-weight: 700; font-size: 13px; padding: 7px 6px; }
.xl-t tr.hd td { position: sticky; top: 23px; z-index: 2; background: #eef1f5; font-weight: 700; text-align: center; white-space: normal; vertical-align: middle; font-size: 10.5px; height: 46px; }
.xl-t tr.hd td.rn { z-index: 4; background: #f3f5f9; font-weight: 500; }
.xl-t td.n { text-align: right; font-variant-numeric: tabular-nums; }
.xl-t td.c { text-align: center; }
.xl-t tr.sb td:not(.rn) { background: #f6f7f9; font-weight: 700; }
.xl-t tr.tt td:not(.rn) { background: #fff3e0; font-weight: 700; border-top: 2px solid #161b26; }
.xl-t tbody tr:not(.lh):not(.bd):not(.hd):hover td:not(.rn) { background: #fff7ea; }
.xl-tabs { display: flex; gap: 2px; padding: 0 10px; background: var(--soft); border-top: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.xl-tabs button { padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: var(--mute); border-bottom: 3px solid transparent; white-space: nowrap; }
.xl-tabs button:hover { color: var(--ink); }
.xl-tabs button.on { background: #fff; color: var(--ink); border-bottom-color: var(--tab); }
@media (max-width: 860px) {
  .rpanel .paperwrap { padding: 10px; }
  .xl-scroll { max-height: 62vh; }
}
/* ---------- background switch: grey (default) or the logo orange; nothing else changes ---------- */
.bgseg button { padding: 7px 9px; }
.bgseg i { display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(22,27,38,.15); }
.bgseg [data-bg="grey"] i { background: #eef1f6; }
.bgseg [data-bg="orange"] i { background: #f39200; }

@media (max-width: 860px) { .bgseg button { padding: 6px 7px; } .bgseg i { width: 14px; height: 14px; } }
/* ---------- document viewer: view / download buttons on document rows, and the viewing window ---------- */
.dv-row { margin-left: auto; display: inline-flex; gap: 2px; flex: none; }
@media (min-width: 1101px) { .dtbl .dhead, .dtbl .drow2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.5fr) 110px 90px 150px 76px; } }
@media (min-width: 861px) and (max-width: 1100px) { .dtbl .dhead, .dtbl .drow2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) 140px 76px; } }
.dv { position: fixed; inset: 0; z-index: 1400; background: rgba(22,27,38,.55); display: grid; place-items: center; padding: 24px; animation: dvIn .2s; }
.dv[hidden] { display: none; }
@keyframes dvIn { from { opacity: 0; } }
.dv-box { width: min(980px, 100%); height: min(92vh, 1100px); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0; overflow: hidden; animation: menuIn .25s; }
.dv-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); }
.dv-h .fi { width: 36px; height: 42px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font: 700 10px var(--num); color: var(--org-d); flex: none; }
.dv-t { min-width: 0; }
.dv-t b { display: block; font-size: 15px; }
.dv-t small { display: block; color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-act { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.dv-x { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); }
.dv-x:hover { background: var(--soft); }
.dv-x svg { width: 18px; height: 18px; }
.dv-b { overflow: auto; background: var(--soft); padding: 28px; }
.dv-paper { position: relative; overflow: hidden; }
.dv-mark { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font: 800 64px "Bricolage Grotesque", system-ui, sans-serif; letter-spacing: .1em; color: rgba(243,146,0,.12); white-space: nowrap; pointer-events: none; text-transform: uppercase; }
.dv-pics { display: grid; gap: 12px; }
.dv-pics > img { width: 100%; max-height: 64vh; object-fit: contain; border-radius: 12px; background: #fff; }
.dv-th { display: flex; gap: 8px; flex-wrap: wrap; }
.dv-th button { width: 84px; height: 60px; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); opacity: .7; }
.dv-th button.on { box-shadow: 0 0 0 2px var(--org); opacity: 1; }
.dv-th img { width: 100%; height: 100%; object-fit: cover; }
body.dv-open { overflow: hidden; }
#printArea .dv-mark { font-size: 90px; }
@media (max-width: 860px) {
  .dv { padding: 0; place-items: stretch; }
  .dv-box { width: 100%; height: 100%; border-radius: 0; }
  .dv-h { padding: 12px; flex-wrap: wrap; }
  .dv-act { width: 100%; }
  .dv-act .btn-l, .dv-act .btn-o { flex: 1; justify-content: center; }
  .dv-b { padding: 12px; }
  .dv-paper { min-width: 0 !important; }
  .dv-mark { font-size: 40px; }
  .dtbl .drow2 > .dv-row { grid-column: 2; justify-self: end; }
}
/* asset page: the document list scrolls inside its block once it holds more than about five documents */
.dbox .dlist { max-height: 318px; overflow-y: auto; margin-right: -8px; padding-right: 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cfd5df transparent;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 22px), transparent); mask-image: linear-gradient(#000 calc(100% - 22px), transparent); }
.dbox .dlist.end { -webkit-mask-image: none; mask-image: none; }
.dbox .dlist:not(.more) { -webkit-mask-image: none; mask-image: none; }
/* background switch inside the Administrator menu */
.me-bg { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; border-radius: 10px; font-weight: 600; font-size: 13.5px; }
.me-bg > svg { width: 18px; height: 18px; color: var(--ink-2); }
.me-bg .bgseg { margin-left: auto; }
.me-bg > span { white-space: nowrap; }
.me-menu { background: #fff; }

/* ---------- phones: full-width top bar, bottom bar with a raised search button, search screen ---------- */
.tab-search, .msearch { display: none; }
@media (max-width: 860px) {
  .app { padding: 0 12px 112px; }
  .top { position: sticky; top: 0; margin: 0 -12px; border-radius: 0; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; box-shadow: 0 1px 0 var(--line); gap: 10px; flex-wrap: nowrap; }
  .top .search { display: none; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: center; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom) * .5); height: 66px; padding: 0 6px; border-radius: 999px; box-shadow: 0 18px 40px -16px rgba(22,27,38,.35), 0 0 0 1px var(--line); }
  .tabs a { padding: 6px 2px; font-size: 11px; gap: 4px; color: var(--mute); background: none; }
  .tabs a svg { width: 23px; height: 23px; }
  .tabs a.on { background: none; color: var(--ink); }
  .tabs a.on svg { color: var(--org); }
  .tabs .badge { top: 1px; right: calc(50% - 22px); }
  .tab-search { display: grid; place-items: center; justify-self: center; width: 62px; height: 62px; border-radius: 50%; background: var(--org); color: var(--ink); margin-top: -30px; box-shadow: 0 0 0 6px #fff, 0 12px 24px -8px rgba(243,146,0,.75); transition: transform .2s cubic-bezier(.22,1,.36,1); }
  .tab-search:active { transform: scale(.94); }
  .tab-search svg { width: 26px; height: 26px; }
  .msearch { position: fixed; inset: 0; z-index: 1500; background: var(--bg); display: flex; flex-direction: column; padding: calc(12px + env(safe-area-inset-top)) 12px 12px; animation: msIn .25s cubic-bezier(.22,1,.36,1); }
  .msearch[hidden] { display: none; }
  @keyframes msIn { from { opacity: 0; transform: translateY(18px); } }
  .ms-h { display: flex; gap: 8px; align-items: center; }
  .ms-h .search { display: flex; flex: 1; max-width: none; height: 48px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
  .ms-h .search:focus-within { box-shadow: 0 0 0 2px var(--org); }
  .ms-h .search input { font-size: 16px; }
  .ms-back { width: 48px; height: 48px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; flex: none; }
  .ms-back svg { width: 20px; height: 20px; }
  .ms-hint { color: var(--mute); font-size: 13.5px; padding: 16px 6px 0; }
  .ms-res { position: static; margin-top: 12px; max-height: none; flex: 1; overflow: auto; box-shadow: 0 0 0 1px var(--line); }
  .ms-res:not([hidden]) + .ms-hint, .msearch:has(.ms-res:not([hidden])) .ms-hint { display: none; }
  body.ms-open { overflow: hidden; }
  body.has-tray .main { padding-bottom: 180px; }
  .tray { bottom: calc(96px + env(safe-area-inset-bottom) * .5); }
}
/* bottom bar, closer to the reference: taller pill, no outline, soft wide shadow; the search circle sits
   inside the bar (not above it); active item = orange outline icon + dark label */
@media (max-width: 860px) {
  .tabs { height: 74px; padding: 0 8px; grid-template-columns: 1fr 1fr 72px 1fr 1fr; box-shadow: 0 14px 34px -8px rgba(22,27,38,.22), 0 2px 6px rgba(22,27,38,.05); }
  .tabs a { font-size: 11.5px; font-weight: 500; gap: 5px; color: #8a92a3; }
  .tabs a svg { width: 25px; height: 25px; color: #8a92a3; }
  .tabs a.on { color: var(--ink); font-weight: 600; }
  .tabs a.on svg { color: var(--org); }
  .tab-search { width: 58px; height: 58px; margin-top: 0; box-shadow: 0 10px 22px -8px rgba(243,146,0,.8); }
  .tab-search svg { width: 25px; height: 25px; color: #fff; }
  .tray { bottom: calc(100px + env(safe-area-inset-bottom) * .5); }
}
/* ---------- skeleton: grey shapes in the page's layout, shimmering while the content loads ---------- */
.skel { display: none; }
body.skel-on .main > :not(.top):not(.skel) { display: none !important; }
body.skel-on .skel { display: grid; gap: 16px; align-content: start; }
.sk { display: block; background: linear-gradient(90deg, #e6eaf0 0%, #f3f5f9 45%, #e6eaf0 90%); background-size: 220% 100%; animation: skm 1.25s linear infinite; border-radius: 7px; flex: none; max-width: 100%; }
@keyframes skm { from { background-position: 120% 0; } to { background-position: -100% 0; } }
.sk-p { background: #fff; border-radius: 22px; padding: 22px; display: grid; gap: 12px; align-content: start; box-shadow: 0 1px 2px rgba(22,27,38,.04); }
.sk-p .sk { background-image: linear-gradient(90deg, #edf0f4 0%, #f7f8fa 45%, #edf0f4 90%); }
.sk-head { display: grid; gap: 10px; padding: 6px 6px 0; }
.sk-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sk-kpis.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sk-kpi { gap: 10px; }
.sk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sk-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sk-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.sk-row span { display: grid; gap: 7px; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.sk-grid span { display: grid; gap: 6px; }
.sk-media { padding: 0; }
.tgl { margin-left: auto; width: 42px; height: 24px; border-radius: 999px; background: #d5dae3; position: relative; transition: background .2s; flex: none; }
.tgl i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(22,27,38,.25); transition: transform .25s cubic-bezier(.22,1,.36,1); }
.tgl.on { background: var(--org); }
.tgl.on i { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
@media (max-width: 1100px) { .sk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sk-kpis.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  body.skel-on .skel { gap: 12px; padding-top: 12px; }
  .sk-kpis, .sk-kpis.five { display: flex; overflow: hidden; gap: 10px; margin-right: -12px; }
  .sk-kpis .sk-kpi { flex: 0 0 46%; }
  .sk-two { grid-template-columns: minmax(0, 1fr); }
  .sk-p { padding: 16px; border-radius: 20px; }
}
/* ---------- themes: light (default), dark, orange background ---------- */
body[data-theme="orange"] { --bg: #f39200; }
body[data-theme="orange"] .phead p, body[data-theme="orange"] .ltools .muted, body[data-theme="orange"] .hello p { color: rgba(22,27,38,.78); }

/* ---------- dark theme (generated) ---------- */
/* the colour variables flip; surfaces that were written as plain white take the panel colour (lists below
   are generated from this file); printed documents, report pages and the spreadsheet stay white like paper */
body[data-theme="dark"] {
  --bg: #0e1219; --panel: #171c26; --ink: #e9ecf2; --ink-2: #b9c0cd; --mute: #8b94a6; --line: #262d3a; --soft: #1f2531; --track: #222937;
  --org-s: #3a2a12; --green: #3fbf88; --green-s: #13291f; --red: #ef6a55; --red-s: #35191a; --blue: #7fa2d6; --blue-s: #18233a; --amber-s: #302611;
  --dark: #0a0d13; --dark-2: #1b212c; --c-plant: #7389b5; --paid: #5fbf91; --owed: #ef5a48;
  color-scheme: dark;
}
body[data-theme="dark"] .lchip.v,
body[data-theme="dark"] .seg button.on,
body[data-theme="dark"] .search:focus-within,
body[data-theme="dark"] .results .r-all,
body[data-theme="dark"] .results,
body[data-theme="dark"] .seg.look a.on,
body[data-theme="dark"] .note,
body[data-theme="dark"] .next,
body[data-theme="dark"] .edit:hover,
body[data-theme="dark"] .tl-ic,
body[data-theme="dark"] .nexts .k-ic,
body[data-theme="dark"] .spec,
body[data-theme="dark"] .fullg section,
body[data-theme="dark"] .fullg header span,
body[data-theme="dark"] .fullg header em,
body[data-theme="dark"] .acard,
body[data-theme="dark"] .btn-l,
body[data-theme="dark"] .eye:hover:not(:disabled),
body[data-theme="dark"] .tabs,
body[data-theme="dark"] .fx-specs > div,
body[data-theme="dark"] .psum span,
body[data-theme="dark"] .ritem .rk,
body[data-theme="dark"] .ritem.on,
body[data-theme="dark"] .mreset,
body[data-theme="dark"] .apin,
body[data-theme="dark"] .me-menu,
body[data-theme="dark"] .ms-h .search,
body[data-theme="dark"] .ms-back,
body[data-theme="dark"] .sk-p { background: var(--panel); }

body[data-theme="dark"] .avatar,
body[data-theme="dark"] .dedit,
body[data-theme="dark"] .tl li.now .tl-ic,
body[data-theme="dark"] .acard:hover .ac-go,
body[data-theme="dark"] .btn-o,
body[data-theme="dark"] .tr-n,
body[data-theme="dark"] .rpick.on .rp-open .k-ic { color: #161b26; }

body[data-theme="dark"] .panel { box-shadow: 0 0 0 1px var(--line); }
body[data-theme="dark"] .attn, body[data-theme="dark"] .tray { box-shadow: 0 0 0 1px #2a3140; }
body[data-theme="dark"] .sk, body[data-theme="dark"] .sk-p .sk { background-image: linear-gradient(90deg, #1f2531 0%, #2a3140 45%, #1f2531 90%); }
body[data-theme="dark"] .pick { background: var(--panel); box-shadow: inset 0 0 0 1.5px #4a5262; }
body[data-theme="dark"] .pick.on { background: var(--org); box-shadow: inset 0 0 0 1.5px var(--org); }
body[data-theme="dark"] .tgl { background: #343c4b; }
body[data-theme="dark"] .tgl.on { background: var(--org); }
body[data-theme="dark"] .tabs { box-shadow: 0 0 0 1px var(--line), 0 14px 34px -8px rgba(0,0,0,.6); }
body[data-theme="dark"] .ac-alert { box-shadow: 0 0 0 3px var(--panel); }
body[data-theme="dark"] .rpanel .paperwrap { background: #10141c; }
body[data-theme="dark"] .msearch { background: var(--bg); }
body[data-theme="dark"] .dv { background: rgba(0,0,0,.65); }
body[data-theme="dark"] .dv-b { background: #10141c; }
body[data-theme="dark"] .search { background: var(--soft); }
body[data-theme="dark"] .results mark { background: #5a3d0f; }
body[data-theme="dark"] .ins-t i.o { background: var(--paid); }
body[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.82) contrast(1.05); }
body[data-theme="dark"] .logo, body[data-theme="dark"] .m-brand img { filter: invert(1) hue-rotate(180deg) saturate(1.4); }
.me-sel { margin-left: auto; }
.me-sel select { padding-right: 30px; }

body[data-theme="dark"] .kpis .kpi .k-ic.n { background: #222b3c; color: var(--c-plant); }
body[data-theme="dark"] .dtbl .drow2.miss { background: #241a1c; }
body[data-theme="dark"] .tw.zero i, body[data-theme="dark"] .tw i[style*="--h:0%"] { background: var(--line) !important; }

/* phones: the bottom bar sits on the bottom edge of the screen (no gap under it); the top corners stay
   rounded, the bottom ones meet the screen edge; on phones with a home bar it pads itself above it */
@media (max-width: 860px) {
  .tabs { bottom: 0; left: 10px; right: 10px; height: calc(74px + env(safe-area-inset-bottom) * .6); padding-bottom: calc(env(safe-area-inset-bottom) * .6); border-radius: 30px 30px 0 0; }
  .tray { bottom: calc(86px + env(safe-area-inset-bottom) * .6); }
  .app { padding-bottom: 96px; }
}

/* ---------- editing: forms (forms.js), records panel and asset toolbar (editors.js), settings page (p-admin.js) ---------- */
.fm { position: fixed; inset: 0; z-index: 1500; background: rgba(22,27,38,.55); display: grid; place-items: center; padding: 20px 16px; animation: dvIn .2s; }
.fm-box { width: min(620px, 100%); max-height: min(92vh, 1000px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: 0; overflow: hidden; animation: menuIn .25s; }
.fm-box.wide { width: min(900px, 100%); }
.fm-box.small { width: min(420px, 100%); grid-template-rows: auto auto; }
.fm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.fm-head b { font: 600 18px var(--num); display: block; }
.fm-head small { color: var(--mute); font-size: 13px; }
.fm-body { overflow-y: auto; padding: 8px 22px 18px; display: flex; flex-wrap: wrap; gap: 0 14px; align-content: flex-start; overscroll-behavior: contain; }
.fm-confirm .fm-body { padding: 22px; display: block; }
.fm-q { font: 600 17px var(--num); display: block; }
.fm-confirm p { color: var(--ink-2); margin-top: 6px; font-size: 14px; }
.fm-h { flex: 0 0 100%; font: 600 13px var(--ui); text-transform: uppercase; letter-spacing: .06em; color: var(--mute); margin: 18px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.fm-body > .fm-h:first-child { border-top: 0; padding-top: 4px; margin-top: 8px; }
.fm-f { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.fm-f[hidden] { display: none; } /* fields a form hides (password box, provider fields) */
.fm-f.half { flex: 1 1 calc(50% - 14px); }
.fm-f.third { flex: 1 1 calc(33.33% - 14px); }
.fm-f label { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.fm-f .req { color: var(--red); font-style: normal; }
.fm-f input:not([type=checkbox]), .fm-f select, .fm-f textarea { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--soft); border: 1px solid transparent; border-radius: 11px; padding: 10px 12px; }
.fm-f textarea { resize: vertical; min-height: 64px; }
.fm-f input:focus, .fm-f select:focus, .fm-f textarea:focus { outline: none; border-color: var(--org); background: #fff; }
.fm-f input[type=file] { padding: 8px; }
.fm-unit { display: flex; align-items: center; gap: 0; background: var(--soft); border-radius: 11px; }
.fm-unit em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--mute); padding: 0 10px; }
.fm-unit input { background: transparent !important; }
.fm-help { color: var(--mute); font-size: 12px; }
.fm-err { color: var(--red); font-size: 12px; font-style: normal; }
.fm-err:empty { display: none; }
.fm-f.bad input:not([type=checkbox]), .fm-f.bad select, .fm-f.bad textarea, .fm-f.bad .fm-loc select { border-color: var(--red); background: var(--red-s); }
.fm-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.fm-chk { display: inline-flex; align-items: center; gap: 8px; font-weight: 500 !important; font-size: 14px !important; color: var(--ink) !important; cursor: pointer; }
.fm-chk input { width: 17px; height: 17px; accent-color: var(--org); }
.fm-f.chk { justify-content: flex-end; }
.fm-loc { display: flex; flex-wrap: wrap; gap: 0 14px; }
.fm-loc .fm-f { margin-top: 6px; }
.fm-loc input[type=text] { margin-top: 6px; }
.fm-msg { margin: 0 22px 10px; padding: 10px 12px; border-radius: 10px; background: var(--red-s); color: var(--red); font-size: 13.5px; }
.fm-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel); }
.fm-sp { flex: 1; }
.fm-del { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 13px; font-weight: 600; font-size: 13.5px; color: var(--red); }
.fm-del:hover { background: var(--red-s); }
.fm-del svg { width: 16px; height: 16px; }
.fm-del.solid { background: var(--red); color: #fff; }
.fm-go:disabled { opacity: .6; }
body.fm-open { overflow: hidden; }

.ed-bar { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; margin-right: 8px; }
.ed-bar .btn-l { padding: 9px 13px; }
.ed-danger { color: var(--red) !important; }
body[data-can-write="0"] .tr .edit, body[data-can-write="0"] .acard .edit { display: none; }
.tr .edit { cursor: pointer; }

.rec-panel { margin-top: 18px; }
.rec-panel .ph { flex-wrap: wrap; align-items: flex-start; }
.rec-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rec-list { display: flex; flex-direction: column; }
.rec-row { display: flex; align-items: center; gap: 14px; padding: 11px 4px; border-top: 1px solid var(--line); }
.rec-row:first-child { border-top: 0; }
.rec-a { flex: 0 0 150px; color: var(--mute); font-size: 13px; }
.rec-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rec-b b { font-weight: 600; font-size: 14px; }
.rec-b small { color: var(--mute); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.rec-act { display: flex; gap: 2px; }
.rec-row .avatar { flex: none; }
.rec-panel .none, .dbox .none { color: var(--mute); font-size: 14px; padding: 8px 0; }

.adm-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.loc-tree { display: flex; flex-direction: column; }
.loc-row { display: flex; align-items: center; gap: 14px; padding: 9px 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.loc-row.lvl-0 { border-top: 2px solid var(--track); padding-top: 12px; }
.loc-row.lvl-0:first-child { border-top: 0; }
.loc-row.lvl-1 { padding-left: 26px; }
.loc-row.lvl-2 { padding-left: 52px; }
.loc-row.lvl-3 { padding-left: 78px; }
.loc-n { display: flex; align-items: center; gap: 8px; min-width: 220px; flex: 1; }
.loc-n b { font-weight: 600; }
.loc-n em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--org-d); background: var(--org-s); padding: 2px 6px; border-radius: 6px; }
.loc-ty { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mute); background: var(--soft); padding: 3px 7px; border-radius: 6px; min-width: 64px; text-align: center; }
.loc-row .muted { display: inline-flex; align-items: center; gap: 4px; }
.loc-row .muted .ic { width: 13px; height: 13px; }
.loc-act { display: flex; gap: 2px; margin-left: auto; }
.set-dl { display: grid; grid-template-columns: minmax(140px, 240px) 1fr; gap: 10px 18px; }
.set-dl dt { color: var(--mute); font-size: 13px; }
.set-dl dd { font-size: 14px; }
.audit { font-size: 13px; overflow-x: auto; }
.au-h, .au-r { display: grid; grid-template-columns: 150px 130px 150px 110px minmax(200px, 1fr); gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); min-width: 720px; }
.au-h { color: var(--mute); font-weight: 600; border-top: 0; }
.au-c { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prof { display: flex; gap: 18px; align-items: flex-start; }
.prof b { font: 600 20px var(--num); display: block; }
.prof small { color: var(--mute); display: block; margin-bottom: 8px; }
.prof p { margin-top: 8px; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }

@media (max-width: 720px) {
  .fm { padding: 0; place-items: end stretch; }
  .fm-box, .fm-box.wide { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; }
  .fm-f.half, .fm-f.third { flex: 1 1 100%; }
  .ed-bar { margin: 8px 0 0; width: 100%; }
  .rec-a { flex-basis: 90px; }
  .loc-row.lvl-1 { padding-left: 14px; } .loc-row.lvl-2 { padding-left: 28px; } .loc-row.lvl-3 { padding-left: 42px; }
  .set-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .set-dl dd { margin-bottom: 10px; }
}
.dtools { flex-wrap: wrap; }
