/* Self-hosted: the public legal pages must not send a visitor's address to a font CDN. Same files as the landing site. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* GribLak admin: dark olive sidebar, olive accents on a pale sage ground, Bricolage Grotesque
   titles over Plus Jakarta Sans. Light and dark themes come from data-theme on <html>, which follows
   the system (App.razor). */
:root {
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;

  --bg: #F4F6EF;
  --surface: #FFFFFF;
  --surface-alt: #FBFCF8;
  --tint: #F2F6E6;
  --seg: #E6EADC;
  --line: #E3E8D8;
  --line-soft: #EEF1E6;
  --control: #DCE2CF;
  --ink: #18200F;
  --ink-2: #2B3424;
  --muted: #69715F;
  --muted-2: #4A5340;
  --primary: #4F5D3A;
  --primary-hover: #435032;
  --on-primary: #FFFFFF;
  --side: #1D2618;
  --side-ink: #DDE5CC;
  --side-strong: #F4F7EC;
  --side-muted: #8A967A;
  --lime: #C8DE74;
  --on-lime: #1D2618;
  --hero: #1D2618;
  --on-hero: #F4F7EC;
  --on-hero-muted: #BAC5A4;

  --amber-bg: #FCEFD2; --amber-fg: #7A4E00;
  --red-bg: #FBE4DF; --red-fg: #A33522;
  --blue-bg: #E1ECF6; --blue-fg: #245A86;
  --green-bg: #E3F0D8; --green-fg: #2F6B2B;
  --grey-bg: #EEF1E6; --grey-fg: #4A5340;
  /* The app's Danger button (ActionDanger / OnActionDanger): solid red, white text. */
  --danger: #A33522; --danger-hover: #8C2D1D; --on-danger: #FFFFFF;
  --chart-accepted: #4F5D3A; --chart-expired: #D9A441; --chart-other: #C9CFBB; --chart-grid: #EEF1E6;

  --radius: 14px;
  --radius-card: 22px;
  --shadow-pop: 0 1px 3px rgba(24, 32, 15, 0.12);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #12170E;
  --surface: #1A2115;
  --surface-alt: #1E2619;
  --tint: #232D1B;
  --seg: #232B1C;
  --line: #2D3825;
  --line-soft: #26301F;
  --control: #39452F;
  --ink: #EEF2E4;
  --ink-2: #DCE3CF;
  --muted: #A3AD93;
  --muted-2: #BAC3AA;
  --primary: #A9C46A;
  --primary-hover: #BBD47C;
  --on-primary: #15200C;
  --side: #0D1209;
  --hero: #0F150B;
  --amber-bg: #3A2D12; --amber-fg: #F1C873;
  --red-bg: #3D1E18; --red-fg: #F2A493;
  --danger: #B8412C; --danger-hover: #C94D37; --on-danger: #FFFFFF;
  --blue-bg: #17283A; --blue-fg: #9CC4E8;
  --green-bg: #1C3119; --green-fg: #A5D795;
  --grey-bg: #262F20; --grey-fg: #BAC3AA;
  --chart-accepted: #A9C46A; --chart-expired: #D9A441; --chart-other: #4A5540; --chart-grid: #26301F;
  --shadow-pop: 0 1px 3px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 14px; line-height: normal; }
/* What people type (names, comments, places) can be one endless word: it wraps instead of widening
   the page. In tables, user text is cut to one line instead (.one-line, .cell-*). */
body { overflow-wrap: break-word; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
/* A name that links to its page reads as text; the underline comes on hover. */
a.strong { color: var(--ink); text-decoration: none; }
a.strong:hover { color: var(--ink); text-decoration: underline; }
a.sub { text-decoration: none; }
a.sub:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* FocusOnNavigate puts the focus on each page's title for screen readers; a title can't be tabbed to, and Safari drew the ring on it until the next click. */
h1:focus, h1:focus-visible { outline: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 1 1 236px; padding: 20px 14px; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; gap: 18px; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; color: var(--side-strong); text-decoration: none; }
.side-brand:hover { color: var(--side-strong); }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; flex: none; }
.side-brand-name { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.side-brand-sub { display: block; font-size: 12px; color: #9EAA88; }
.side-nav { display: flex; flex-direction: column; gap: 14px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 0 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-muted); }
.side-link { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 12px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--side-ink); }
.side-link:hover { color: var(--side-strong); background: rgba(244, 247, 236, 0.06); }
.side-link.active { background: var(--lime); color: var(--on-lime); }
.side-link span:first-child { flex: 1; }
.side-link svg { flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.back-link svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.side-foot .side-link { width: 100%; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; font-size: 14px; font-weight: 700; color: var(--side-ink); }
.side-foot .side-link:hover { color: var(--side-strong); background: rgba(244, 247, 236, 0.06); }
.side-foot .side-link.active { background: var(--lime); color: var(--on-lime); }
.side-foot .side-link span { flex: 1; text-align: left; }
.side-count { min-width: 22px; height: 20px; padding: 0 6px; white-space: nowrap; border-radius: 999px; background: #B23A26; color: #FFFFFF; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding: 14px 0 0; border-top: 1px solid rgba(244, 247, 236, 0.1); }

.main { flex: 999 1 560px; min-width: 0; padding: 22px 28px 40px; display: flex; flex-direction: column; gap: 16px; }
/* A lone button under a page head (Not found, Error) keeps its own width. */
.main > .btn { align-self: flex-start; }
@media (max-width: 640px) { .main { padding: 16px 16px 32px; } }

/* Narrow screens: the sidebar becomes a sticky top bar whose menu opens on demand. */
.side-toggle { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; white-space: nowrap; border-radius: 12px; border: 1px solid rgba(244, 247, 236, 0.22); background: transparent; color: var(--side-strong); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.side-toggle:hover { border-color: rgba(244, 247, 236, 0.45); }
@media (max-width: 800px) {
  .side { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 30; }
  .side-brand { flex: 1; padding: 0; }
  .side-toggle { display: inline-flex; }
  .side-nav, .side-foot { display: none; flex-basis: 100%; }
  .side.open { max-height: 100vh; overflow-y: auto; }
  .side.open .side-nav, .side.open .side-foot { display: flex; }
  .side.open .side-foot { margin-top: 4px; }
}

/* ── Page head ─────────────────────────────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-head-text { flex: 1 1 260px; min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.page-title { margin: 2px 0 0; font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { margin: 2px 0 0; font-size: 13.5px; font-weight: 500; color: var(--muted-2); max-width: 70ch; }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; text-decoration: none; }

.search { flex: 1 1 300px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--control); color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14px; }
/* The input has no outline of its own: the whole field shows the keyboard focus. */
.search:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.inline-select { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted-2); }
.select, .input, .textarea { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface); color: var(--ink); font-size: 14px; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.input.invalid { border-color: var(--red-fg); }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; }
.field-head { display: flex; justify-content: space-between; gap: 8px; }
.field-hint { font-weight: 600; color: var(--muted); }

/* ── Building blocks ───────────────────────────────────────────────────── */
.panel { padding: 18px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel-flush { padding: 0; overflow: hidden; gap: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.panel-title { flex: 1; margin: 0; font-size: 15px; font-weight: 800; }
.panel-link { font-size: 13px; font-weight: 800; text-decoration: none; }
.panel-note { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; align-items: start; }
.cols-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 14px; align-items: start; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.kpi { padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi-value { font-family: var(--font-display); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi-note { font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi.amber { background: var(--amber-bg); border-color: var(--amber-bg); }
.kpi.amber .kpi-label, .kpi.amber .kpi-value, .kpi.amber .kpi-note { color: var(--amber-fg); }
.kpi-note.up { color: var(--green-fg); }
.kpi-note.down { color: var(--red-fg); }

.todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 700px) { .todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpis.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1250px) { .kpis.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.todo-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.todo-card:hover { color: var(--ink); border-color: var(--control); }
.todo-value { font-family: var(--font-display); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.todo-label { font-size: 13px; font-weight: 600; color: var(--muted-2); line-height: 1.4; }

.chip { display: inline-flex; align-items: center; align-self: flex-start; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: var(--grey-bg); color: var(--grey-fg); }
.chip.amber { background: var(--amber-bg); color: var(--amber-fg); }
.chip.red { background: var(--red-bg); color: var(--red-fg); }
.chip.blue { background: var(--blue-bg); color: var(--blue-fg); }
.chip.green { background: var(--green-bg); color: var(--green-fg); }
.chip.on-dark { background: rgba(244, 247, 236, 0.14); color: var(--on-hero); }

/* Buttons come in three sizes, the app's standard (Large / Medium / Pill) on the admin's denser desktop scale:
   .btn.large 46 / radius 14 / 15, .btn 40 / 12 / 13.5, .btn.small 34 / 10 / 13, and the pill 40 round / 13.
   A secondary label is Bold, the filled kinds and the pills ExtraBold, as in the app. A label is on one line,
   never cut: a row of buttons wraps (.actions, .modal-foot, .pills…), the buttons themselves never do. */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 800; white-space: nowrap; border: 1px solid var(--control); background: var(--surface); color: var(--ink-2); }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.pill .count { opacity: 0.75; font-variant-numeric: tabular-nums; margin-left: 4px; }

/* Segmented control: 40 high like a button (3 px frame + 34 segments, the small size). */
.seg { display: flex; flex-wrap: wrap; max-width: 100%; padding: 3px; border-radius: 12px; background: var(--seg); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 800; white-space: nowrap; background: transparent; color: var(--muted-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { color: var(--ink); border-color: var(--muted); }
/* The blocked look is one value everywhere (the app's 45 %). */
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
/* Filled kinds: Primary, Danger, and on a dark hero OnDark (.lime) / OnDarkOutline (.on-dark). */
.btn.primary, .btn.danger, .btn.lime, .btn.on-dark { font-weight: 800; }
.btn.primary { border: 0; background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn.danger { border: 0; background: var(--danger); color: var(--on-danger); }
.btn.danger:hover { background: var(--danger-hover); color: var(--on-danger); }
/* A row action (small) in a list stays a tint: a column of solid reds would shout. The solid red is for a dialog or a detail pane. */
.btn.small.danger { background: var(--red-bg); color: var(--red-fg); }
.btn.small.danger:hover { background: var(--red-bg); color: var(--red-fg); box-shadow: inset 0 0 0 1px var(--red-fg); }
.btn.lime { border: 0; background: var(--lime); color: var(--on-lime); }
.btn.lime:hover { background: #D4E78A; color: var(--on-lime); }
.btn.on-dark { background: transparent; border-color: rgba(244, 247, 236, 0.3); color: var(--on-hero); }
.btn.on-dark:hover { background: rgba(244, 247, 236, 0.08); border-color: rgba(244, 247, 236, 0.55); color: var(--on-hero); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--tint); border-color: transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions.ruled { padding-top: 10px; border-top: 1px solid var(--line-soft); }

.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--tint); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.notice.amber { background: var(--amber-bg); color: var(--amber-fg); }
.notice.red { background: var(--red-bg); color: var(--red-fg); }
.notice.blue { background: var(--blue-bg); color: var(--blue-fg); }
.notice.green { background: var(--green-bg); color: var(--green-fg); }
.notice strong { font-weight: 800; }

.hero { position: relative; padding: 20px; border-radius: 24px; background: var(--hero); color: var(--on-hero); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; overflow: hidden; }
/* A long unbroken name wraps inside the card instead of running under the buttons. */
.hero-title { margin: 0; min-width: 0; overflow-wrap: anywhere; font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.hero-sub { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--on-hero-muted); }
.hero.compact { padding: 16px 18px; gap: 16px; border-radius: 22px; }
.hero.compact .hero-title { margin-top: 4px; font-size: 20px; font-weight: 700; letter-spacing: 0; }
.hero.compact .hero-sub { margin-top: 4px; font-weight: 400; }
/* Each item is one unit and wraps whole; gaps instead of typed dots, so a wrap never leaves a dot hanging. */
.hero-contact { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.hero-contact > span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hero-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lime); }

.avatar { width: 36px; height: 36px; border-radius: 12px; background: #DCE5C8; color: #2F3A24; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 20px; }
.avatar.xl { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; background: var(--lime); color: var(--on-lime); }
.person-cell { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.person-cell:hover { color: var(--ink); }
.strong { font-weight: 800; }
.sub { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }

/* ── Tables ────────────────────────────────────────────────────────────── */
/* Relative: hidden labels (.sr-only) in a wide table are clipped with it instead of widening the page. */
.table-box { position: relative; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl thead tr { text-align: left; color: var(--muted); font-size: 12px; background: var(--surface-alt); }
.tbl th { padding: 10px 12px; font-weight: 700; }
.tbl td { padding: 10px 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr.clickable { cursor: pointer; }
.tbl tr.clickable:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.tbl tr.clickable:hover td { background: var(--surface-alt); }
.tbl tr.selected td { background: var(--tint); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 13px; font-weight: 600; color: var(--muted); }
.pager > span.num { flex: 1; }
.pager .pager-num { min-width: 34px; padding: 0 8px; }
.pager .pager-num[aria-current="page"] { border-color: var(--primary); background: var(--primary); color: var(--on-primary); font-weight: 800; }
.pager-gap { padding: 0 2px; }
.pager-top { border-top: 0; border-bottom: 1px solid var(--line-soft); }
.panel:not(.panel-flush) > .pager { margin: 0 -18px -18px; }
/* Long names stay on one line in list tables. */
.tbl .one-line.narrow { max-width: 150px; }
/* Numbers' headers of a narrow panel table may wrap (the alerts panel in the two-column Insights grid at ~800 px). */
.tbl th.num.wrap-head { white-space: normal; }
.tbl .one-line { display: block; max-width: 230px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Lists, cards, timeline ────────────────────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 8px; }
.row-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.row-card:hover { color: var(--ink); }
.select-card { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 12px 14px; border-radius: 18px; cursor: pointer; text-align: left; color: var(--ink); border: 1px solid var(--line); background: var(--surface); }
.select-card.selected { border: 2px solid var(--primary); background: var(--tint); padding: 11px 13px; }
.picker { display: flex; flex-direction: column; gap: 6px; }
.picker-input { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface); color: var(--muted); }
.picker-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--tint); }
.picker-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14.5px; }
.picker-list { display: flex; flex-direction: column; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-pop); max-height: 360px; overflow-y: auto; }
.picker-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.picker-option[aria-selected="true"] { background: var(--tint); }
.picked { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--primary); background: var(--tint); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb { display: block; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-alt); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Key facts of one item in a dialog (label above value, two columns on wide screens). */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 18px; margin: 0 0 14px; }
.facts dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
/* A receipt photo sent with a payment: whole, never cropped, within the dialog. */
.proof-photo { display: block; max-width: 100%; max-height: 420px; margin-top: 12px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: var(--surface-alt); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--control); background: var(--surface); color: var(--ink-2); text-decoration: none; flex: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.icon-btn.whatsapp { color: var(--green-fg); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot.red { background: #A33522; } .dot.amber { background: #B7791F; } .dot.olive { background: var(--primary); } .dot.grey { background: #9AA48C; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; font-size: 13.5px; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; font-size: 13.5px; line-height: 1.4; }
.feed time { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.party { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); min-width: 0; }
.party:hover { color: var(--ink); }
.party-label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.quote { margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line-soft); font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.meter { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.meter.amber > span { background: #D9A441; } .meter.red > span { background: #A33522; }
.empty { padding: 28px 18px; text-align: center; color: var(--muted); font-weight: 600; }
.error-box { padding: 12px 14px; border-radius: var(--radius); background: var(--red-bg); color: var(--red-fg); font-weight: 600; }

/* Bars of the dashboard chart: one column per day, stacked. */
.chart { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 8px; height: 210px; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--muted); text-align: right; padding-bottom: 20px; }
.chart-plot { display: flex; flex-direction: column; min-width: 0; }
.chart-bars { flex: 1; display: grid; gap: 6px; align-items: end; border-bottom: 1px solid var(--control); background-image: linear-gradient(to top, var(--chart-grid) 1px, transparent 1px); background-size: 100% 25%; }
.chart-col { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.chart-col span { display: block; }
.chart-days { display: grid; gap: 6px; height: 20px; align-items: end; font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13.5px; }
.hbar-track { height: 22px; border-radius: 6px; background: var(--line-soft); overflow: hidden; }
.hbar-track span { display: block; height: 100%; border-radius: 6px; }

/* Switch */
.switch { position: relative; width: 52px; height: 32px; border-radius: 999px; border: 0; cursor: pointer; flex: none; background: var(--control); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s ease; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { left: 23px; }
.switch.on-dark { background: rgba(244, 247, 236, 0.25); }
.switch.on-dark::after { background: var(--hero); }
.switch.on-dark[aria-checked="true"] { background: var(--lime); }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.setting-row > span { flex: 1; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rule { padding: 12px 14px; border-radius: 16px; background: var(--surface-alt); border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; }
.setting-row .strong { font-size: 14.5px; }
.setting-row .sub { margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted-2); }
.rule .eyebrow { font-size: 12px; letter-spacing: 0.06em; }
.rule .sub { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--muted-2); }
.rule-value { font-family: var(--font-display); font-size: 20px; font-weight: 800; }

/* Phone preview of a push */
.phone { width: 320px; max-width: 100%; padding: 18px 14px 26px; border-radius: 38px; background: var(--hero); display: flex; flex-direction: column; gap: 10px; }
.phone-time { align-self: center; font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--on-hero); }
.push { padding: 12px; border-radius: 18px; background: rgba(244, 247, 236, 0.92); color: #18200F; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px 10px; }
.push-icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; background: #4F5D3A; color: #C8DE74; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.push-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: #4A5340; }
.push-title { display: block; font-size: 13.5px; font-weight: 800; }
.push-body { display: block; font-size: 13px; line-height: 1.4; color: #2B3424; white-space: pre-line; overflow-wrap: anywhere; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 58px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer; text-align: left; color: var(--ink); border: 1px solid var(--control); background: var(--surface); }
.choice[aria-checked="true"] { border: 2px solid var(--primary); background: var(--tint); padding: 7px 11px; }
.choice small { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Stars, reviews */
.stars { color: var(--primary); letter-spacing: 1px; font-size: 16px; }

/* ── Sign in ───────────────────────────────────────────────────────────── */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-brand { flex: 1 1 420px; position: relative; padding: 48px; background: var(--hero); color: var(--on-hero); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; overflow: hidden; }
.login-brand .side-brand { position: relative; padding: 0; }
.login-brand .logo-mark { width: 44px; height: 44px; border-radius: 14px; font-size: 20px; }
.login-brand .side-brand-name { font-size: 22px; }
.login-brand > div:not(.side-brand) { position: relative; max-width: 440px; }
.login-brand .hero-sub { position: relative; margin: 0; font-size: 13px; font-weight: 400; color: #9EAA88; }
.login-brand h1 { text-wrap: wrap; margin: 0; font-family: var(--font-display); font-size: 40px; line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; max-width: 440px; }
.login-brand p { margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--on-hero-muted); max-width: 440px; }
.login-form-wrap { flex: 1 1 380px; padding: 48px 32px; display: flex; align-items: center; justify-content: center; position: relative; }
.login-lang { position: absolute; top: 20px; right: 28px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.login-form h2 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 800; }
.login-form .input { height: 46px; padding: 0 14px; border-radius: var(--radius); font-size: 15px; }
.login-form .input.invalid { border-color: #A33522; }
.login-form .notice.red { padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
:root:not([data-theme="dark"]) .login-form .notice.red { color: #7E2A1A; }
.login-form .btn { height: 46px; border-radius: 14px; font-size: 15px; }
.zellige { position: absolute; right: -60px; bottom: -60px; width: 420px; height: 420px; opacity: 0.16; pointer-events: none; }
@media (max-width: 640px) { .login-brand { padding: 28px 20px; } .login-brand h1 { font-size: 30px; } .login-form-wrap { padding: 28px 16px; } }

/* ── Classic blocks still used by the request creation page ───────────── */
.card { padding: 18px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-title { margin: 0; font-size: 15px; font-weight: 800; }
.card-sub { font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.flex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 13px; font-weight: 800; }
.input-group input, .input-group select, .input-group textarea { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface); color: var(--ink); }
.input-group textarea { height: auto; padding: 10px 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 8px 10px; font-size: 12px; color: var(--muted); }
.table td { padding: 9px 10px; border-top: 1px solid var(--line-soft); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--grey-bg); color: var(--grey-fg); }
.badge.approved { background: var(--green-bg); color: var(--green-fg); }
.badge.pending { background: var(--amber-bg); color: var(--amber-fg); }
.badge.rejected { background: var(--red-bg); color: var(--red-fg); }
.error { padding: 10px 12px; border-radius: 12px; background: var(--red-bg); color: var(--red-fg); }
.request-map { height: 320px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }

/* ── Public legal pages ────────────────────────────────────────────────── */
.brand-logo { width: 100%; height: 100%; display: block; object-fit: cover; }
.tiny-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.legal-shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.legal-topbar { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.legal-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.legal-brand-mark { width: 52px; height: 52px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-alt); display: grid; place-items: center; overflow: hidden; }
.legal-brand-copy { display: grid; gap: 4px; }
.legal-brand-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.legal-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-alt); color: var(--muted-2); font-size: 13px; font-weight: 800; white-space: nowrap; text-decoration: none; }
.legal-link:hover { border-color: var(--primary); background: var(--tint); color: var(--ink); }
.legal-link.active { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.legal-main { overflow: auto; padding: 32px 36px 48px; }
.legal-page { max-width: 920px; margin: 0 auto; display: grid; gap: 18px; }
.legal-hero { display: grid; gap: 10px; }
.legal-hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.2rem); }
.legal-copy { max-width: 760px; color: var(--muted); font-size: 1.02rem; line-height: 1.7; margin: 0; }
.legal-section { display: grid; gap: 10px; }
.legal-section h2 { margin: 0; font-family: var(--font-display); font-size: 1.1rem; }
.legal-section p { margin: 0; line-height: 1.7; }
.legal-inline-link { color: var(--primary); text-decoration: underline; }
@media (max-width: 640px) { .legal-main { padding: 24px 16px 36px; } .legal-topbar { padding: 18px 16px; } }

#blazor-error-ui { background: var(--amber-bg); color: var(--amber-fg); bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; border: 0; background: none; color: inherit; font: inherit; }
/* Lost connection (App.razor): a bar at the top; Blazor sets the state class on it. */
.reconnect { display: none; position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1100; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--amber-bg); color: var(--amber-fg); box-shadow: var(--shadow-pop); font-size: 13.5px; font-weight: 700; }
.reconnect.components-reconnect-show, .reconnect.components-reconnect-failed, .reconnect.components-reconnect-rejected { display: block; }
.reconnect-state { display: none; }
.reconnect.components-reconnect-show .reconnect-trying,
.reconnect.components-reconnect-failed .reconnect-failed,
.reconnect.components-reconnect-rejected .reconnect-rejected { display: inline; }
.reconnect-action { margin-left: 8px; border: 0; background: none; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.text-danger { color: var(--red-fg); }

/* ── Compact, homogeneous pages ─────────────────────────────────────────────────────
   Lists show 10 rows a page; long text is cut (full text on hover or in a dialog); forms and
   full lists open in a dialog instead of stretching the page. */
.clamp-2, .clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.tbl .strong, .tbl .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.tbl .strong { display: block; }
.tbl td.wrap .strong, .tbl td.wrap .sub { white-space: normal; max-width: none; }
.tbl td { padding: 8px 12px; }
.tbl th { white-space: nowrap; }
.tbl td.num, .tbl th.num { white-space: nowrap; text-align: right; }
.panel-more { align-self: flex-start; }
.tbl .one-line.wide { max-width: 520px; }
/* Half-width cards (dashboard): a mission title that fits next to the state and the time. */
.tbl .one-line.mid { max-width: 190px; }
.panel-flush > .panel-head { padding: 14px 18px 10px; }
button.panel-link { padding: 0; border: 0; background: none; color: var(--primary); cursor: pointer; }
button.panel-link:hover { color: var(--primary-hover); text-decoration: underline; }
.tbl .stars { font-size: 14px; white-space: nowrap; }
.tbl td.row-action { width: 1%; white-space: nowrap; text-align: right; cursor: default; }
.pre-line { white-space: pre-line; }
/* Secondary table columns drop out below 1100 px so a table never scrolls sideways at 1024 px. */
@media (max-width: 1100px) { .hide-lg { display: none; } .tbl td.wrap-lg { white-space: normal !important; } .tbl .chip.wrap-lg { white-space: normal; height: auto; min-height: 24px; padding: 3px 9px; line-height: 1.25; } .tbl .person-cell .strong, .tbl .person-cell .sub { max-width: 220px; } .tbl .one-line.wrap-lg { white-space: normal; text-overflow: clip; } }

/* Below 1100 px the cells tighten and long texts get shorter caps, so the last column (date, state) stays in view
   without sideways scrolling at ~800 px. */
@media (max-width: 1100px) {
  .tbl th, .tbl td { padding-left: 8px; padding-right: 8px; }
  .tbl .one-line.wide { max-width: 230px; }
  .tbl .one-line.narrow { max-width: 120px; }
  .tbl .one-line.mid { max-width: 160px; }
  .tbl .one-line { max-width: 190px; }
}

/* Two half-width panels at ~800 px: tables get the tightest cells and headers that wrap. */
@media (max-width: 900px) {
  .cols .tbl { font-size: 13px; }
  .cols .tbl th, .cols .tbl td { padding-left: 4px; padding-right: 4px; }
  .cols .tbl th { white-space: normal; vertical-align: bottom; }
  .cols .tbl .one-line.mid { max-width: 120px; }
  .cols .tbl .chip { padding: 0 6px; }
  /* The last column keeps its right padding: its chips (« Charge ») must not touch the card's edge. */
  .cols .tbl th:last-child, .cols .tbl td:last-child { padding-right: 14px; }
}

/* Panels side by side on a dashboard end at the same line. */
.cols.even { align-items: stretch; }
/* Master and detail side by side: the detail stays in view and scrolls by itself. */
.cols > .sticky, .cols-wide > .sticky { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }

/* Dialogs */
body:has(.modal-backdrop) { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px; background: rgba(13, 18, 9, 0.45); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(13, 18, 9, 0.28); outline: none; overflow: hidden; }
.modal.modal-sm { width: min(420px, 100%); }
.modal.modal-wide { width: min(680px, 100%); }
.modal.modal-xl { width: min(860px, 100%); }
/* Validation window: dimmed but still clickable (it says why), checks block, base map and the artisan's words side by side. */
.btn.dim { opacity: 0.45; }
.val-checks { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line-soft); }
.val-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.val-check > .strong { min-width: 84px; }
.val-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.val-cols > section { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.val-cap { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.val-map { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); }
.val-map .m-bg { fill: var(--seg); } .val-map .m-road { stroke: var(--surface); stroke-width: 7; fill: none; }
.val-map .m-park { fill: var(--green-bg); } .val-map .m-water { fill: var(--blue-bg); }
.val-map .m-zone { fill: var(--primary); fill-opacity: 0.16; stroke: var(--primary); stroke-width: 2; stroke-dasharray: 6 5; }
.val-map .m-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 3; } .val-map .m-line { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 4 3; }
.val-map .m-tag { fill: var(--surface); stroke: var(--ink); stroke-width: 1.5; } .val-map .m-text { fill: var(--ink); font: 800 12px var(--font-sans); }
.val-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.val-tag { padding: 3px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; font-weight: 700; }
.val-pos { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.modal-xl .modal-foot { flex-wrap: nowrap; }
@media (max-width: 720px) { .modal-xl .modal-foot { flex-wrap: wrap; } .val-cols { grid-template-columns: minmax(0, 1fr); } .val-map { max-width: 420px; } }
.kpi.link { text-align: left; font: inherit; cursor: pointer; }
.kpi.link:hover, .kpi.link:focus-visible { box-shadow: inset 0 0 0 2px var(--amber-fg); outline: none; }
.val-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* New message: the filters of a group and the count the send will reach. */
.msg-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.msg-filters .field { min-width: 150px; }
.msg-count { margin: 0; font-weight: 800; font-size: 14px; color: var(--ink); }
.modal.modal-lg { width: min(960px, 100%); }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line-soft); }
.modal-title { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.modal-close { width: 34px; padding: 0; font-size: 15px; }
.modal-body { padding: 16px 18px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.confirm-text { margin: 0; line-height: 1.5; }
.modal-body > .table-box { margin: -16px -18px 0; }
.modal-body > .table-box:last-child { margin-bottom: -18px; }
.modal-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); }
.modal-foot .spacer { flex: 1; }
@media (max-width: 640px) {
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal, .modal.modal-sm, .modal.modal-lg { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; }
}

/* ── Two-step sign-in ──────────────────────────────────────────────────── */
.step-chip { align-self: flex-start; padding: 3px 9px; border-radius: 999px; background: var(--grey-bg); color: var(--grey-fg); font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.back-link, .text-link { border: 0; background: none; padding: 0; cursor: pointer; color: var(--primary); }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 800; }
.text-link { align-self: center; font-size: 13.5px; font-weight: 700; }
.back-link:hover, .text-link:hover { color: var(--primary-hover); text-decoration: underline; }
.login-lead { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.code-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.login-form .input.code-box, .code-box { width: 100%; min-width: 0; box-sizing: border-box; height: 58px; padding: 0; text-align: center; border-radius: 14px; font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.login-form .code-box.invalid { border-color: #A33522; }
.code-box { border: 1px solid var(--control); background: var(--surface); color: var(--ink); }
.login-form .input.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 700; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }

.security-panel { max-width: 760px; }
.step-row { display: flex; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.step-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--on-lime); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.step-body > strong { font-size: 14.5px; font-weight: 800; padding-top: 3px; }
.step-body p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.qr-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.qr-box { width: 168px; height: 168px; box-sizing: border-box; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: #FFFFFF; }
.qr-box svg { display: block; width: 100%; height: 100%; }
.qr-key { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
.qr-key > span:first-child { font-size: 13px; font-weight: 800; }
.mono-box { align-self: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink); user-select: all; }
.activation-code { width: 220px; max-width: 100%; box-sizing: border-box; height: 48px; padding: 0 14px; border-radius: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; letter-spacing: 0.3em; font-weight: 700; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn.large, .btn.place-search-btn { height: 46px; padding: 0 20px; border-radius: 14px; font-size: 15px; }
.recovery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.recovery-grid li { padding: 12px 14px; border-radius: 14px; background: var(--tint); border: 1px solid var(--line); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: 0.08em; text-align: center; user-select: all; }
.notice.with-icon { display: flex; gap: 10px; }
.notice.with-icon svg { flex: none; margin-top: 1px; }
@media (max-width: 480px) { .recovery-grid li { font-size: 15px; padding: 10px 6px; } }

/* Place search above the request map (JS-built, see requestMapPicker.js) */
.place-search { position: relative; display: flex; flex-direction: column; gap: 6px; }
.place-search:empty { display: none; }
.place-search [hidden] { display: none; }
.place-search-row { display: flex; gap: 8px; }
.place-search-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--primary); background: var(--surface); color: var(--primary); }
.place-search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.place-search-field:focus-within { box-shadow: 0 0 0 3px var(--tint); }
.place-icon { display: inline-flex; flex: none; color: var(--primary); }
.place-search-status { color: var(--muted-2); }
.place-search-results { position: absolute; z-index: 1100; left: 0; right: 0; top: 52px; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.45); }
.place-result { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.place-result:first-child { border-top: 0; }
.place-result:hover, .place-result:focus-visible { background: var(--tint); outline: none; }
.place-result-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.place-result-name { font-size: 14px; font-weight: 800; }
.place-search-foot { margin: 0; padding: 6px 12px 8px; border-top: 1px solid var(--line-soft); font-size: 11.5px; font-weight: 600; color: var(--muted); }

/* Person page: « Vérifications » strip in the hero, key/value rows of the artisan profile. */
.verif { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.verif-title { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-hero-muted); }
.verif-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.verif-cell { padding: 10px 12px; border-radius: 14px; background: rgba(244, 247, 236, 0.07); border: 1px solid rgba(244, 247, 236, 0.12); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.verif-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #9EAA88; }
.verif-value { font-size: 14px; font-weight: 800; color: var(--on-hero); }
.verif-value.ok { color: #9ED08A; }
.verif-value.warn { color: #F2C66B; }
.verif-note { font-size: 12px; font-weight: 600; color: var(--on-hero-muted); }
.verif-cell .btn { margin-top: 6px; align-self: flex-start; }
.kv { display: flex; flex-direction: column; }
.kv-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.kv-row:first-child { border-top: 0; }
.kv-key { font-weight: 700; color: var(--muted); }
.kv-val { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.kv + .table-box { border-top: 1px solid var(--line-soft); }
@media (max-width: 560px) { .kv-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Reports page: the account pills sit beside the side pills, the grouping switch at the right. */
.pills-bar { align-items: center; gap: 10px 12px; }
.pills-sep { width: 1px; align-self: stretch; margin: 6px 0; background: var(--line); }
.pill.toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.mini-switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--control); flex: none; }
.mini-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: left 0.15s ease; }
.pill.toggle[aria-checked="true"] .mini-switch { background: var(--primary); }
.pill.toggle[aria-checked="true"] .mini-switch::after { left: 16px; }
@media (prefers-reduced-motion: reduce) { .mini-switch::after { transition: none; } }
.tbl .rp-line { max-width: 250px; } .tbl .rp-reasons { max-width: 170px; }
.tbl .rp-diff { white-space: nowrap; }
@media (max-width: 1100px) { .tbl .rp-line { max-width: 190px; } .tbl .rp-reasons { max-width: 110px; } .tbl .rp-diff { white-space: normal; } }
/* Insights, « Why requests fall »: two columns of grouped bars (stacked on a narrow window), percentages within each column. */
/* Réglages › tâches automatiques: the table, and one block per task when the panel is too narrow for it (the result
   column went past the edge). On the panel's width, not the window's: the sidebar narrows it on a desktop too, and the
   French table needs about 650 px. */
.jobs-panel { container-type: inline-size; }
.jobs-list { display: none; margin: 0; padding: 0; list-style: none; }
.jobs-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.jobs-list .job-name { font-size: 14px; font-weight: 800; }
.jobs-list .job-meta { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.jobs-list .job-detail { font-size: 12.5px; font-weight: 700; color: var(--muted-2); }
.jobs-list .chip { height: auto; min-height: 24px; padding-top: 3px; padding-bottom: 3px; white-space: normal; }
@container (max-width: 699px) { .jobs-table-box { display: none; } .jobs-list { display: block; } }
.fall-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.fall-head-text { flex: 1 1 320px; min-width: 0; }
.fall-head .select { height: 38px; }
.fall-col { padding: 16px 18px; border-radius: 18px; background: var(--surface-alt); border: 1px solid var(--line-soft); }
.fall-col-title { margin: 0; font-size: 14.5px; font-weight: 800; }
.fall-col > .panel-note { margin: 2px 0 6px; }
/* One grid per column, rows on its subgrid: the count column is as wide as the column's biggest number (« 12 417 »
   broke in two at 40 px) and every bar still starts at the same place. */
.fall-rows { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(48px, 1fr) auto auto; column-gap: 10px; }
.fall-group { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; padding-top: 6px; }
.fall-row { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: center; row-gap: 10px; padding: 3px 0; font-size: 14px; }
.fall-row .fall-n, .fall-row .fall-pct { white-space: nowrap; text-align: right; }
.fall-row .fall-pct { min-width: 36px; }
.fall-row .fall-label { min-width: 0; font-weight: 800; }
.fall-row .fall-track { display: block; height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.fall-row .fall-track > span { display: block; height: 100%; background: var(--primary); }
.fall-row .fall-n { font-weight: 800; }
.fall-row .fall-pct { font-size: 12px; font-weight: 600; color: var(--muted); }
.fall-row.sub { font-size: 13px; padding: 2px 0; }
.fall-row.sub .fall-label { padding-left: 14px; font-weight: 600; color: var(--muted-2); }
.fall-row.sub .fall-track { height: 6px; }
.fall-row.sub .fall-track > span { opacity: 0.45; }
.fall-row.sub .fall-n { font-size: 13px; }
.fall-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); line-height: 1.45; }
.rel-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--amber-fg); color: var(--amber-fg); background: var(--amber-bg); font-size: 11px; font-weight: 800; white-space: nowrap; vertical-align: 1px; }
.fall-foot .rel-tag { margin-left: 0; }
@media (max-width: 520px) { .fall-rows { grid-template-columns: minmax(0, 1fr) auto auto; } .fall-row .fall-track { grid-column: 1 / -1; grid-row: 2; } .fall-row .fall-n { grid-row: 1; grid-column: 2; } .fall-row .fall-pct { grid-row: 1; grid-column: 3; } }

/* « Réglages de l'app › Ce qui est actif »: the points to look at, the three status cards, the task rows. */
.attn, .allgood { padding: 16px 18px 6px; border-radius: var(--radius-card); background: var(--amber-bg); color: var(--amber-fg); display: flex; flex-direction: column; }
.attn { border: 1px solid var(--amber-bg); }
.attn-title { margin: 0 0 8px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.attn-mark { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 800; background: var(--amber-bg); color: var(--amber-fg); }
.attn-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--amber-fg) 18%, transparent); }
.attn-item strong { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.attn-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--amber-fg); }
.attn-text { display: block; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.attn-how { display: block; margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--amber-fg); }
.allgood { padding: 14px 18px; flex-direction: row; align-items: center; gap: 10px; background: var(--green-bg); }
.allgood .attn-mark { background: var(--surface); color: var(--green-fg); }
.allgood strong { display: block; font-size: 14.5px; font-weight: 800; color: var(--ink); }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.stat-card { padding-bottom: 8px; gap: 0; }
.stat-card .panel-title { flex: none; margin-bottom: 4px; }
.srow { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.srow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow-main > strong { font-size: 14px; font-weight: 800; }
.srow-main .sub { font-size: 12.5px; line-height: 1.4; font-weight: 400; color: var(--muted-2); }
.srow-main .srow-last { margin-top: 2px; font-weight: 600; color: var(--muted); }
.srow-link { align-self: flex-start; margin-top: 2px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--primary-text, var(--ink)); text-decoration: underline; }
.nowrap { white-space: nowrap; }
.jobs-table .chip { height: auto; min-height: 24px; padding-block: 3px; white-space: normal; line-height: 1.25; }

/* ── Live emergencies ──────────────────────────────────────────────────── */
.kpi-value.amber-text { color: var(--amber-fg); }
.kpi-value.red-text { color: var(--red-fg); }
.urgent-tbl .need-title { display: block; max-width: 230px; }
.urgent-tbl .artisan-list { display: flex; flex-direction: column; gap: 4px; }
.urgent-tbl .artisan-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.urgent-tbl .artisan-line a { color: var(--ink); text-decoration: none; }
.chip.countdown { align-self: auto; gap: 5px; font-weight: 800; background: transparent; color: var(--ink); padding: 0; }
.chip.countdown.amber { background: var(--amber-bg); color: var(--amber-fg); padding: 0 9px; }
.chip.countdown .muted-in-chip { font-weight: 600; opacity: 0.75; }
.tbl td.bad { color: var(--red-fg); font-weight: 800; }

/* ── Insights: where to recruit, emergencies ───────────────────────────── */
.section-title { margin: 6px 0 -2px; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.kpi-value.ok-text { color: var(--green-fg); }
.recruit-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.recruit-foot { padding: 10px 14px 12px; border-top: 1px solid var(--line-soft); }
.score { display: inline-flex; align-items: center; gap: 10px; }
.score-track { display: block; width: 94px; height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.score-track > span { display: block; height: 100%; border-radius: 999px; background: var(--chart-accepted); }
.score-track > span.warm { background: var(--chart-expired); }
.score-track > span.hot { background: var(--danger); }
.copied-toast { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: 13.5px; font-weight: 800; }

/* A request's need: the artisans it was sent to, and what plan B did. */
.need-box { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-alt); border: 1px solid var(--line-soft); }
.need-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.need-row.current .strong { text-decoration: underline; text-underline-offset: 3px; }
.planb-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.urgent-tbl .row-action .flex { flex-wrap: nowrap; }
.urgent-tbl .need-title { max-width: 210px; }
.tbl td.row-action .flex { flex-wrap: nowrap; }

/* ── Tables that must fit ~800 px (admin panel width) ─────────────────────────────── */
.tbl td.num.strong { display: table-cell; }
.tbl th.num { white-space: normal; }
.tbl .fold-lg { display: none; }
.tbl td.planb-cell .chip { white-space: normal; height: auto; min-height: 24px; padding-block: 3px; line-height: 1.25; }
@media (max-width: 1100px) {
  .tbl .fold-lg { display: block; }
  .urgent-tbl .need-title { max-width: 200px; }
  .urgent-tbl .lbl-lg { display: none; }
  .tbl td.row-action .btn.small { padding-left: 10px; padding-right: 10px; }
}
.tbl .recruit-name { max-width: 260px; }
@media (max-width: 1100px) { .tbl .recruit-name { max-width: 170px; } .score { gap: 6px; } .score-track { width: 56px; } }
@media (max-width: 900px) { .tbl .score-track { display: none; } .tbl .recruit-name { max-width: 150px; } }
.tbl .lbl-lg { }
@media (max-width: 1100px) { .tbl .lbl-lg { display: none; } }
.tbl.tbl-tight { font-size: 13px; } .tbl.tbl-tight th, .tbl.tbl-tight td { padding-left: 5px; padding-right: 5px; } .tbl.tbl-tight th { white-space: normal; vertical-align: bottom; } .tbl.tbl-tight th:first-child, .tbl.tbl-tight td:first-child { padding-left: 14px; } .tbl.tbl-tight th:last-child, .tbl.tbl-tight td:last-child { padding-right: 14px; } .tbl.tbl-tight .chip { padding: 0 6px; }

/* ── Team tools: global search (Ctrl K), team journal, person notes ─────────────── */
.side-search { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 10px; border-radius: 12px; border: 1px solid rgba(244, 247, 236, 0.22); background: rgba(244, 247, 236, 0.06); color: var(--side-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-align: left; }
.side-search:hover { color: var(--side-strong); background: rgba(244, 247, 236, 0.1); }
.side-search svg { flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.side-search span:not([class]) { flex: 1; }
.side-search kbd { padding: 1px 6px; border-radius: 7px; border: 1px solid rgba(244, 247, 236, 0.3); font: inherit; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.search-button { cursor: pointer; text-align: left; font: inherit; font-size: 14px; }
.search-button > span:not([class]) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-button kbd, .gs-keys kbd, .gs-foot kbd { padding: 2px 7px; border-radius: 7px; border: 1px solid var(--control); background: var(--surface-alt); color: var(--muted-2); font: inherit; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.kbd-mac { display: none; }
html[data-mac] .kbd-mac { display: inline; }
html[data-mac] .kbd-pc { display: none; }

.gs-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(13, 18, 9, 0.45); }
.gs { width: min(640px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(13, 18, 9, 0.28); overflow: hidden; }
.gs-field { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; height: 56px; border-bottom: 1px solid var(--line-soft); color: var(--muted); flex: none; }
.gs-field svg { flex: none; }
.gs-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.gs-field:focus-within { box-shadow: inset 0 -2px 0 var(--primary); }
.gs-close { width: 34px; padding: 0; font-size: 15px; }
.gs-list { overflow-y: auto; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.gs-status { padding: 8px 10px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.gs-group { display: flex; flex-direction: column; gap: 2px; }
.gs-group-title { padding: 10px 10px 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: var(--muted); }
.gs-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.gs-item.active { background: var(--tint); box-shadow: inset 0 0 0 1px var(--control); }
.gs-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gs-item-title { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-item-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-keys { display: inline-flex; gap: 4px; flex: none; }
.gs-foot { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: 12px; font-weight: 600; color: var(--muted); flex: none; }
.gs-foot kbd { margin-right: 3px; }
@media (max-width: 720px) { .gs-backdrop { padding-top: 8vh; } .gs-foot { display: none; } }

.journal-detail { display: block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .journal-detail { white-space: normal; max-width: 24ch; } }
.note-list { list-style: none; margin: 0; padding: 0; }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.note-body { flex: 1; min-width: 0; }
.note-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.note-meta time { font-size: 12px; font-weight: 600; color: var(--muted); }
.note-text { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.note-tags { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.note-form { padding: 4px 18px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.note-form .field-wide { flex: 1 1 100%; }
.note-form .spacer { flex: 1; }

/* Validation queue rows: under 1100 px the city column and the Call button (the phone is in the profile) leave, so the table doesn't scroll. */
.va-actions { flex-wrap: wrap; }

@media (max-width: 1100px) { .va-actions { gap: 4px !important; } .va-actions .btn.small { padding: 0 8px; } }
@media (max-width: 1100px) { .tbl .person-cell .strong, .tbl .person-cell .sub { max-width: 170px; } }
