/* Styles for the top-level dashboard/login and portal-admin pages only -
   NOT loaded by board pages (those load the full planning-template
   stylesheet, public/styles.css, same as before). Same color tokens,
   kept in sync deliberately so this doesn't look like a different
   product from the boards it links to. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --border: #ddd;
  --header-bg: #f4f4f4;
  --accent: #2f6fed;
  --error: #d33;
  /* Same named colors as styles.css's own :root (that stylesheet isn't
     loaded here) - the project-admin page's tile-color picker (app.js)
     reuses these var() references (not their resolved hex) so a picked
     tile background keeps switching with light/dark mode automatically,
     same reasoning as that other picker's own identical values.
     --rood/--grijs/--productie/--event/--todo were missing here entirely
     until now - account/view.js's own kind-colors picker (and its live
     preview) reuses these same var() refs too, and a var() reference to
     a custom property this page never defines resolves to nothing,
     rendering as a plain white/transparent background rather than the
     real color - reported directly for Productie/Event/To Do
     specifically (each defaults to one of these three), and for
     "Standaard" resetting to them too, since that's the exact same
     var(--kind) reference these fall back to. */
  --thuis: #b3e0ff;
  --mijnkleuren: #d3f3d8;
  --geel: #fff3bf;
  --oma: #e5d4f5;
  --abrikoos: #ffbe73;
  --rood: #ff6b6b;
  --grijs: #e0e0e0;
  --productie: #cde0f7;
  --event: #f7d9a8;
  --todo: #dde3ea;
  --other: #eeeeee;
  /* Same muted amber as styles.css's own :root (that stylesheet isn't
     loaded here) - the activity notification button (app.js's own
     loadActivity()) reuses it, same "something needs attention" color
     that app's own cell-needs-check already uses. */
  --needs-check: #ffd166;
}

/* :not([data-theme="light"])/the plain :root[data-theme="dark"] rule
   below - manual "Weergave" override (account/view.js, server.js's
   THEME_APPLY_SNIPPET) - see styles.css's own identical :root blocks
   (that stylesheet isn't loaded here) for the full reasoning; kept in
   sync deliberately, same as every other color token on this page. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17181a;
    --fg: #e8e8e8;
    --border: #333;
    --header-bg: #222;
    --accent: #6ea1ff;
    --error: #ff6b6b;
    --thuis: #163f5c;
    --mijnkleuren: #204d29;
    --geel: #5a4b12;
    --oma: #3d2a57;
    --abrikoos: #6e3b12;
    --rood: #8b2020;
    --grijs: #444444;
    --productie: #1f3a5c;
    --event: #5c4420;
    --todo: #3a4048;
    --needs-check: #6b4f12;
    --other: #2a2a2a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17181a;
  --fg: #e8e8e8;
  --border: #333;
  --header-bg: #222;
  --accent: #6ea1ff;
  --error: #ff6b6b;
  --thuis: #163f5c;
  --mijnkleuren: #204d29;
  --geel: #5a4b12;
  --oma: #3d2a57;
  --abrikoos: #6e3b12;
  --rood: #8b2020;
  --grijs: #444444;
  --productie: #1f3a5c;
  --event: #5c4420;
  --todo: #3a4048;
  --needs-check: #6b4f12;
  --other: #2a2a2a;
}
:root[data-theme="light"] {
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

/* Stops the rubber-band bounce past the top/bottom edge (Safari/trackpad) -
   tried as one more angle on the iOS Home-Screen-saved "blur fade at the
   top of the screen" bug report, on the chance the fade is somehow tied to
   the bounce rather than being the already-confirmed-unrelated "Liquid
   Glass scroll edge effect" (see the memory file's own writeup - a
   magenta background test and a fixed opaque top strip both failed to
   affect the fade, which is the actual root cause). Harmless either way -
   this app was never relying on bounce-past-the-edge as a gesture. */
html, body {
  overscroll-behavior-y: none;
}

body {
  margin: 0 auto;
  max-width: 900px;
  padding: 0.75rem 0.75rem 0px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
}

/* Removed 2026-08-27 (explicit request) - this padding-top worked around
   a dead touch zone across the top ~27px of the screen on one specific
   iPhone 13 mini (confirmed via on-device touch-coordinate diagnostics),
   which appeared the same morning that phone took an iOS beta update -
   not reproducible on a bigger/non-mini iPhone or any other site, and
   env(safe-area-inset-top) read 0 throughout, pointing at a WebKit beta
   regression in touch hit-testing rather than a real safe-area value.
   Confirmed working without this padding after a later iOS update fixed
   the underlying regression; styles.css had an identical rule, also
   removed. */

h1 { font-size: 1.15rem; margin: 0; }
h2 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }

.hint { opacity: 0.7; font-size: 0.9rem; }
.error { color: var(--error); }

/* admin/ical-feeds.js's own per-project sync status line ("laatst
   gesynchroniseerd: ..."), same idea as board-admin/accounts.css's own
   #status/.status-error (that stylesheet isn't loaded on this page). */
.ics-status {
  margin: 0.4rem 0 0.8rem;
  font-size: 0.85rem;
  opacity: 0.75;
}
.ics-status.status-error {
  color: var(--error);
  opacity: 1;
}

/* ---- Save bar - field edits (renames, toggles, colors, role changes)
   stage locally now instead of saving immediately; clicking Opslaan is
   the one place that commits them, Annuleren discards them. Dimmed/
   disabled with nothing pending, solid green once something's staged -
   explicit request so it's clear at a glance whether there's anything to
   save. Adding/removing an entity (nieuw project/account, toevoegen,
   verwijderen) stays immediate as before - only edits to an existing
   field are staged. Fixed to the bottom of the viewport (not part of the
   normal document flow at all, explicit request) - unlike the earlier
   sticky-to-the-top version, appearing/disappearing (updateSaveTopBtn)
   never shifts .settings-inner's own content, since a fixed element
   reserves no flow space either way. .settings-main's own padding-bottom
   below reserves room so the bar never covers whatever content ends up
   at the bottom of the scroll range while it's showing. */
.save-top-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
/* This class's own display:flex above always wins over the browser's
   built-in [hidden] { display:none } at equal specificity, regardless of
   source order - same failure mode/fix as styles.css's own identical
   .custom-select-option[hidden] comment. Without this, JS setting
   .hidden on the bar (see admin/*.js's updateSaveTopBtn) has no visible
   effect at all. */
.save-top-bar[hidden] { display: none; }
.save-top-btn {
  padding: 0.4rem 1.1rem;
  border: none;
  border-radius: 6px;
  background: #2e9e4f;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.save-top-btn:disabled { opacity: 0.35; cursor: default; }
.cancel-top-btn {
  padding: 0.4rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.cancel-top-btn:hover { border-color: var(--error); color: var(--error); }
/* Same treatment as board-admin/accounts.css's own identical rule (that
   stylesheet isn't loaded here) - a staged-but-not-yet-saved row/tile. */
.pending-change td:first-child { box-shadow: inset 3px 0 0 0 var(--accent); }
/* Same marker, non-table context (View's tile grid isn't a table) - a
   ring around the tile instead of a left stripe. */
.project-card-admin.pending-change { box-shadow: 0 0 0 2px var(--accent); }

#login-view {
  max-width: 320px;
  margin: 3rem auto;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#login-form input {
  font-size: 1.05rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}

#login-form button {
  padding: 0.7rem;
  font-size: 1.05rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.dashboard-header {
  display: flex;
  align-items: center;
  /* flex-end, not space-between - .account-controls is this header's only
     child now that the "Planningen" title is gone (explicit request), and
     space-between would otherwise pin a lone child to the start instead
     of the end. */
  justify-content: flex-end;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* Settings pages (Accounts/Projecten/View) - fully self-contained, not
   composed with .dashboard-header above (that class stays plain-
   dashboard-only now - see server.js's settingsHeaderSnippet). Grid, not
   flex: with 3 children of very different widths (logo, title, account-
   menu), only a grid's auto/1fr/auto columns keep the title genuinely
   centered regardless of how wide the other two end up. No margin-bottom
   - explicit request, unlike .dashboard-header's own 1rem above. */
.settings-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
/* justify-self:center - without it, the grid's own default
   (justify-items:stretch) stretches this h1 to fill the entire middle
   1fr column (all the leftover space between the logo/account-menu
   columns), so text-align:center below only centers "Instellingen"
   *within* that now-very-wide box - the switcher arrow (::after on
   .board-title-trigger, position:absolute; right:0.1em) then sits at
   that wide box's own right edge instead of hugging the text, reported
   directly as "the arrow is on the far right, not next to the title". */
.settings-header h1 { justify-self: center; text-align: center; margin: 0; }
/* Which settings page this actually is (Accounts/Projecten/View, or a
   board's own name) - explicit follow-up request, so it's visible at a
   glance without needing the sidebar's own .active item scrolled into
   view. Lives INSIDE .settings-main (server.js's own SETTINGS_SUBTITLE
   marker, placed right before .settings-inner/#save-top-bar in every
   settings *.html file) rather than in the header - a full-width row
   there would sit above .settings-nav too and push it down; this way it
   only ever spans .settings-main's own column, leaving the sidebar's own
   height/position completely untouched. Only shown once .settings-nav
   itself has collapsed to its own 30px strip (explicit follow-up request)
   - the full sidebar already names the current page via its own .active
   item at that point, so this would just be a redundant second label. */
.settings-subtitle-bar {
  display: none;
}
@media (max-width: 850px) {
  .settings-subtitle-bar {
    display: block;
    position: sticky;
    top: -1px;
    z-index: 2;
    padding: 0.3rem 1rem;
    text-align: center;
    color: rgb(26, 26, 26);
    font-weight: 700;
    background: var(--header-bg);
    width: 200px;
    margin: 0 auto;
    border-style: solid;
    border-color: var(--border);
    border-width: 0 1px 1px;
    border-radius: 0 0 6px 6px;
    /* top:-1px alone (this app's usual fix for a sticky element's own
       edge-of-container seam - thead th/.mobile-month-header/
       .sticky-month-bar) didn't close this one - confirmed via screenshot
       still showing a sliver of the scrolled-past preview row above this
       bar's own top edge. This bar is narrower than its scroll container
       (width:200px, centered) and only rounds its BOTTOM corners, unlike
       those other full-width sticky headers - a different shape, so
       likely a genuinely different (subpixel rounding) cause, not fixable
       by nudging its own scroll-trigger offset. box-shadow paints an
       extra sliver of the bar's own opaque background 2px above its real
       box instead, physically covering whatever's peeking through
       regardless of the exact sub-pixel reason, rather than trying to
       prevent it from peeking through in the first place. */
    box-shadow: 0 -2px 0 0 var(--header-bg);
  }
  /* color:rgb(26,26,26) above is a fixed dark text color, paired with
     background:var(--header-bg) which DOES adapt to dark mode (#222,
     styles.css) - leaving the text unreadably dark-on-dark there.
     Reported directly. */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .settings-subtitle-bar {
      color: #fff;
    }
  }
  :root[data-theme="dark"] .settings-subtitle-bar {
    color: #fff;
  }
}
.settings-header-logo { height: 1.4rem; width: auto; display: block; }
/* mw-logo.png is a black wordmark on a plain white background - same
   dark-mode treatment as server.js's own SITE_LOGO_SNIPPET (the site-
   wide logo on every board/dashboard page), just without that one's
   mix-blend-mode/position:fixed trickery - this logo sits inline in a
   normal header, not overlaid on arbitrary content underneath it. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .settings-header-logo { filter: invert(1); }
}
:root[data-theme="dark"] .settings-header-logo { filter: invert(1); }

/* ---- Title-as-switcher (board-switcher.js, shared with every board
   page) - Tour/other projects/alles, same as board pages already have.
   Trimmed copy of styles.css's own board-title-select, board-title-trigger,
   board-switcher-x and project-card-current (that stylesheet isn't loaded
   here); .project-card/.project-card-bg/.project-card-name/.project-card-
   role/.project-card-combined are this page's own originals already
   above, no duplicate needed for those. ---- */
.board-title-select { position: relative; display: inline-block; }
.board-title-trigger {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
}
.board-title-trigger.has-switcher { cursor: pointer; padding-right: 1em; }
.board-title-trigger.has-switcher::after {
  content: '';
  position: absolute;
  right: 0.1em;
  top: 50%;
  width: 0.35em;
  height: 0.35em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  opacity: 0.55;
}
.board-title-trigger.has-switcher:hover { opacity: 0.8; }
.board-switcher-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  /* Above server.js's .site-logo (z-index 100), which otherwise sat on
     top of the open panel's header on a phone. */
  z-index: 101;
}
.board-switcher-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  max-width: 600px;
  margin: 0 auto;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 102;
}
.board-switcher-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.8rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.board-switcher-header .icon-btn {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
}
.board-switcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  padding: 0.8rem;
}
.project-card-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
/* Same card treatment .project-admin-detail used to provide (removed -
   the fixed Achtergrond panel above the grid replaces that per-tile
   dropdown entirely, explicit request) - without it this section has no
   visual container of its own at all. */
#tile-background-section {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--header-bg);
}

/* ---- Settings header account menu ----
   Trimmed copy of styles.css's own #account-menu (that stylesheet isn't
   loaded here) - just the account-name trigger + its projecten/log uit
   dropdown, not the fuller custom-select machinery styles.css also uses
   for persoon/productie filters (arrow indicator, filter-active state),
   which this page has no equivalent of. */
.custom-select { position: relative; }
#account-name {
  height: 1.7rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
}
#account-name.dropdown-open {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.custom-select-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 20;
  min-width: 8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0;
}
.custom-select-list[hidden] { display: none; }
.custom-select-option {
  display: block;
  width: 100%;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-family: inherit;
  white-space: nowrap;
  text-align: left;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
.custom-select-option:hover,
.custom-select-option.pressed-over { background: var(--header-bg); }

.account-controls {
  display: flex;
  gap: 0.5rem;
}

.header-btn {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.header-btn:hover { border-color: var(--accent); }

/* Icon-only variant (the new pencil "Projecten beheren" toggle) - same
   idiom as styles.css/admin.css's own .header-btn-icon (board pages),
   duplicated rather than shared since this page never loads either of
   those stylesheets. */
.header-btn-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.55rem;
  height: 1.7rem;
}

.header-btn-icon::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

/* Accent-filled while admin mode is active - same "this is the current
   state" cue .header-btn-active gives the list/month view toggle
   elsewhere, so it's obvious at a glance which mode the dashboard is in. */
.header-btn-icon.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Account name button + its instellingen/log uit dropdown - same visual
   language and class names as the board pages' own identical system
   (styles.css's .custom-select/.custom-select-trigger/-list/-option),
   ported here as just the pieces this page's one dropdown actually
   needs (no persoon/productie-style value-picker behavior, no shared
   mwDropdown coordinator - board-switcher.js isn't loaded on this page,
   and there's only ever the one dropdown here to coordinate anyway). */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  height: 1.7rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

/* Blue background + white text once open, matching board pages'
   identical #account-name.dropdown-open treatment - the plain border/
   text tint every other trigger there uses wouldn't read as "now open"
   here, since this trigger's text is already accent-colored normally. */
.custom-select-trigger.dropdown-open {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.custom-select-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 20;
  min-width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0;
}

.custom-select-list[hidden] {
  display: none;
}

.custom-select-option {
  display: block;
  width: 100%;
  padding: 0.3rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-family: inherit;
  white-space: nowrap;
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

/* This class's own unconditional display:block above always wins over the
   browser's built-in [hidden] { display:none } UA rule regardless of
   source order (an author-origin display rule beats a UA one) - same
   failure mode/fix as styles.css's own identical .custom-select-option[hidden]
   comment (board pages). Without this, app.js's own informatieLinkEl/
   actiesLinkEl/instellingenLinkEl.hidden = ... (the account-name dropdown,
   this page's index.html) had no visible effect at all - a plain member
   still saw every one of Informatie/Acties/Instellingen, explicit report. */
.custom-select-option[hidden] {
  display: none;
}

.custom-select-option:hover,
.custom-select-option.pressed-over {
  background: var(--header-bg);
}

/* Activity notification (public/app.js's own loadActivity()) - see
   styles.css's identical block (board pages, not loaded here) for the
   full reasoning; ported here as its own copy, same "this page duplicates
   just the pieces it needs" convention the account-menu dropdown above
   already follows. #activity-menu's own list stays position:absolute
   (this page's simpler .custom-select-list above, not board pages' own
   JS-positioned position:fixed one) - board-switcher.js isn't loaded
   here and there's no scroll container to reposition against mid-scroll
   the way a board's own table has. */
#activity-menu .custom-select-list {
  left: auto;
  right: 0;
}

.activity-trigger {
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Explicit follow-up request: "give the notification button a color and
   look that it is hard to miss" - see styles.css's identical rule (board
   pages) for the full reasoning, including why this needs the doubled-up
   .icon-btn.activity-trigger selector (a plain .activity-trigger rule
   would lose the cascade tie against .icon-btn's own same-specificity
   background/border/color/padding, defined later in this file). */
.icon-btn.activity-trigger {
  width: 1.7rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--needs-check);
  color: #3a2a00;
}

.icon-btn.activity-trigger:hover {
  filter: brightness(1.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn.activity-trigger { color: #ffd166; }
}
:root[data-theme="dark"] .icon-btn.activity-trigger { color: #ffd166; }

.activity-trigger[hidden] {
  display: none;
}

/* See public/styles.css's identical rule for the full reasoning - flex
   column + .activity-list-items' own flex:1/min-height:0 below lets
   positionActivityList (public/app.js) cap this box's own max-height in
   JS to whatever vertical space is actually left on screen, instead of a
   fixed rem value (explicit follow-up bug report: "sometimes on smaller
   devices it still goes out of screen"). */
.activity-list {
  width: max-content;
  min-width: 260px;
  max-width: calc(100vw - 2rem);
  max-height: min(24rem, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  padding: 0;
}

.activity-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.activity-clear-all {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.activity-list-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* Compact panel's "more below" fade (public/app.js's updateActivityFade). */
.activity-list.has-more::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5rem;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.35;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item-body {
  flex: 1 1 auto;
  min-width: 0;
}

.activity-item-text strong {
  font-weight: 600;
}

.activity-item-meta {
  margin-top: 0.15rem;
  opacity: 0.6;
  font-size: 0.75rem;
}

.activity-item-remove {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0.1rem 0.3rem;
  margin: -0.1rem -0.3rem 0 0;
  font-size: 1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.45;
  cursor: pointer;
}

.activity-item-remove:hover {
  opacity: 1;
  color: var(--error);
}

/* Clickable notification (opens the row it's about). */
.activity-item-link {
  cursor: pointer;
}
.activity-item-link:hover {
  background: var(--border);
}

.activity-empty {
  padding: 0.75rem 0.8rem;
  opacity: 0.6;
  font-size: 0.82rem;
}

/* 2 columns (each card ends up roughly half its old full-bleed width)
   instead of one full-width column - explicit request. */
.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

/* min-height, not height - a very long project name should still be able
   to grow the card rather than getting clipped. ~9.5rem is roughly 3x
   this card's own previous flex-row rendered height (~3.1rem: 2x
   0.9rem padding + one line of content + border) - explicit request.
   align-items:flex-start (was center) - the title now sits top-left in
   the taller box instead of centered in the middle of it, explicit
   follow-up request; justify-content:space-between still keeps the
   title itself at the left edge (role, when shown at all, at the right
   edge) - both now top-aligned rather than vertically centered. */
/* font-size scales the whole tile from one variable (--tile-scale, the
   Overzicht settings page's own -/+ step control, admin/view.js/routes/
   portal-admin.js's PUT /tile-scale) - every other size below is in em,
   not rem, specifically so it rides along with this one declaration
   instead of needing its own separate calc(...* var(...)). Defaults to
   1 (unscaled, today's fixed size) via var()'s own fallback for any page
   that hasn't fetched/applied the real value yet. */
.project-card {
  font-size: calc(1rem * var(--tile-scale, 1));
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 9.5em;
  padding: 0.9em 1em;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--fg);
  /* A custom tileColor (app.js's own tileCardStyle) sets this via the
     inline style attribute - plain var(--bg) is the fallback for a
     project with neither a color nor an uploaded image. position:relative
     + overflow:hidden - a tileImage instead renders as an absolutely-
     positioned <img> child (project-card-bg below), clipped to this
     card's own rounded-corner box. */
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.project-card:hover { border-color: var(--accent); }

/* Exactly one regular project tile (app.js's own renderProjectList) -
   centers it instead of leaving it stuck in the 2-column grid's first
   (left) cell with an empty gap beside it, explicit request. Spans both
   columns as its own grid area (grid-column) so justify-self can center
   it within the full row, but max-width keeps the tile itself roughly
   one column wide (accounting for .project-list's own 0.6rem gap) - a
   plain width:fit-content would shrink it down to its own text/badge
   size instead, losing the normal tile's own image/height treatment. */
.project-card-solo {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc(50% - 0.3rem);
}

/* The uploaded-image layer (app.js's own tileImgHtml/layoutTileImg) -
   width/height/left/top are computed and set by JS as real pixel values
   (real cover+zoom+pan pixel math against the image's own natural size -
   see layoutTileImg's own comment on why a transform-based approach
   couldn't correctly compose zoom with panning), overriding the
   width/height/object-fit here, which only matter for the brief moment
   before that JS runs on an as-yet-unmeasured image (top:0/left:0 keyed
   to that same fallback, not JS's own left/top yet). z-index:0 (with the
   text content just below explicitly at 1) keeps it behind the name/
   role text rather than the two fighting over paint order by source
   order alone. */
.project-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Subtle translucent backing so the title stays readable over a custom
   background color/image - explicit request. color-mix keeps it exactly
   var(--bg) (so it still reads as "this card's own surface", just
   nearly opaque) without needing a separate light/dark rgba pair of its
   own - only the name gets this (not the role/slug line below it, a
   secondary detail that already reads fine dimmed). Harmless no-op over
   a plain default card background too. position:relative + z-index:1 on
   both text spans - otherwise .project-card-bg's own z-index:0 would
   still paint over plain static-positioned text (z-index only compares
   siblings that both establish a stacking context / are positioned). */
/* font-size - explicit follow-up request/correction: the tile/button
   NAME text should NOT resize when the tile itself does - rem (the root
   font-size, unaffected by any ancestor's own scaled font-size), not em,
   so --tile-title-scale (board-config.js's own TILE_TITLE_SCALE_KEY) is
   the ONLY thing that changes this text's size, completely decoupled
   from whichever of --tile-scale/--combined-tile-scale sizes its own
   tile. padding below stays em - relative to THIS element's own now-
   independent font-size, so it still scales along with the title control
   specifically, not the tile's. */
.project-card-name {
  position: relative;
  z-index: 1;
  font-size: calc(1rem * var(--tile-title-scale, 1));
  font-weight: 600;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-radius: 4px;
  padding: 0.15em 0.5em;
}
.project-card-role {
  position: relative;
  z-index: 1;
  font-size: 0.8em;
  opacity: 0.7;
}

/* The "gecombineerd overzicht" link, moved out of the header (explicit
   request) to sit right under the last project card instead - a sibling
   of #project-list, not one of its JS-rendered children (that list gets
   fully replaced on every load, which would wipe out a static entry
   living inside it). margin-top matches .project-list's own gap between
   cards, so it reads as one continuous list. display:block + width:
   fit-content + margin:auto (not .project-card's own flex/space-between)
   - sized to its own title text instead of stretching the full row width
   like an actual project card, explicit request since it isn't a project
   of its own. */
/* font-size is a plain fixed bump (one step bigger than the page default,
   explicit request), not var(--combined-tile-scale) - that control only
   ever applies to Mijn Planning (.project-card-personal below,
   explicit follow-up request/correction: Alles samen isn't resizable).
   .project-card-personal is declared after this rule, so it still wins
   the same-specificity tie-break and overrides this value for Mijn
   Planning specifically - this fixed size only actually shows for Alles
   samen, the one use of this class without that one too. padding/margin
   below are still em, riding along with whichever font-size an element
   carrying this class ends up with. */
.project-card-combined {
  display: block;
  width: fit-content;
  margin: 0.6em auto 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  /* Overrides .project-card's own min-height (the 2-column tile grid's
     ~9.5rem) back to normal, content-sized height - explicit request,
     this button was never meant to match the project tiles' own tall
     size. padding explicit (not just inherited) for the same reason -
     even on every side, same 0.9rem/1rem the tiles themselves use. */
  min-height: 0;
  padding: 0.9em 1em;
  /* Board-switcher-panel context only (board-switcher.js's own grid,
     #board-switcher-grid) - this class's own dashboard usage (below
     #project-list) is a plain block-level sibling of that grid, not a
     child of it, so margin:auto alone already centers it against the
     full page there. Inside the switcher's own 2-column grid, without
     this it's just an ordinary grid item stuck in one narrow column
     instead of spanning/centering across the whole row - missing here
     even though styles.css's own identical rule (board pages) already
     has it, reported directly as the Mijn Planning tile looking
     different/off-center on the settings pages specifically. */
  grid-column: 1 / -1;
}

/* Mijn Planning only - explicit follow-up request/correction: Alles
   samen (.project-card-combined alone, no this class) stays a fixed
   size, only this tile's own box responds to --combined-tile-scale.
   Declared after .project-card above so it wins the same-specificity
   font-size tie-break on an element carrying both classes (every Mijn
   Planning tile does). */
.project-card-personal {
  font-size: calc(1rem * var(--combined-tile-scale, 1));
  /* Its own background is a fixed custom color set inline
     (personalTileColor, board-switcher.js/app.js's own tileCardStyle) -
     not theme-aware, unlike .project-card's own var(--fg) text color
     above, which flips light in dark mode and went unreadable against
     that still-light background there (reported directly). */
  color: #000000;
}

/* This class's own display:block above is an author-stylesheet rule, so
   it always wins over the browser's default [hidden]{display:none} UA
   style regardless of selector specificity - app.js's own combinedLinkEl/
   personalBoardLinkEl.hidden = true was silently having no visual effect
   at all because of this (reported directly - "alles" stayed visible for
   a non-admin account no matter what the JS set). Needs its own explicit
   override to actually hide again. */
.project-card-combined[hidden] {
  display: none;
}

/* Switcher tiles (board-switcher.js) and the board overview (index.html's
   .dashboard-tiles) - same look as styles.css's own switcher tiles on the
   board pages, explicit request: lower tiles, Mijn Planning and Tour full
   width, and the board name centred straight on the tile in small
   capitals instead of on a label. White on a dark colour
   (.project-card-dark, set from the rendered colour) or a photo
   (darkened a little so the name stays readable). The overview keeps em
   sizes so the Overzicht settings' tile size control still applies. */
.dashboard-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

/* #project-list's own tiles join the grid above, between Mijn Planning
   and "alles samen" - the element itself stays (app.js and tutorial.js
   look tiles up inside it). */
.dashboard-tiles .project-list {
  display: contents;
}

.board-switcher-grid .project-card:not(.project-card-combined),
.dashboard-tiles .project-card:not(.project-card-combined) {
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 4.5rem;
  max-height: none;
}

.dashboard-tiles .project-card:not(.project-card-combined) {
  min-height: 4.5em;
}

/* display:flex above beats the browser's own [hidden] rule. */
.dashboard-tiles .project-card[hidden] {
  display: none;
}

.board-switcher-grid .project-card-wide,
.dashboard-tiles .project-card-wide {
  grid-column: 1 / -1;
}

/* Subplanningen on the dashboard (app.js renderProjectList) - same look as
   the switcher panel's (styles.css, which this page doesn't load). */
.dashboard-tiles .project-card-parent {
  padding-bottom: 1.9rem;
}
.dashboard-tiles .project-card-unfold {
  position: absolute;
  left: 50%;
  bottom: 0.4rem;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.dashboard-tiles .project-card-unfold:hover,
.dashboard-tiles .project-card-unfold:focus-visible {
  background: var(--bg);
}
.dashboard-tiles .project-card-children {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: -0.25rem;
  padding: 0 0.2rem 0.2rem;
}
.dashboard-tiles .project-card-children[hidden] {
  display: none;
}
.dashboard-tiles .project-child-chip {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}
.dashboard-tiles .project-child-chip:hover {
  border-color: var(--accent);
}

.board-switcher-grid .project-card-name,
.dashboard-tiles .project-card-name {
  background: none;
  border-radius: 0;
  padding: 0;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1a1a1a;
}

.board-switcher-grid .project-card-photo::after,
.dashboard-tiles .project-card-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.board-switcher-grid .project-card-dark .project-card-name,
.board-switcher-grid .project-card-photo .project-card-name,
.dashboard-tiles .project-card-dark .project-card-name,
.dashboard-tiles .project-card-photo .project-card-name {
  color: #ffffff;
}

@media screen and (max-width: 480px) {
  .board-switcher-grid .project-card:not(.project-card-combined) {
    min-height: 3.6rem;
  }

  .dashboard-tiles .project-card:not(.project-card-combined) {
    min-height: 3.6em;
  }

  .board-switcher-grid .project-card-name,
  .dashboard-tiles .project-card-name {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }

  .dashboard-tiles .project-card-name {
    font-size: calc(0.75rem * var(--tile-title-scale, 1));
  }
}

/* Real card now (border/radius/background), not just a stacked block -
   explicit request for a more organized look, same treatment as
   board-admin/accounts.css's own identical .settings-section rule (that
   file's own fake colspan-heading-as-card-header trick doesn't apply
   here though - these tables' <thead> rows are real per-column headers
   already, tinted below instead of restructured). */
.admin-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

/* account/tutorial.html + admin/tutorial.html's own "start the
   walkthrough" button - explicit request for something bigger/more
   stylish than a plain default <button>, same padding/radius/accent-fill
   shape as #login-form button (this file's own equivalent-weight CTA),
   just larger, plus a hover/active lift for polish. */
#start-tutorial-btn {
  padding: 0.9rem 2.2rem;
  font-size: 1.15rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#start-tutorial-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
#start-tutorial-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* account/tutorial.html + admin/tutorial.html's own "Tips" section -
   full-width annotated screenshots, stacked (not a grid - each one needs
   to stay legible, not shrunk to fit a column). */
/* Horizontally scrollable strip, same shape as .uitleg-app-steps below
   (explicit request to match) - each .uitleg-tip is its own fixed-width
   card rather than stacked full-width, so all 3 sit side by side and
   scroll instead of stacking a long vertical column. */
.uitleg-tips {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.uitleg-tip {
  flex: 0 0 auto;
  width: 500px;
}
.uitleg-tip img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
}
/* Caption above the desktop screenshot - the desktop images no longer
   have this text baked in (moved out to real, selectable/accessible
   text, explicit request), unlike the ≤600px mobile screenshot that
   loads instead (see the <picture><source> below) - that one already has
   its own annotation baked in, so this caption is hidden right alongside
   it switching in, to avoid showing the same explanation twice. */
.uitleg-tip figcaption {
  margin-bottom: 0.5rem;
  font-weight: 600;
  /* Fixed, not auto - the 3 captions have different line counts (one's a
     4-item list, the other two are 2 lines each), so without a shared
     floor here each image started right after its own shorter/taller
     caption instead of at the same row position as its neighbors
     (reported directly). Sized to comfortably fit the tallest (4-item)
     one; the two shorter captions just leave blank space below their own
     text instead. */
  min-height: 5.5rem;
}
.uitleg-tip figcaption ol {
  margin: 0;
  padding-left: 1.25rem;
}
@media (max-width: 600px) {
  .uitleg-tip {
    /* Narrower here - below this width the <picture> above has already
       swapped to the tall portrait phone screenshot instead of the wide
       desktop one, so this card no longer needs to be as wide. */
    width: 220px;
  }
  .uitleg-tip figcaption {
    display: none;
  }
}

/* Same pages' own "Bewaar als app" section - one group per platform
   (iPhone/Android), each group's own step screenshots in a horizontally
   scrollable strip (not wrapped/stacked - these are tall phone
   screenshots, a strip keeps the step order left-to-right instead of a
   long vertical scroll). */
.uitleg-app-group + .uitleg-app-group {
  margin-top: 1.5rem;
}
.uitleg-app-group h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}
.uitleg-app-steps {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.uitleg-app-steps img {
  flex: 0 0 auto;
  width: 170px;
  height: auto;
  border-radius: 8px;
  cursor: zoom-in;
}
/* Android's own Chrome-menu screenshot has no phone-frame chrome of its
   own the way the iPhone step screenshots do (a plain browser screenshot,
   not a device photo) - keeps its border so it doesn't look like it's
   bleeding into the page background, explicit follow-up request. */
.uitleg-app-steps img[src="/img/uitleg/app-android-chrome.jpg"] {
  border: 1px solid var(--border);
}

/* Fullscreen viewer for .uitleg-tip's own images (public/uitleg-
   lightbox.js) - a dark backdrop, the image centered/contained within
   it, close/prev/next as floating round buttons pinned to the viewport
   edges rather than anchored to the image itself (so they stay put
   regardless of the current image's own aspect ratio). z-index high
   enough to sit above everything else on the page (nothing here ever
   coexists with an active tutorial.js tour - this is a settings page -
   so no real risk of clashing with that system's own 1000). */
.uitleg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
}
/* display:flex only unsets the [hidden] attribute's own default
   display:none - a plain unconditional display:flex on the class above
   would otherwise always win over that default regardless of the
   attribute (author CSS beats the user-agent stylesheet even at equal
   selector specificity), which is what made this overlay show up
   permanently instead of only once opened (reported directly). */
.uitleg-lightbox:not([hidden]) {
  display: flex;
}
.uitleg-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}
.uitleg-lightbox-close,
.uitleg-lightbox-prev,
.uitleg-lightbox-next {
  position: fixed;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.uitleg-lightbox-close:hover,
.uitleg-lightbox-prev:hover,
.uitleg-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}
.uitleg-lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.2rem;
}
.uitleg-lightbox-prev,
.uitleg-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
}
.uitleg-lightbox-prev { left: 1rem; }
.uitleg-lightbox-next { right: 1rem; }

/* Locks background scroll while the lightbox is open - same idea as
   tutorial.js's own html.mw-tutorial-active phone-only scroll lock, just
   applied on body (this settings page has no equivalent element already
   carrying that role) and at every width, not phone-only, since this
   overlay covers the whole viewport regardless of screen size. */
body.uitleg-lightbox-open {
  overflow: hidden;
}

/* ---- Foto's (public/account/fotos.js) - one plain grid, newest show
   first; thumbnails open the shared fullscreen viewer (/board/photo-viewer.css). */

/* Apple Photos-style grid (public/account/fotos.js): square crops, hairline
   gaps, tile size from --tile (set per zoom step by the pinch/-/+ code). */
.fotos-grid-wrap {
  overflow: clip; /* a pinch-scaled grid mustn't widen the scroll area; clip (not hidden) keeps .fotos-bar sticky */
  padding-top: 2.6rem; /* room for the floating bar at scroll 0 */
  touch-action: pan-y;
}
.fotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--tile, 112px), 100%), 1fr));
  gap: 2px;
}

.fotos-thumb {
  display: block;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--border);
  cursor: zoom-in;
  scroll-margin-top: 2.6rem;
}

.fotos-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 0px high and sticky: the month pill and zoom buttons float over the
   photos while scrolling, without taking any room in the grid. */
.fotos-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.fotos-bar > * {
  pointer-events: auto;
  margin-top: 0.5rem;
}
.fotos-bar-left {
  display: flex;
  gap: 0.35rem;
  min-width: 0;
}
.fotos-filter-btn {
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}
.fotos-filter-btn.active { color: var(--accent); border-color: var(--accent); }
.fotos-filter-btn.dropdown-open { color: var(--accent); border-color: var(--accent); }
/* The boards' Filter menu (styles.css, which settings pages don't load):
   same classes and same values, behaviour in fotos.js's setupFilterMenu. */
.filter-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.filter-menu-list {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  z-index: 20;
  min-width: 8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0;
}
.filter-menu-list[hidden] { display: none; }
.filter-menu-row {
  position: relative;
  padding: 0.3rem 1.6rem 0.3rem 0.7rem;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}
.filter-menu-row:hover,
.filter-menu-row.dropdown-open,
.filter-menu-row.pressed-over { background: var(--header-bg); }
.filter-menu-row.dropdown-open { color: var(--accent); }
.filter-menu-row::after {
  content: '';
  position: absolute;
  right: 0.6rem;
  top: 50%;
  width: 0.4em;
  height: 0.4em;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  opacity: 0.5;
  transform: translateY(-50%) rotate(-45deg);
}
.filter-menu-flyout {
  position: fixed;
  z-index: 20;
  min-width: 9rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0;
}
.filter-menu-flyout[hidden] { display: none; }
.filter-menu-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}
.filter-menu-option:hover,
.filter-menu-option.pressed-over { background: var(--header-bg); }
.filter-menu-check {
  display: inline-block;
  width: 1em;
  flex-shrink: 0;
  color: var(--accent);
}
/* Foto's only: a long venue name wraps when the flyout runs out of room, and
   each value shows its photo count. */
.fotos-filter-flyout .filter-menu-option { white-space: normal; }
/* Same search field as Statistieken's (.stats-filter-search), sized to this
   menu's text; stays in view while the options scroll. */
.fotos-filter-search {
  position: sticky;
  top: 0;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  width: calc(100% - 0.6rem);
  height: 1.7rem;
  margin: 0.1rem 0.3rem 0.3rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
}
.fotos-filter-search:focus {
  outline: none;
  border-color: var(--accent);
}
.fotos-filter-empty {
  margin: 0.3rem 0.7rem;
  font-size: 0.8rem;
  opacity: 0.5;
}
.fotos-filter-option-text { min-width: 0; overflow-wrap: anywhere; }
.fotos-filter-option-count { margin-left: auto; padding-left: 0.75rem; font-size: 0.7rem; opacity: 0.55; }
/* Above the grid, under the floating bar; scrolls away with the photos
   (the Filter pill keeps showing how many are on). */
.fotos-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}
.fotos-active-filters[hidden] { display: none; }
.fotos-filter-result { margin-right: 0.25rem; opacity: 0.7; }
.fotos-filter-chip {
  padding: 0.15rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  color: inherit;
  background: var(--header-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.fotos-filter-clear {
  padding: 0.15rem 0.3rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--accent);
  background: none;
  border: 0;
  cursor: pointer;
}
.fotos-pill {
  font: inherit;
  font-size: 0.8rem;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}
.fotos-month-btn {
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
}
.fotos-month-btn:empty { display: none; }
.fotos-month-btn::first-letter { text-transform: uppercase; }
.fotos-month .custom-select-list {
  left: 0;
  right: auto;
  max-height: 50vh;
  overflow-y: auto;
}
.fotos-month-list .custom-select-option::first-letter { text-transform: uppercase; }
.fotos-month-list .custom-select-option.current { font-weight: 600; color: var(--accent); }
.fotos-month-year {
  padding: 0.4rem 0.7rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.55;
}
.fotos-zoom {
  display: flex;
  overflow: hidden;
}
.fotos-zoom button {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  width: 2rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.fotos-zoom button + button { border-left: 1px solid var(--border); }
.fotos-zoom button:disabled { opacity: 0.3; cursor: default; }

/* ---- Producties (public/account/producties.js) ---- */

.production-media-viewer .media-section {
  margin-top: 1.25rem;
}
.production-media-viewer .media-section:first-of-type {
  margin-top: 0.5rem;
}
.production-media-viewer .media-section h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.media-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 100px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-alt, rgba(127, 127, 127, 0.08));
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  color: inherit;
  font: inherit;
}
.media-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-thumb-play {
  position: relative;
  z-index: 1;
}
.media-thumb-pdf-icon {
  opacity: 0.7;
}
.media-thumb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.5rem 0.5rem 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  /* Gradient fade (not a flat bar) - reads clearly over any thumbnail
     image without hard-cropping more of the photo/video-still than
     necessary, and holds up over a bright frame the same flat 0.55-alpha
     bar didn't (explicit follow-up request: "bigger and more clear"). */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-thumb-pdf .media-thumb-caption {
  position: static;
  background: none;
  color: inherit;
  text-shadow: none;
  white-space: normal;
  text-align: center;
  margin-top: 0.5rem;
}

/* Same fixed/dark-backdrop/z-index-2000 shape as .uitleg-lightbox above -
   this app's own established "big overlay" pattern for a settings page,
   just its own copy (per this codebase's convention of duplicating small
   widgets rather than sharing them) since it also has to hold a YouTube/
   pdf <iframe>, not only an <img>. Explicit follow-up request: the item
   itself now opens as a floating, rounded/shadowed panel over a dimmed
   backdrop (see .media-fullscreen-frame-video/-pdf below) rather than an
   edge-to-edge fill of the whole viewport. */
.media-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.media-fullscreen-overlay:not([hidden]) {
  display: flex;
}
.media-fullscreen-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-fullscreen-frame {
  border: none;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  background: #000;
}
/* YouTube - a 16:9 "floating window" that tracks the window both ways
   (explicit request: it shrank with the window but stopped growing at
   the old 960px cap) - the largest 16:9 box fitting 90% of whichever of
   width/height runs out first. */
.media-fullscreen-frame-video {
  width: min(90vw, calc(90vh * 16 / 9));
  aspect-ratio: 16 / 9;
}
.media-fullscreen-img {
  max-width: min(90vw, 960px);
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  object-fit: contain;
}
.media-fullscreen-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.media-fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.3);
}
body.media-fullscreen-open {
  overflow: hidden;
}

/* Explicit request: this one section (not the others in .settings-inner,
   which stay the full 900px column width) capped/centered at the exact
   same 600px .board-switcher-panel already uses - the same tile grid
   this section previews, just one place, so both read as the same width
   rather than this settings page's own copy stretching noticeably wider. */
#overzicht-section {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Real card header bar for a leading <h2> - same treatment as board-
   admin/accounts.css's own .settings-section h2:first-child (that
   stylesheet isn't loaded on portal.css's own pages), used by the
   member-facing account/index.html, one card per project. */
.admin-section > h2:first-child {
  margin: -1.25rem -1.25rem 1rem;
  /* Lower bar, same as the Statistieken cards (explicit request). */
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}

/* admin/ical-feeds.js's own per-project cards - a plain <details>/
   <summary> (native collapse/expand, no JS of its own needed) instead of
   the usual leading <h2> above, explicit follow-up request once there
   were enough projects for the page to get long. Closed by default (set
   via the details element's own missing "open" attribute in the JS
   template) - same header bar look as .admin-section > h2:first-child,
   just on <summary> since that's the clickable element here. */
.ical-feed-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: -1.25rem -1.25rem 1rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ical-feed-summary::-webkit-details-marker { display: none; }
/* Plain CSS chevron (border-corner trick, no icon asset/inline SVG
   needed) - points down closed, up open. */
.ical-feed-summary::after {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: 0.6;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.ical-feed-section[open] > .ical-feed-summary::after {
  transform: rotate(-135deg);
}
/* Collapsed: no content below the summary to justify keeping the header's
   own bottom border/negative margin (which assumes more content follows
   directly under it) - flush single-row card instead. */
/* Transparent, not removed - same 1px title jump as the stats cards. */
.ical-feed-section:not([open]) > .ical-feed-summary {
  margin-bottom: -1.25rem;
  border-bottom-color: transparent;
  border-radius: 10px;
}

/* Board webadres (slug) - shown as a preview of the actual URL it
   becomes part of (my.mimewave.com/<slug>/) instead of a bare labeled
   field, so what it's for is obvious without reading a hint. Used both
   in the "nieuw project" form and inline in the boards table (see
   admin.js's boardRowHtml). */
.slug-input-group {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  overflow: hidden;
}

.slug-input-group:focus-within {
  border-color: var(--accent);
}

.slug-input-prefix {
  padding: 0.4rem 0.2rem 0.4rem 0.6rem;
  font-size: 0.8rem;
  opacity: 0.6;
  white-space: nowrap;
}

.slug-input {
  flex: 1;
  min-width: 3rem;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0.4rem 0.6rem 0.4rem 0.1rem;
}

.slug-input:focus { outline: none; }

/* Personal feed link (public/account/projects.js) and the iCal import url
   (public/admin/ical-feeds.js) - both a full URL, much longer than the
   short webadres slugs .slug-input is normally used for elsewhere, so
   they get their own smaller size rather than inheriting .slug-input's
   font: inherit default. */
.account-feed-url-input, .ics-url-input {
  font-size: 0.75rem;
}

/* Same as styles.css's own .link-btn (that stylesheet isn't loaded on
   this file's own pages - admin/view.html, account/*.html) - a plain
   text-styled action button, e.g. "nieuwe link genereren"/"Standaard". */
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

/* Boards table's inline-editable Naam/webadres (blur-to-save, see
   admin.js) - transparent until hover/focus, matching this app's general
   "not a grey placeholder, a real editable field" convention. */
.board-name-input {
  width: 100%;
  min-width: 8rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
}

.board-name-input.open { font-weight: 700; }

/* Subplanningen (admin/projects.js): a child sits indented under its
   parent, with its "Subplanning van" choice in the expanded rows. */
.board-child-mark {
  display: inline-block;
  width: 1.2rem;
  color: var(--muted, #888);
}
.board-name-input.board-name-input-child {
  width: calc(100% - 1.3rem);
}
.board-parent-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.board-name-input:hover, .board-name-input:focus {
  border-color: var(--border);
  background: var(--bg);
}

/* Same transparent-until-hover/focus treatment as .board-name-input right
   above (this one shows real content too, unlike .password-input right
   below) - a new, separate rule rather than reusing that class directly,
   matching this codebase's own convention of duplicating small per-page
   styling instead of sharing one class across otherwise-unrelated
   features/pages. */
.username-input {
  width: 100%;
  min-width: 8rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: inherit;
  font: inherit;
}
.username-input.open { font-weight: 700; }
.username-input:hover, .username-input:focus {
  border-color: var(--border);
  background: var(--bg);
}

/* Write-only (accounts.js clears it after every save attempt, success or
   failure - there's no current password to show back) - always bordered,
   unlike .board-name-input's transparent-until-hover treatment, since a
   permanently-empty field reads as "nothing here" without one. */
.password-input {
  width: 100%;
  min-width: 8rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

/* Fixed column widths - without this, the browser's auto table layout
   re-measures every row (including whichever board's/account's expand
   row is currently open) to size the other columns, so expanding a row
   could nudge every other row's columns over by a few pixels (reported
   directly as "jumping"). Scoped to #boards-table/#accounts-table, the
   two .admin-table users with an expand/collapse state to jump -
   view.html's own kind-colors-grid (below) isn't a table at all. */
#boards-table, #accounts-table { table-layout: fixed; }
#boards-table .col-expand, #accounts-table .col-expand { width: 2.2rem; }
#boards-table .col-delete, #accounts-table .col-delete { width: 2.2rem; }

.admin-table th, .admin-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

/* Tints the real per-column header row (Gebruikersnaam/Wachtwoord/Admin,
   Type/Kleur) - boards-table has no <thead> at all, so this is a no-op
   there, same organized-card look as the rest of this pass. */
.admin-table thead th {
  background: var(--header-bg);
  font-weight: 600;
}

/* lid/admin dropdown (admin/accounts.js) - same look as the board-member
   role selects (.board-member-row select, portal.css) it's meant to
   match, this table just isn't loaded with that selector's own scope. */
#accounts-table select.admin-toggle {
  padding: 0.25rem 0.4rem;
  margin-right: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

/* ---- Financiën (public/admin/financials.js) - explicit request,
   Thijs-only for now (routes/financials.js's own comment). Explicit
   follow-up request: "same layout like Maandtotalen... the bonus field
   and productie fields underneath are all children to that afspraken
   parent" - #financials-afspraken is now the ONE shared .admin-section
   card (grey header-bar, border around the whole group) for both the
   bonus field and every production, rather than each having its own
   separate card. .financial-production is one production's own
   sub-section inside it; .financial-slot is one role slot's own
   fee_1x/2x/3x fields under its name, inside that. Explicit follow-up
   request for more compact spacing overall - every margin/padding below
   was cut down from an earlier, roomier first pass. ---- */

#financials-afspraken.admin-section,
#financials-month-totals .admin-section {
  padding: 0.75rem 1rem;
}

/* Keeps the header bar's own negative-margin trick (.admin-section >
   h2:first-child above) lined up with this page's own smaller padding -
   that rule's margin is hardcoded to the shared .admin-section's normal
   1.25rem, so retightening padding alone here would misalign it. */
#financials-afspraken.admin-section > h2:first-child,
#financials-month-totals .admin-section > h2:first-child {
  margin: -0.75rem -1rem 0.5rem;
  padding: 0.5rem 1rem;
}

/* The bonus field sits directly under the "Afspraken" header, with its
   own bottom divider - the first .financial-production right after it
   (below) skips its own top border/margin to avoid doubling up on that
   same line. */
.financial-bonus-section {
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

/* Explicit follow-up request: "created a new layer of 'parent' 'child'
   for the productions, so Circus Abrikoos is the parent to the
   information underneath until the next production" - a real nested box
   now (border + its own subtly-different surface, var(--header-bg) - the
   same "one level down from the page's own background" token this app's
   plain headers already use elsewhere) instead of just a plain top
   divider line between flat siblings, so everything belonging to one
   production (its kind fee rows, its own Details) reads as visually
   contained inside it, not just loosely grouped underneath. */
.financial-production {
  margin-top: 0.6rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--header-bg);
}
.financial-production:first-of-type {
  margin-top: 0;
}

.financial-slot {
  margin-top: 0.5rem;
}
.financial-slot:first-of-type {
  margin-top: 0;
}

/* Role slot header - explicit reversal of an earlier per-role color-cycle
   attempt (this rule's own git history) - explicit follow-up request:
   "give all the role headers a light grey background instead of each a
   color". var(--bg), not var(--header-bg) - .financial-production (the
   new parent box wrapping this, its own comment above) claimed
   var(--header-bg) for itself once nesting was added, so this needs the
   OTHER, contrasting surface token to still stand out against its own
   parent rather than blending into it. */
.financial-slot h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
}

/* Explicit follow-up request: "make it possible to change the salary
   names" - a custom kind's own name text/pencil/input (kindNameEditHtml's
   own comment). flex: 1 1 auto on the text span consumes .financial-slot
   h3's own free space, so its space-between above still reads as "name
   grows, edit+remove icons packed together at the end" rather than the 3
   items getting evenly spread across the row. */
.financial-kind-name-text {
  flex: 1 1 auto;
}
.financial-kind-name-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0.1rem;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
}
.financial-kind-name-edit:hover {
  opacity: 1;
}
.financial-kind-name-input {
  flex: 1 1 auto;
  min-width: 8em;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
}

/* A custom salary kind's own remove button (public/admin/financials.js's
   own kindSectionHtml) - builtin kinds (Speler/Techniek/Rijden) never
   get one at all, they only ever disappear with their whole production. */
.financial-kind-remove {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 0.2rem;
  font-size: 1rem;
  line-height: 1;
  font-weight: normal;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
}
.financial-kind-remove:hover {
  opacity: 1;
  color: var(--error);
}

/* The production's own header - explicit follow-up request: "give the
   show header the color that it has in the tour page". A rounded/padded
   box now (matching .financial-slot h3's own treatment above), not the
   earlier full-bleed card-header bar - this is a nested sub-header
   inside the shared #financials-afspraken card now, not its own
   top-level card. Same class/CSS-var shapes styles.css's own
   tr.row-thuis/tr.row-custom (etc.) already use for a real Tour row -
   duplicated here (that stylesheet isn't loaded on this page) rather
   than adding board-only classes to this page's own stack. row-custom's
   own --custom-row-color(-dark)/--custom-row-fg(-dark) are set inline
   per header by public/admin/financials.js's own productionHeaderColor
   (a literal hex, or an untouched var(--name) reference picked from the
   same named-preset row this page's own color picker offers). */
.financial-production-header {
  margin: 0 0 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
}
.financial-production-header.row-thuis { background: var(--thuis); }
.financial-production-header.row-mijnkleuren { background: var(--mijnkleuren); }
.financial-production-header.row-geel { background: var(--geel); }
.financial-production-header.row-oma { background: var(--oma); }
.financial-production-header.row-abrikoos { background: var(--abrikoos); }
.financial-production-header.row-other,
.financial-production-header.row-hotel { background: var(--other); }
.financial-production-header.row-custom {
  background: var(--custom-row-color);
  color: var(--custom-row-fg, inherit);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .financial-production-header.row-custom {
    background: var(--custom-row-color-dark, var(--custom-row-color));
    color: var(--custom-row-fg-dark, var(--custom-row-fg, inherit));
  }
}
:root[data-theme="dark"] .financial-production-header.row-custom {
  background: var(--custom-row-color-dark, var(--custom-row-color));
  color: var(--custom-row-fg-dark, var(--custom-row-fg, inherit));
}

/* Directly inside .financial-slot now - explicit reversal ("show the
   price field inside the role rows"): no more per-assigned-account row
   wrapping these, so a bit of left padding (matching .financial-slot h3's
   own 0.6rem) keeps them visually under the role name instead of flush
   with the section's own edge. */
.financial-fee-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding: 0 0.6rem;
}

/* "Details" - explicit follow-up request: "collapse from 'nieuw salaris'
   up to the persons for toewijzen, and give that the header 'details'" -
   folds the (rare, occasional-use) add-kind form and Toewijzingen list
   under one collapsed-by-default disclosure, same button/rotating-
   triangle idiom as .financial-month-account-header's identical collapse
   (styles.css - not loaded here, this is its own copy).
   Explicit follow-up request: "'details' is another parent inside the
   production sections. and details must have a grey background header
   aswell" - its own nested bordered box now, one level further in than
   .financial-production (which claimed var(--header-bg) grey for
   itself), so this box goes back to var(--bg) (the "light" side of the
   alternation) while its OWN toggle header below claims var(--header-bg)
   grey again - light/grey/light/grey, one flip per nesting level. */
.financial-production-details {
  margin-top: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  overflow: hidden;
}
.financial-production-details-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0.6rem;
  border: none;
  background: var(--header-bg);
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
  text-align: left;
  cursor: pointer;
}
.financial-production-details-toggle::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4em;
  font-size: 0.75em;
  transition: transform 0.15s ease;
}
.financial-production-details.open .financial-production-details-toggle::before {
  transform: rotate(90deg);
}
.financial-production-details-body {
  display: none;
  padding: 0.6rem;
}
.financial-production-details.open .financial-production-details-body {
  display: block;
}

/* "Nieuw salaris" - explicit follow-up request: "the '+ nieuw salaris'
   seems to have the same function as the 'toevoegen' button... remove
   the link" - a plain label now, no toggle of its own (it already lives
   inside the collapsed Details section above). No left/right padding of
   its own any more - .financial-production-details-body (above) now
   supplies uniform padding for everything inside the Details box. */
.financial-add-kind {
  margin-top: 0;
}
.financial-add-kind-label {
  display: block;
  font-size: 0.78rem;
  opacity: 0.7;
}
.financial-add-kind-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.financial-add-kind-form input {
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
}
.financial-add-kind-form button {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

/* Explicit follow-up request: "be able to assign the actors that are
   part of that production to that salary" - one dropdown per actor,
   listing every salary kind this production has (builtin and custom
   alike) as a real option (kindAssignmentsSectionHtml, public/admin/
   financials.js) - lives inside the collapsed Details section above,
   alongside "Nieuw salaris". */
.financial-kind-assignments {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.financial-kind-assignments h4 {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
}
.financial-kind-assignment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
  font-size: 0.82rem;
}
/* Explicit follow-up request: a changed-but-not-yet-saved assignment
   (public/admin/financials.js's own pendingAssignmentChanges, staged for
   the shared #save-top-bar Opslaan button) - same accent-colored "this
   row differs from the server" marker admin/view.js's own pending-change
   rows already use elsewhere, just a left border here rather than that
   file's own td-specific inset shadow (this row has no <td> of its own). */
.financial-kind-assignment-row.pending-change {
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.financial-kind-assignment-row select {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
}

.financial-fee-field {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Explicit follow-up request: "when a number is filled in, keep the euro
   symbol" - a plain placeholder="€" only showed while empty. .financial-
   fee-currency is a permanent visual prefix instead (public/admin/
   financials.js's own feeInputHtml/bonusSectionHtml), positioned over
   the input's own left padding rather than typed into its value - the
   saved/submitted value stays a plain number either way. */
.financial-fee-input-wrap {
  position: relative;
  display: inline-block;
}

.financial-fee-currency {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  pointer-events: none;
}

.financial-fee-field input {
  width: 6rem;
  padding: 0.2rem 0.5rem 0.2rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}

/* ---- Maandtotalen (public/admin/financials.js's own loadMonthTotals) -
   explicit follow-up request: "as an admin to see everyones month
   total". A read-only computed report, not an editable form - deliberate
   visual distinction from the fee/bonus inputs below it (no bordered
   input boxes here at all). ---- */

.financial-month-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.25rem 0 0.75rem;
}

.financial-month-picker button {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.financial-month-picker button:hover {
  background: var(--header-bg);
}

.financial-month-label {
  font-weight: 600;
  min-width: 8em;
  text-align: center;
}

/* Explicit follow-up request: "add a way to go to the month of today" -
   .financial-month-picker .financial-today-btn (not just .financial-
   today-btn alone) is needed to outrank that same file's own
   ".financial-month-picker button" square-icon-button rule above, same
   reasoning as .financial-view-toggle-btn's own identical comment right
   below. */
.financial-month-picker .financial-today-btn {
  width: auto;
  height: auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Explicit follow-up request: "I want to see a year total per person...
   maybe add buttons next to the month navigator to show 'per maand'
   'per jaar'" - a small segmented control, pushed to the far end of the
   picker row on wide screens (margin-left: auto), wrapping onto its own
   line on narrow ones (financial-month-picker's own flex-wrap above).
   The .financial-month-picker .financial-view-toggle-btn selector (not
   just .financial-view-toggle-btn alone) is needed to outrank that same
   file's own ".financial-month-picker button" square-icon-button rule
   above, which would otherwise also match these (any button inside the
   picker) and force them back to a fixed 1.8rem square. */
.financial-view-toggle {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}
.financial-month-picker .financial-view-toggle-btn {
  width: auto;
  height: auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.financial-view-toggle-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Explicit follow-up request: "make the 'your rate' section as wide as
   needed instead of the full width it has now" - .admin-section (shared
   with every other settings-page card, including this page's own
   Maandtotalen section right above it) is a plain block element with no
   width of its own, so it always stretched to fill .settings-inner's full
   column width by default; this shrinks it back down to its own content. */
.financial-salary-rates {
  width: fit-content;
  max-width: 100%;
}

/* Explicit follow-up request: "give the salaris section a smaller max
   width, about 70% of what it is now" - .financial-month-totals
   (Maandtotalen, unlike .financial-salary-rates right above) is a plain
   full-width block with nothing else capping it, so it always stretched
   to .settings-inner's own full column width. Reset back to full width
   inside this file's own @media (max-width: 430px) block further down -
   this section is already tuned edge-to-edge there for the itemized
   rows' own wrapping to behave, and 70% of an already-narrow phone screen
   would just reintroduce the wrapping this session spent so much time
   fixing. */
.financial-month-totals {
  max-width: 70%;
}

/* Explicit follow-up request: "under the salary section, add information
   on the account's salary on which they are assigned to" - account/
   salaris.js's own new "Jouw tarief" section, one row per production this
   account has a role in. Same font-size 0.78rem as .financial-month-item,
   just its own class - this row's own pieces don't line up with that
   class's own date/show/amount columns at all.
   Explicit follow-up request: "place the per show rate... underneath each
   other instead of one line" + "place that underneath the assigned
   productions aligned at the left" - a column, not the original single
   side-by-side flex row (this rule's own earlier version, this comment's
   own git history) - the production name on top, each fee tier below it,
   all left-aligned rather than the fees pushed to the row's right edge. */
/* Explicit follow-up request: "with multiple productions, put them
   besides each other instead of underneath... when the screen size don't
   allow it, then they should jump underneath each other" - a plain
   flex-wrap row of .financial-rate-row's own boxes (each still its own
   internal flex-column below), each one sized to its own content rather
   than stretched full-width, so several short ones share a line and a
   long one (many grouped production names) still gets the room it needs.
   The gap alone reads as clear separation at this size, so the old
   sibling border-top divider (this rule's own earlier version, this
   comment's git history) is gone - a horizontal line made sense stacked
   vertically, not once rows can sit side by side. */
.financial-rate-rows {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}
.financial-rate-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-size: 0.78rem;
}
/* Explicit follow-up request: "add a visual vertical division between
   these productions tarief rows" - a left border + matching padding on
   every row but the first, not a border on .financial-rate-rows itself
   (columns, not the whole group). first-child alone can't tell "first
   item on this wrapped line" apart from "first item overall" in plain
   CSS - a row that wraps down alone onto its own new line still gets this
   border on its left, a minor, accepted cosmetic quirk of flex-wrap
   rather than a real column/row grid. */
.financial-rate-row:not(:first-child) {
  padding-left: 1rem;
  border-left: 1px solid var(--border);
}
.financial-rate-production {
  font-weight: 600;
}
.financial-rate-fees {
  display: block;
}
/* Explicit follow-up request: "increase the space a bit between the 1
   show 2 shows etc and the rate" - gap on top of .financial-rate-fee-
   label's own fixed width below (which only keeps every tier's own value
   starting at the same position, not how far it sits from its label). */
.financial-rate-fee-tier {
  display: flex;
  gap: 0.5em;
  opacity: 0.85;
}
/* Explicit follow-up request: "align the rates" - a fixed-width label
   (salaryRateRowHtml's own comment) so every tier's own euro amount lines
   up under the next regardless of "1 show" vs "3 shows" text length. */
.financial-rate-fee-label {
  display: inline-block;
  width: 4.5em;
}

/* Explicit follow-up request: "add the 20 addition for more then 2 hour
   drives or belgium bookings" - a plain note below the per-production
   rows above, not its own row (the bonus is flat/portal-wide, not tied to
   any one production the way .financial-rate-row's own fees are). */
.financial-rate-bonus-note {
  margin: 0.4rem 0 0;
  font-size: 0.72rem;
  opacity: 0.65;
}

/* Narrow screens: the wrapping flex row left a production that wrapped
   onto its own line indented by its divider padding and the card hugging
   its content on the left only (reported as sloppy and asymmetrical).
   Instead: full card width and a fixed two-column grid, so every block
   starts at the same spot and the divider only sits between the two
   columns. */
@media screen and (max-width: 600px) {
  .financial-salary-rates {
    width: auto;
  }
  .financial-rate-rows {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .financial-rate-row:not(:first-child) {
    padding-left: 0;
    border-left: none;
  }
  .financial-rate-row:nth-child(2n) {
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
  }
}

.financial-month-account {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.financial-month-account:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Explicit follow-up request: "show the persons collapsed... open when
   clicked for the details" - a real <button> now (public/admin/
   financials.js's own monthAccountHtml), reset back to a plain full-width
   flex row since it's no longer a div. ::before is the expand/collapse
   indicator - rotates via .open on the parent (below), same idea as this
   app's other disclosure triangles. */
/* account/salaris.js's own always-open total row reuses this same
   header markup/layout, just as a plain <div> (nothing to expand/
   collapse - there's only ever one account's own data on that page) -
   this one override undoes the pointer cursor that only makes sense on
   the real, clickable admin <button> version. */
.financial-salary-total-row {
  cursor: default;
}
/* Explicit follow-up request: "remove the little down arrow before
   'total' for non admins, because in this view it's always open and
   doesn't even do anything" - .financial-month-account-name::before's own
   ▸/rotate-to-▾ collapse indicator (below) only means something on the
   real, clickable admin version of this header. */
.financial-salary-total-row .financial-month-account-name::before {
  content: none;
}

.financial-month-account-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.financial-month-account-name::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.4em;
  font-size: 0.75em;
  opacity: 0.6;
  transition: transform 0.15s ease;
}
.financial-month-account.open .financial-month-account-name::before {
  transform: rotate(90deg);
}

.financial-month-items {
  display: none;
  margin-top: 0.3rem;
}
.financial-month-account.open .financial-month-items {
  display: block;
}

/* Explicit bug report (screenshot): "Mijn Kleuren jumps to the next line"
   still, alongside the amount, on a long-city row - flex-wrap:wrap here
   was independently deciding to drop .financial-month-item-content (the
   WHOLE show+amount pairing, sight unseen) onto its own line the moment
   its own unshrunk, single-line-text natural width didn't fit next to the
   date, regardless of that nested box's own (separately fixed) nowrap -
   content's own internal fix only ever got a chance to run once it was
   ALREADY on its own line, by which point date had already dropped away
   from it. nowrap here instead keeps date+content on this box's one and
   only line unconditionally, so it's content's own nested nowrap/
   flex-start (further down) that ends up doing 100% of the actual
   wrapping-within-the-text work, never outer-level item wrapping at all -
   align-items:flex-start to match, keeping date/production/amount all
   pinned to that first text line regardless of how tall content's own
   wrapped city+aantal line makes the row underneath it. */
.financial-month-item {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.3rem 1rem;
  /* Negative margin + matching padding - same edge-bleed idiom
     .financial-year-month-row already uses just below (its own identical
     values now redundant with this, kept there rather than removed) - a
     zebra stripe's own background needs to reach past the row's own
     content out to the section's padding edge, not just wrap the text
     tightly. */
  margin: 0 -0.4rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Explicit follow-up request: "give the lines a subtle checkerbox with
   subtle grey lines" / "a row will have a slight grey tone, the next
   line not, and then the next line grey again" - color-mix against
   var(--fg) (not the stronger var(--header-bg) - already used elsewhere
   as a much more noticeable divider/surface contrast) for a genuinely
   subtle tint that still adapts automatically to light/dark mode, same
   idiom as .settings-nav-item:hover's own identical color-mix. Placed
   here, BEFORE .financial-year-month-row's own :hover rule further down,
   so a real mouse hover on an even year-summary row still wins the
   cascade (that rule's own comment has the specificity reasoning). */
.financial-month-items > .financial-month-item:nth-child(even) {
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

/* Explicit follow-up request: "when it still jumps to the next line,
   because of a long city name, then align the amount to the production
   name" - monthTotalItemHtml's own show+amount wrapper (all 3 files
   sharing this markup), NOT present on .financial-year-month-row's own
   2-child month/total row (yearMonthRowHtml), which is short enough to
   never need this. flex:1 1 auto/min-width:0 - claims the row's own
   remaining width (after the date column + its gap) and lets that be the
   width its own flex-wrap:wrap below actually wraps against, rather than
   the show text's own unconstrained natural width; without min-width:0 a
   flex item's default auto min-width would still let it overflow past
   that available space instead of actually wrapping. Once show+amount
   together don't fit, amount drops to its own line INSIDE this box - it
   starts at this box's own left edge (where the production name already
   starts), not .financial-month-item's own left edge (behind the date). */
/* Explicit follow-up request/correction: "first line: '17 do Mijn Kleuren'
   and the amount on the same line aligned to the right. then next line,
   aligned to Mijn Kleuren: 'city (1x)'" - flex-wrap:nowrap (was wrap) so
   the amount item itself never moves to its own flex line at all; it
   always stays paired with .financial-month-item-show on this box's one
   and only flex line. .financial-month-item-show (flex:1 1 auto, no
   white-space:nowrap of its own) is still free to wrap ITS OWN text
   internally once it's squeezed narrower than its one-line width - normal
   inline text-wrap already breaks at the space before "- city" long
   before it'd ever need to break inside "Mijn Kleuren" or "Stadskanaal"
   themselves, so the production name reliably lands alone on the first
   line with the city+aantal wrapping below it, entirely without any
   markup change. align-items:flex-start (was center) is what then keeps
   the amount pinned level with THAT first line specifically, rather than
   vertically centered against the full, now possibly 2-line-tall block. */
.financial-month-item-content {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.3rem 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

/* Explicit follow-up request: "make that clickable so when clicking on
   that month, it will switch to 'per maand'..." - a year total's own
   month row (yearMonthRowHtml), the only .financial-month-item variant
   that's a whole-row click target rather than just holding its own
   inline controls - border-radius/negative margin so the hover
   highlight doesn't run edge-to-edge against the section's own padding. */
.financial-year-month-row {
  border-radius: 4px;
  cursor: pointer;
}
/* .financial-month-items > - matches the zebra-stripe rule's own
   specificity above (2 classes + 1 pseudo-class each) so a real hover
   reliably wins the cascade even on an even (striped) row, regardless of
   which of the two rules happens to be declared last. */
.financial-month-items > .financial-year-month-row:hover {
  opacity: 1;
  background: var(--header-bg);
}

/* Explicit follow-up request: "as an admin, I need to be able to
   overwrite the salary for a person on a specific date" - a manually
   adjusted date's own row reads visibly different from every other one
   at a glance, same amber "needs attention"-adjacent language as
   .cell-needs-check elsewhere in this app, just a plain left border here
   rather than a filled background (this row's own background is already
   spoken for by financial-month-item-fee-input below). */
.financial-month-item-overridden {
  border-left: 3px solid var(--needs-check);
  padding-left: 0.4rem;
  margin-left: -0.4rem;
  opacity: 1;
}

/* Explicit follow-up request: "make the whole option row cursive" - a
   still-tentative ('optie', not yet 'bevestigd') show's own row reads
   visibly different at a glance, same idiom as .financial-month-item-
   overridden right above - italic here rather than a border/background,
   since "(optie)" already carries its own explicit text label right in
   the row (monthTotalItemHtml's own optieSuffix, all 3 files sharing this
   markup). */
.financial-month-item-optie {
  font-style: italic;
}

/* .financial-month-item-date-wrap holds the plain date label plus a
   manual entry's own pencil/input pair (monthTotalItemHtml's own
   comment - "I need to be able to change the date of a salary row") -
   the flex/min-width that used to sit directly on the label now lives
   here instead, since the wrapper is what actually participates in the
   row's own flex layout now. */
.financial-month-item-date-wrap {
  flex: 0 0 auto;
  min-width: 5.5em;
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
}
/* Explicit follow-up request: "horizontally align the dates, day letters
   and description... so they're always at the same location" - the date
   span itself needs a fixed total width, not just its daynum/dayabbr
   children, otherwise a wider abbreviation ("wo" vs "di") still shifts
   .financial-month-item-show over. Fixed here (not left to
   .financial-month-item-date-wrap's own min-width, financials.js's own
   manual-entry pencil column) so account/salaris.js and admin/
   salarissen.js - which render the date span with no wrap at all - line
   up identically too. */
.financial-month-item-date {
  display: inline-flex;
  flex-shrink: 0;
  min-width: 3.4em;
  font-variant-numeric: tabular-nums;
}
.financial-month-item-daynum {
  display: inline-block;
  width: 1.4em;
  text-align: right;
}
.financial-month-item-dayabbr {
  display: inline-block;
  margin-left: 0.35em;
}
/* Same small, low-key inline icon-button treatment as
   .financial-month-item-desc-edit right below - a manual entry's own
   date pencil. */
.financial-month-item-date-edit {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0.1rem;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
}
.financial-month-item-date-edit:hover {
  opacity: 1;
}
.financial-month-item-date-input {
  width: 8.5em;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}
/* Same plain-glyph, opaque-on-hover treatment as .financial-kind-remove
   elsewhere on this page - explicit follow-up request: "remove self
   added rows" (monthTotalItemHtml's own comment). */
.financial-month-item-remove {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 0.2rem;
  font-size: 1rem;
  line-height: 1;
  font-weight: normal;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
}
.financial-month-item-remove:hover {
  opacity: 1;
  color: var(--error);
}

.financial-month-item-show {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3em;
}

/* Explicit follow-up request: "I need to be able to edit all. maybe just
   put a small pencil icon at the end of the row" - same small, low-key
   inline icon-button treatment as .financial-kind-remove elsewhere on
   this page (this rule sits right below it) - a plain glyph, only
   opaque on hover, no border/background of its own. */
.financial-month-item-desc-edit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0.1rem;
  color: inherit;
  opacity: 0.4;
  cursor: pointer;
}
.financial-month-item-desc-edit:hover {
  opacity: 1;
}

/* A manual entry's own description input (its whole content, since it
   has no real Tour show behind it) or a real event's own description
   override (routes/financials.js's own PUT /description/:uid/:personKey) -
   same visual language as .financial-month-item-fee-input just free text
   instead of a fixed-width number. */
.financial-month-item-desc-input {
  flex: 1 1 auto;
  min-width: 8em;
  padding: 0.1rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}

/* Explicit follow-up request/reversal: "when a 20 euro addition is
   added... add that underneath the amount of that day instead of putting
   it in the price itself" - flex-direction:column/align-items:flex-end
   (was a single centered row) so a bonus-eligible day's own fee (or, in
   admin/financials.js's/admin/salarissen.js's own editable version, the
   fee input) sits on top and .financial-month-item-amount-bonus (below)
   reads as a plain right-aligned second line under it, not folded into
   one combined number the way this rule's own earlier version did. */
.financial-month-item-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1em;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
/* Explicit follow-up request: "make the + 20 euro addition slightly
   bigger and black font instead of grey" - font-size bumped up a touch
   (was 0.85em) and the extra opacity dimming (was 0.65, on top of
   .financial-month-item's own row-wide 0.85) dropped entirely, so it
   reads as plain full-strength text like the fee above it, not a muted
   aside. */
.financial-month-item-amount-bonus {
  font-size: 0.95em;
}

/* The per-date fee override input - same visual language as
   .financial-fee-field input (Afspraken's own fee/bonus fields) just
   smaller, to fit inline in a compact report row instead of a labeled
   form field. */
.financial-month-item-fee-wrap {
  font-variant-numeric: tabular-nums;
}
.financial-month-item-fee-input {
  width: 4.5rem;
  padding: 0.1rem 0.3rem 0.1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}
.financial-month-item-fee-wrap .financial-fee-currency {
  left: 0.35rem;
  font-size: 0.9em;
}

/* Explicit follow-up request: "as an admin I also need to be able to
   change that 20 euro addition" - same visual language/idiom as the fee
   input right above, just narrower (a bonus is always a small flat
   amount, never needs the fee input's own 4.5rem) and with a plain "+"
   prefix instead of "€" (this is always added ON TOP of the fee above
   it, not a standalone currency amount of its own). */
.financial-month-item-bonus-wrap {
  font-variant-numeric: tabular-nums;
}
.financial-month-item-bonus-input {
  width: 3rem;
  padding: 0.1rem 0.3rem 0.1rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}
.financial-month-item-bonus-wrap .financial-fee-currency {
  left: 0.35rem;
  font-size: 0.9em;
}

/* Explicit follow-up request: "for smaller screens I want to prevent the
   amounts jumping to the next line... maybe on the smallest width
   '- city (1x)' can get a smaller font size, and the left and right
   padding inside the salaris section, and between that section and the
   window can get smaller" - .financial-month-item's own flex-wrap (the
   row itself, further up) sends the whole amount span down to its own
   line the moment date+description+amount together don't fit; shrinking
   just the description text (not the date or amount, both already
   fixed-width/tabular-nums) buys back the most room without touching
   either of those. Scoped by body:has(#financials-month-totals) - that
   id is shared by all 3 of this markup's own pages (admin/financials.js,
   admin/salarissen.js, account/salaris.js), so .settings-inner's own
   padding only shrinks on these pages, not every other settings page too. */
@media (max-width: 430px) {
  /* .financial-month-totals's own max-width: 70% (further up) is meant
     for wider screens - undone here since this whole breakpoint is
     already tuned for the itemized rows to use every last bit of
     available width. */
  .financial-month-totals {
    max-width: 100%;
  }
  .financial-month-item-show-text {
    font-size: 0.68rem;
  }
  /* Explicit follow-up request: "make the day letter also smaller" - the
     weekday abbreviation ("ma"/"za") only, not the day number next to it
     (financial-month-item-daynum's own fixed width is what keeps every
     row's own dayabbr/description starting at the same position, so it
     stays untouched). */
  .financial-month-item-dayabbr {
    font-size: 0.85em;
  }
  /* Explicit follow-up request: "also make the padding of the left of the
     dates and the right of the amounts smaller" x2 - shrunk further each
     time, from the original 0.6rem/0.35rem this same rule pair started at.
     Explicit follow-up request: "make the margin between the text and the
     borders of the salaris field smaller" - top/bottom too now, not just
     left/right. Explicit bug report: "the padding is getting less in the
     'jouw tarief' section, but not in the salaris section" - a plain
     .financial-month-totals class selector here lost every time to
     #financials-month-totals .admin-section's own higher-specificity
     (ID + class) rule above, regardless of this media query's own later
     source position - matching that exact selector shape is what actually
     outranks it. .financial-salary-rates has no such competing rule at
     all (nothing else targets #financials-salary-rates), so it never
     needed this. */
  #financials-month-totals .admin-section,
  .financial-salary-rates {
    padding: 0.6rem 0.15rem;
  }
  /* Jouw tarief has no striped rows running to the edge like Salaris
     above, so its text needs real room from the border. */
  .financial-salary-rates {
    padding: 0.6rem 0.6rem;
  }
  /* #financials-month-totals .admin-section > h2:first-child's own
     negative margin (portal.css, further up) cancels out that selector's
     own 0.75rem/1rem padding to make the grey header bar span the card
     edge-to-edge - hardcoded to that padding, so left unmatched here it
     would keep yanking the header 1rem past this breakpoint's now much
     smaller 0.15rem side padding, bulging it past the card's own border.
     Explicit bug report: "the 'jouw tarief' header loses it's padding and
     borders" - .financial-salary-rates uses the plain, even MORE
     hardcoded .admin-section > h2:first-child default (-1.25rem/1.25rem,
     portal.css's own comment there) rather than this ID-scoped one, so it
     needed this exact same fix a second time, just missed initially since
     the first fix above only ever matched the Salaris section's own
     #financials-month-totals-scoped rule. */
  #financials-month-totals .admin-section > h2:first-child,
  .financial-salary-rates > h2:first-child {
    margin: -0.6rem -0.15rem 0.5rem;
    padding: 0.5rem 0.15rem;
  }
  .financial-salary-rates > h2:first-child {
    margin: -0.6rem -0.6rem 0.5rem;
    padding: 0.5rem 0.6rem;
  }
  /* Explicit follow-up request: "add a little bit of left and right
     padding between the salaris borders and outside that" - the gap
     between the card's own border and the screen edge, distinct from the
     card's own internal (text-to-border) padding right above - nudged
     back up a bit from 0.1rem, which read as too tight. */
  body:has(#financials-month-totals) .settings-inner {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
}

/* "Regel toevoegen" - explicit follow-up request: "make it possible to
   add a date myself in that maandtotaal for a person" - same low-key
   toggle-reveals-form idiom as .financial-production-details-toggle/
   .financial-add-kind-form elsewhere on this page, just scaled to this
   report's own smaller item font-size (0.78rem, matching
   .financial-month-item above) instead of the Afspraken section's. */
.financial-manual-entry-add {
  margin-top: 0.4rem;
}
.financial-manual-entry-toggle {
  display: block;
  margin: 0;
  padding: 0.15rem 0;
  border: none;
  background: none;
  color: inherit;
  opacity: 0.55;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.financial-manual-entry-toggle:hover {
  opacity: 1;
}
/* .financial-manual-entry-any-form (addSalaryForAnyoneFormHtml,
   financials.js) is a deliberately DIFFERENT class from
   .financial-manual-entry-form, not just an added modifier on the same
   one - the two forms need distinguishable submit handlers, and giving
   the "any" form both classes would have made BOTH of financials.js's
   own delegated submit listeners fire on it at once. Styled identically
   here regardless, just via a duplicated selector list rather than one
   shared class. */
.financial-manual-entry-form,
.financial-manual-entry-any-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
}
.financial-manual-entry-form input[type="date"],
.financial-manual-entry-any-form input[type="date"],
.financial-manual-entry-form .financial-manual-entry-desc,
.financial-manual-entry-any-form .financial-manual-entry-desc,
.financial-manual-entry-any-account {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}
.financial-manual-entry-form .financial-manual-entry-desc,
.financial-manual-entry-any-form .financial-manual-entry-desc {
  flex: 1 1 10em;
  min-width: 8em;
}
.financial-manual-entry-fee-wrap .financial-manual-entry-fee {
  width: 5rem;
  padding: 0.15rem 0.4rem 0.15rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
}
.financial-manual-entry-fee-wrap .financial-fee-currency {
  left: 0.35rem;
  font-size: 0.9em;
}
.financial-manual-entry-form button[type="submit"],
.financial-manual-entry-any-form button[type="submit"] {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

/* ---- Weergave (account/view.html's/admin/view.html's own Donkere-modus
   toggle, account/view.js's/admin/view.js's own THEME_KEY) - a plain
   3-way radio group (Systeem/Licht/Donker), not a custom-select/switch -
   only 3 fixed, always-visible options, no need for either of those
   heavier widgets. Taal (.lang-toggle, same two files) is the identical
   2-way shape just below it, reusing this same styling. ---- */
.theme-toggle, .lang-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin-bottom: 0.75rem;
}
.theme-toggle label, .lang-toggle label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  /* Explicit, not just relying on inheritance from body - color-scheme:
     dark/light (this file's own :root[data-theme] rules) restyles native
     form-control chrome (the radio dot itself) automatically, but this
     text should switch the same white/black way every other bit of text
     on the page does the moment the Weergave toggle is used - explicit
     follow-up request. */
  color: var(--fg);
}

/* ---- Type-kleuren (kind_colors, global across every board) - a grid of
   label+swatch pairs, not a <table> (account/view.html and admin/
   view.html's own #kind-colors-body). Explicit follow-up request: pack
   the 7 kinds into 2 rows instead of 7 (4 columns wide), with the swatch
   sitting right next to its own label (not a separate table column) and
   a smaller swatch to keep row height down. Below 700px this drops to 2
   columns instead of 4 (explicit follow-up request) - still noticeably
   more compact than one-kind-per-line. ---- */
.kind-colors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem 1rem;
  margin-bottom: 0.75rem;
}

.kind-color-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
}

/* Fixed width (not flex:1) so every column's swatch lines up at the same
   offset regardless of how long that row's own label text is ("Productie"
   vs "Event") - explicit request ("keep them aligned to each other"). */
.kind-color-label {
  flex: 0 0 5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

.kind-color-item .color-swatch-trigger {
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

.kind-color-item.pending-change {
  box-shadow: inset 3px 0 0 0 var(--accent);
}

@media (max-width: 700px) {
  .kind-colors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* admin/view.js's own "Instellen als nieuwe standaard"/"Terug naar
   standaard" pair - explicit follow-up request, section-scoped (not the
   page's own top Opslaan/Annuleren bar, which stays Overzicht/tile-color
   only) since Type-kleuren + Producties now save/reset independently of
   that. */
.kind-colors-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

/* ---- account/view.js's own kind-colors live preview - one sample row
   per kind, using whatever color is currently staged (not necessarily
   saved yet). Explicit follow-up request: instead of a small custom list,
   look like an actual self-service board row (Datum/Tijd/Soort/Locatie
   columns from public/board/app.js's own SELF_SERVICE_PLANNING_COLUMNS,
   server.js, minus Bevestigd and Informatie - both explicitly dropped,
   not meaningful in a static example), just not interactive (no detail
   panel - explicitly not needed here, this is illustration only).
   The real board narrows its columns via live text-width measurement
   (responsive-columns.js), which needs actual rendered content this
   settings page doesn't have - these fixed px breakpoints approximate a
   drop order without reimplementing that measurement. Soort - the actual
   kind/production name a color is being previewed for - stays visible
   alongside Datum regardless of width (explicit follow-up request: this
   preview's whole point is showing which kind each colored row is, so
   dropping that column first, before Tijd/Locatie, left a narrow settings
   panel showing nothing but bare colored date cells). ---- */
.kind-colors-preview-label {
  margin: 1rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.75;
}

.kind-colors-preview-scroll {
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
}

.kind-colors-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}

.kind-colors-preview-table th, .kind-colors-preview-table td {
  padding: 0.35rem 0.6rem;
  text-align: left;
}

.kind-colors-preview-table thead th {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.75;
  background: var(--header-bg);
}

.kind-colors-preview-table tbody tr + tr {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

@media (max-width: 560px) {
  .kind-colors-preview-table .pc-col-tijd { display: none; }
}
@media (max-width: 380px) {
  .kind-colors-preview-table .pc-col-locatie { display: none; }
}

/* ---- #accounts-table's own narrow-width redesign: a compact name-only
   tile per account (low height, one line), tap anywhere on it (or the
   chevron) to open a detail panel below with the wachtwoord field, admin
   toggle, verwijderen button, and the project list - all of which stay
   inline table columns/cells above 700px, completely unchanged. See
   admin/accounts.js's accountDetailFieldsRowHtml/renderAccounts for the
   markup this pairs with: .account-wide-only cells exist in the DOM at
   every width but only render above 700px; .account-narrow-only is the
   inverse, a plain duplicate (same data-id/classes as their wide-row
   counterparts) rather than one row conditionally re-shaped, since only
   one copy is ever visible per breakpoint and every staging/save handler
   already targets elements by class/data-id, not by which row they're
   physically in. ---- */
/* Deliberately NOT display:flex/block on the row or its cells - after
   two separate attempts at reflowing table rows via a display override
   both had zero visible effect (Safari/WebKit silently ignoring
   display:flex on a <tr>, and then the display:block/inline-block
   fallback showing no improvement either), this instead just hides the
   3 wide-only cells outright and lets the remaining 2 (chevron,
   username) render as an ordinary 2-column table row - real native
   table layout, not an override of it, so there's no display-quirk
   surface left to hit.
   table-layout stays fixed (NOT switched to auto - tried first, and it
   broke the already-working add-project/add-account rows further down:
   auto-layout recomputes every column's width from ALL rows' content at
   once, including these now really-narrow collapsed ones, which threw
   off the wider colspan="3" detail rows too, even though nothing about
   their own CSS changed). Instead just col-password's own <col>
   (admin/accounts.html) collapses to 0 width directly - admin/
   verwijderen stay on the tile itself (explicit request), only
   wachtwoord moves into the detail panel - with col-username absorbing
   the reclaimed space. col-admin/col-delete keep their normal width (2.2rem,
   same as col-expand/col-delete already use above 700px) rather than
   collapsing - same fixed-layout algorithm throughout, just different
   column proportions at this width, so every other row's own layout is
   untouched. */
@media (max-width: 700px) {
  #accounts-table .col-password {
    width: 0;
  }
  /* col-admin is now a lid/admin <select>, not a checkbox - a native
     select sizes itself by its own text/chrome (dropdown arrow etc.),
     wider than the icon-sized 2.5rem this column had when it only held
     a checkbox, so it overflowed into col-delete right after it.
     col-delete stays icon-sized (2.5rem, not the 2.2rem col-expand
     otherwise uses - with this cell's own 0.4rem/0.5rem padding on top,
     2.2rem left only ~1.2rem of actual content room for the 1.5rem
     .icon-btn delete button, so it overflowed too). Reduced padding
     (below) + this split give both enough breathing room. */
  /* 6rem, not 4.5rem - the select itself measured ~69px/4.3rem wide on
     its own (native chrome + "beheerder"-length option text), which
     didn't leave room for BOTH that and the cell's own padding without
     still overflowing through it - no visible gap ever appeared because
     the select's overflow was eating the padding-right added for it. */
  #accounts-table .col-admin {
    width: 6rem;
  }
  #accounts-table .col-delete {
    width: 2.5rem;
  }
  #accounts-table .col-username {
    width: auto;
  }
  /* visibility:hidden, NOT display:none - table-layout:fixed apparently
     re-indexes a row's remaining VISIBLE cells against the colgroup once
     one of its own <td>s is display:none, shifting every cell after it
     one column to the left for width-assignment purposes only (confirmed
     via getBoundingClientRect: col-password's own width:0 was landing on
     the admin <select>'s cell, and col-admin's 4.5rem on the delete
     button's cell right after it - exactly a one-column shift). This
     cell's column (col-password) is already 0-width on its own, so
     visibility:hidden (invisible, but still occupies its real column
     slot) gives the same "gone" result without triggering that reflow. */
  /* nowrap + font-size:0 (2026-11-17): the hidden text ("nog geen eigen
     wachtwoord") still wrapped word-per-line inside its 0-width column,
     stretching every row to 3-4 lines tall. */
  .account-wide-only { visibility: hidden; padding: 0; white-space: nowrap; overflow: hidden; font-size: 0; line-height: 0; }
  /* Padding, not the select's own margin - a margin on an element that's
     already overflowing its own (narrow) cell just gets absorbed into
     that overflow instead of producing visible gap before the next
     cell; padding on the CELLS themselves reliably reserves real space
     between them regardless. Extra padding-right on the admin cell
     specifically (0.6rem, not the 0.25rem the delete cell keeps) is the
     actual gap the two now visibly have between them. */
  #accounts-table td:has(.admin-toggle) {
    padding-left: 0.25rem;
    padding-right: 0.6rem;
  }
  #accounts-table td:has(.delete-account-btn) {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  /* No tbody tr[data-id]{cursor:pointer} here (unlike this rule used to
     have) - gebruikersnaam is now a live-editable <input> too (same as
     #boards-table's own naam, right below), so the row itself stays
     non-clickable (only the chevron button opens the detail panel),
     preserving click-to-edit on the field instead of fighting with it. */
  #accounts-table td.account-username-cell {
    font-weight: 600;
  }
}

/* Same narrow-width redesign as #accounts-table above (Projecten page,
   same "collapse to a compact tile, move a secondary field into the
   detail panel" treatment) - #boards-table's own webadres column
   collapses instead of wachtwoord, naam's column absorbs the reclaimed
   space instead of gebruikersnaam's. Same no-cursor-pointer reasoning as
   accounts-table's own identical comment above - naam is a
   live-editable <input> here too. */
@media (max-width: 700px) {
  #boards-table .col-slug {
    width: 0;
  }
  #boards-table .col-name {
    width: auto;
  }
  #boards-table .board-name-input {
    font-weight: 600;
  }
}

/* Hidden above 700px (only rendered into the DOM at all when a row is
   open, but the class stays too so this is explicit either way) - shown
   only within the narrow accounts-table redesign above. */
.account-narrow-only { display: none; }
@media (max-width: 700px) {
  .account-narrow-only { display: table-row; }
}

.account-detail-fields-row .board-member-name {
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.account-detail-password-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Resets the label's own uppercase back to normal case for the actual
   field value/prefix - inherited uppercase would otherwise visually
   (not actually) capitalize the typed password, or (reused for
   projects.js's own Webadres field) the "my.mimewave.com/" prefix and
   the slug itself. */
.account-detail-password-label .password-input,
.account-detail-password-label .slug-input-group {
  text-transform: none;
}

/* Overrides .board-member-name's fixed-width "tab stop" (meant for the
   member-list's short name column) - this label wraps a whole field
   (Webadres' prefix + input, or the wachtwoord input), not a short name,
   so it must not be clipped to 8rem/ellipsis. Selector matches that
   rule's specificity plus :first-child so it always wins regardless of
   source order. */
.board-member-name > .account-detail-password-label:first-child {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
  align-items: center;
  font-size: 0.9rem;
}

.inline-form input, .inline-form select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.inline-form button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
}

select#membership-project-select,
select#board-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  margin-bottom: 0.6rem;
}

/* Column/label settings editor (board admin's own settings page) */
.settings-columns-table input[type="text"],
.settings-columns-table input[type="number"] {
  width: 100%;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}

.settings-columns-table td { vertical-align: middle; }

/* ---- View settings page's own tile grid (admin/view.js) ----
   Still .project-card/.project-list for grid/sizing, but a tile is a
   <button> (not a link - it selects which tile #tile-background-section
   above the grid edits, doesn't navigate) here. */
/* font-family only, not the full font shorthand - explicit bug fix: the
   shorthand resets font-size too, silently overriding .project-card's/
   .project-card-personal's own font-size: calc(1rem * var(--tile-scale/
   --combined-tile-scale)) with the plain inherited (unscaled) value,
   since this element+class selector's specificity beats those plain
   class ones regardless of declaration order - the -/+ step controls in
   the Overzicht settings page (admin/view.js) had no visible effect on
   any tile here specifically because every tile there is a real <button>
   (unlike the dashboard's/board-switcher's own <a> tiles, which never
   had this rule to begin with) - reported directly. */
button.project-card {
  width: 100%;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.project-card-admin.open {
  border-color: var(--accent);
}

/* Reorder arrows (admin/view.js's own renderProjectList/moveBoard) - a
   sibling of the tile <button>, not a child of it (a <button> can't
   nest another interactive element), so this wrap is what the grid's own
   2-column layout now sizes instead of the tile button directly - plain
   block sizing (100% width by default) keeps it filling the grid cell
   exactly like the bare button did before. position:relative +
   .tile-order-controls' own position:absolute floats the two arrows over
   the tile's own top-right corner without disturbing its layout;
   .tile-arrow-btn's own solid var(--bg) background (already defined
   above for the Achtergrond panel's identical nudge arrows) keeps them
   readable over a custom tileColor/tileImage tile too. */
.project-card-tile-wrap {
  position: relative;
}

.tile-order-controls {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: flex;
  gap: 0.2rem;
}

.tile-order-controls .tile-arrow-btn[disabled] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin: 0.4rem 0 0;
}

.project-admin-section {
  margin-top: 0.9rem;
}

/* Overzicht settings page's own -/+ step controls (admin/view.js) - one
   for every regular project tile at once, one for the Mijn Planning/
   Alles samen pair, both writing to routes/portal-admin.js's PUT /tile-
   scale and read back everywhere via /api/me's own tileScale/
   combinedTileScale (see .project-card's/.project-card-combined's own
   font-size: calc(1rem * var(--tile-scale/--combined-tile-scale)) rules).
   Sits above #tile-background-section/#project-list, not per-tile - a
   single shared size for the whole grid, explicit request ("doesn't need
   to be separate sizing from each other"). */
.tile-size-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 0.9rem;
}

.tile-size-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tile-size-control .field-label {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.color-swatch-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.color-swatch-btn {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
}

.color-swatch-btn.selected {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Color-wheel icon shows through as the wrapper's own background until a
   custom hex is actually picked - the native <input type="color"> itself
   has no real "nothing chosen yet" rendering (its swatch always paints
   as some solid color, defaulting to a plain grey), so left alone it
   read as an inert grey blob rather than an inviting "pick a color"
   affordance. Once a custom color IS set (admin/view.js adds
   .has-custom-color), the input's own swatch is shown instead, covering
   the wheel, so the circle reflects the actual picked color again. */
.color-swatch-custom-wrapper {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background-image: url('/img/color-wheel.png');
  background-size: cover;
}

.color-swatch-custom-input {
  width: 2rem;
  height: 2rem;
  margin: -0.25rem;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.color-swatch-custom-input.has-custom-color { opacity: 1; }

.color-swatch-clear {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}

.color-swatch-clear:hover { border-color: var(--error); color: var(--error); }

/* Type-kleuren (kind_colors, global across every board) - the small
   clickable preview per row of #kind-colors-table, opens the floating
   popover below. Same idea as board-admin/accounts.css's own
   .color-swatch-trigger (that file's own production/kind color picker),
   ported here since this page has no other color-picker infrastructure
   of its own to share it from. */
.color-swatch-trigger {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

/* Only shown on demand (clicking a .color-swatch-trigger), positioned
   next to whichever trigger was clicked - see admin.js's own
   openKindColorPopover. */
.color-swatch-popover {
  position: fixed;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-height: min(70vh, 26rem);
  overflow-y: auto;
}

.color-swatch-popover[hidden] {
  display: none;
}

/* "Ook instellen als standaard voor iedereen" (account/view.js) - only
   shown to a real portal admin, reset unchecked every time the popover
   opens. */
.kind-color-set-default-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.2rem 0.3rem;
  font-size: 0.72rem;
  opacity: 0.85;
  cursor: pointer;
}

.kind-color-set-default-label[hidden] {
  display: none;
}

/* Separates the custom color-wheel row above from the named preset rows
   below so it doesn't read as just one more row of the same. */
.color-swatch-divider {
  height: 1px;
  margin: 0.15rem 0;
  background: var(--border);
}

.tile-image-upload-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
}

.tile-image-upload-btn:hover { border-color: var(--accent); }

/* Focal-point/zoom adjuster for a tileImage (admin/view.js) - 4 arrow
   buttons (nudging tilePositionX/Y by TILE_POSITION_STEP each click) and
   2 zoom buttons (+/-, TILE_ZOOM_STEP each click), both in a single row
   right inside .color-swatch-row itself (explicit request - previously
   a separate row below it, and the arrows a 3x3 cross layout). Only
   rendered at all when a tileImage is actually set (admin/view.js). */
.tile-position-arrows,
.tile-zoom-buttons {
  display: flex;
  gap: 0.15rem;
}

.tile-arrow-btn,
.tile-zoom-btn {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
}

.tile-arrow-btn:hover,
.tile-zoom-btn:hover { border-color: var(--accent); color: var(--accent); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.icon-btn-danger { border-color: var(--error); color: var(--error); }

.board-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.board-expand-btn svg { transition: transform 0.15s ease; }
.board-expand-btn.open svg { transform: rotate(90deg); }

.board-member-row td { border-bottom: none; padding: 0.3rem 0.5rem; font-size: 0.85rem; }
/* Name/rol-dropdown/remove-cross (or, on the add-account row, kies-
   account/rol/toevoegen) all share this one now fixed-width column (see
   #boards-table's table-layout:fixed above). nowrap, not wrap - the
   fixed-width "tab stop" below already caps the name/select's own width,
   so the remaining role-select + remove/toevoegen button always have
   room to sit right after it; left as wrap, this row broke onto multiple
   lines the moment it didn't fit rather than the row genuinely needing
   to (reported directly, at several different widths - was previously
   only fixed for the add-account row specifically, see the removed
   .board-add-account-row override this replaced). */
.board-member-row td.board-member-name {
  padding-left: 1.5rem;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: center;
}
/* Fixed-width "tab stop" for the first control (username, or "Kies
   account"/"Kies project" on the add-account row) - without it, the
   rol-dropdown right after starts wherever that name happens to end, so
   it drifts left/right from row to row instead of lining up. max-width +
   ellipsis on top of that - accounts.js's own add-row lists board NAMES
   as options (can run considerably longer than a username), and a
   native <select> otherwise sizes itself to its widest option's text
   regardless of min-width, which pushed the role-dropdown and
   "toevoegen" past the row's available width and wrapped them onto their
   own line. */
.board-member-name > :first-child {
  display: inline-block;
  min-width: 8rem;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The 1.5rem indent above reads fine as "nested under the board/account
   row above it" at desktop width, next to that row's own icon/chevron
   column - but accounts.js's/projects.js's own accounts-table/boards-
   table each collapse their leading columns away below 700px (this
   file's own compact redesigns further up/down), so at that width the
   indent no longer lines up with anything - it just reads as content
   drifting right for no reason, explicit report. Left-aligned with the
   row's own generic 0.5rem cell padding here instead, matching every
   other cell at this width. */
@media (max-width: 700px) {
  .board-member-row td.board-member-name {
    padding-left: 0.5rem;
  }
}

/* #boards-table specifically (projects.js) - the 0.5rem padding-left
   above only resets this cell's OWN inset from wherever its column
   starts; it doesn't address that col-expand (the arrow's own column)
   never actually collapses at this breakpoint the way col-slug/
   col-password do for their own tables, so col-name (and so this cell)
   still starts a full 2.2rem (col-expand's own fixed width, above) past
   the table's left edge - well past where the arrow itself sits (that
   same 0.5rem cell padding, in col-expand's own cell). Reported directly
   ("align with the arrow"). position:relative + a matching negative left
   shifts this cell's painted position back to line up with it, without
   touching the actual column layout (margin has no effect on table
   cells, hence position instead) - col-expand's own cell is empty on
   every member/detail row this applies to, so there's nothing under it
   to visually collide with. */
@media (max-width: 700px) {
  #boards-table .board-member-name {
    position: relative;
    left: -2.2rem;
  }
}

/* Webadres field (projects.js's own boardDetailFieldsRowHtml, narrow
   width only) - its <label> is .board-member-name's first (and only)
   child, so it inherited that rule's own 8rem tab-stop cap (above),
   meant for a short username/account-name column, not a full webadres
   slug input - reported directly as "too narrow", and removing the cap
   alone (max-width/min-width/width:100% - first attempt, reported as
   still not wide enough) didn't actually help: this label is a flex ITEM
   of the outer row (.board-member-row td.board-member-name is
   display:flex), and a flex item's default flex:0 1 auto means it never
   grows past its own content's natural size regardless of width:100% -
   that property is a sizing *hint* flexbox is free to ignore in favor of
   its own flex-basis/grow math. flex:1 1 auto is what actually makes it
   claim the row's leftover space; .slug-input itself was already flex:1
   (styles.css) the whole time, it just never had a wide-enough ancestor
   to be a fraction OF. */
#boards-table .board-detail-fields-row .board-member-name > :first-child {
  max-width: none;
  min-width: 0;
  flex: 1 1 auto;
}

/* Webadres prefix as plain text, not inside the same bordered "field" box
   as the editable slug - explicit follow-up request. .slug-input-group's
   shared border/background (styles.css) moves onto .slug-input alone
   here; the prefix span keeps no border/background of its own, reading
   as plain inline text immediately ahead of the real (now separately
   boxed) input. Scoped to this one narrow-width detail row specifically -
   every other .slug-input-group user (the desktop board row, "nieuw
   project" form, personal-feed/ical-import links) is untouched, still one
   shared box. */
@media (max-width: 700px) {
  .board-detail-fields-row .slug-input-group {
    border: none;
    background: none;
  }
  .board-detail-fields-row .slug-input {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    min-width: 0;
  }
  .board-detail-fields-row .slug-input:focus {
    border-color: var(--accent);
  }
  /* "Nieuw project" form's own slug field (#new-board-form, admin/
     projects.js) - explicit follow-up request, roughly double its old
     browser-default intrinsic width (~170px, no size attribute of its
     own) on a narrow phone. .inline-form itself already spans the full
     row width (a block-level flex container) with room to spare here,
     so flex:1 1 auto is enough to claim it - same technique as the
     board-detail-fields-row fix above, just without needing a matching
     min-width:0 reset (this group was never capped by a sibling's own
     fixed width the way that row's name column was). */
  #new-board-form .slug-input-group {
    flex: 1 1 auto;
  }
}
/* Everything after the name/tab-stop (role select, remove/toevoegen
   button) - flex-shrink:0, since flex items shrink by default once
   flex-wrap:nowrap (above) leaves them no room to wrap instead. Without
   this, a tight row shrank the role-select AND the icon button down to
   a sliver right along with the name - only the name has ellipsis
   truncation to fall back on, so it should be the only thing that ever
   actually shrinks; reported directly as the remove button becoming
   "very small" at most widths. */
.board-member-name > :not(:first-child) {
  flex-shrink: 0;
}
.board-member-row select,
.board-add-account-row button:not(.icon-btn) {
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}
.board-member-row select:disabled,
.board-add-account-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* First row of an expanded board's member block (see projects.js's
   membersRowsHtml, prepended before the member rows - explicit request) -
   a little extra room under the title row above it. */
.board-add-account-row td { padding-top: 0.6rem; }
/* Explicitly marked by projects.js (memberRowHtml/membersRowsHtml) on
   whichever row actually renders last - :last-child can't tell that apart
   from "last sibling in the shared tbody" when board rows and member rows
   interleave, and the last row isn't always the same element (add-account
   row, a member row, or a "geen accounts" hint, depending on state). */
.board-members-last td { padding-bottom: 0.8rem; border-bottom: 1px solid var(--border); }

/* ---- Settings sidebar (Accounts/Projecten/per-board list) ----
   Server-injected (server.js's settingsSidebarSnippet) - same block
   duplicated in board-admin/accounts.css (no third stylesheet is shared
   between the two page families), matching this codebase's established
   "small shared bits get duplicated per page" convention. Both files
   already define the same --accent token above, so the active state
   needs no new variable. */
/* body's own max-width/margin:auto (top of this file) centers every
   other portal.css page - settings pages instead pin the sidebar to the
   browser's left edge, so .settings-main gets its own reading-width cap
   below instead. */
/* height:100vh + flex column + overflow:hidden - the header/sidebar stay
   put and only .settings-main (overflow-y:auto below) scrolls once its
   own content is taller than the window, instead of the whole page
   scrolling the header and menu away too (explicit request). */
body:has(.settings-layout) {
  max-width: none;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.settings-layout { display: flex; align-items: stretch; flex: 1 1 auto; min-height: 0; margin: 0 -0.75rem; }
.settings-nav {
  flex: 0 0 200px;
  /* Explicit, not left to .settings-layout's own align-items:stretch
     alone - reported directly ("make the left menu go to the edge of
     the bottom window"): the light-blue background was stopping short
     of the window's own bottom edge on a short account/board list
     instead of reaching it. height:100% (not min-height) matches
     .settings-main's own identical fixed-then-internally-scrolling
     treatment (its own overflow-y:auto, further down) - a longer list
     than the window still scrolls inside this same fixed box rather
     than growing past it. */
  height: 100%;
  padding: 1.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  /* Same fixed light-blue as .settings-subtitle-bar above (explicit color
     choice, re-applied here on purpose) - color:#1a1a1a alongside it,
     not just var(--header-bg)'s own previously-theme-adaptive pairing,
     since .settings-nav-item's own color:inherit would otherwise pull in
     a light var(--fg) in dark mode, unreadable against this fixed
     background. */
  background: #d9f7ff;
  color: #1a1a1a;
}

/* Dark-mode counterpart of the fixed light-blue above - reported directly
   as missing entirely (the sidebar stayed light-blue/near-black-text even
   in dark mode). A dark, desaturated version of the same blue hue rather
   than reusing the generic var(--header-bg) dark value (#222, styles.css)
   - keeps this sidebar reading as its own distinct panel, same relationship
   the light version has to the rest of the page, instead of blending into
   every other neutral dark surface. Explicit fixed color pair, same
   reasoning as the light version's own comment (not var(--fg), which
   .settings-nav-item's color:inherit would otherwise pull in - correct in
   dark mode on its own, but this keeps both themes following the same
   "explicit pairing" convention rather than one relying on inherit and
   the other not). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .settings-nav {
    background: #12232b;
    color: #e8e8e8;
  }
}
:root[data-theme="dark"] .settings-nav {
  background: #12232b;
  color: #e8e8e8;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.settings-nav-item svg { flex: 0 0 auto; }
.settings-nav-item:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.settings-nav-item.active { background: var(--accent); color: #fff; }
.settings-nav-boards { margin-top: 0.4rem; margin-left: 2.25rem; display: flex; flex-direction: column; gap: 0.1rem; }
.settings-nav-item-board { font-size: 0.85rem; font-weight: normal; padding: 0.4rem 0.75rem; }
.settings-nav-item-view { margin-top: 1rem; }

/* Explicit follow-up request: "there is a distinction between
   information and settings... for admin accounts there needs to be a
   division for this" - a plain small label above each group
   (settingsSidebarSnippet/accountSettingsNavSnippet, server.js), color:
   inherit (not var(--fg)) for the same reason .settings-nav-item already
   does that - this sidebar has its own fixed light-blue/dark-blue
   background+text-color pair regardless of site-wide theme. :first-child
   skips the usual top gap since it's already the first thing in the
   list. */
.settings-nav-section-label {
  /* Explicit follow-up request: "add a bit more margin between the menu
     sections" - was 0.9rem, read as too close to the section above it
     (Uitleg -> Acties, Facturen -> Instellingen). */
  margin: 1.6rem 0 0.15rem;
  padding: 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: inherit;
  opacity: 0.55;
}
.settings-nav-section-label:first-child {
  margin-top: 0;
}

/* The member sidebar's own "Language" - explicit follow-up request:
   "for non-admin accounts there is no need for a link to 'settings'...
   drop it, just Language, unlabeled" - not worth a whole section header
   for one item, but still needs *some* visual separation from the
   Informatie group above it (same reasoning .settings-nav-item-view
   above already established for an admin-only item in the same spot). */
.settings-nav-item-standalone { margin-top: 1rem; }

/* Hidden above 850px (the full sidebar already fits/reads fine there) -
   only appears once .settings-nav itself collapses to a 30px strip
   below, see that media query for the actual show/hide split. Toggled
   by board-switcher.js (loaded on every settings page already), not a
   per-page script, since all 4 settings pages share this exact markup. */
.settings-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.4rem 0;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

@media (max-width: 850px) {
  /* Stays a fixed 30px strip whether open or closed - the expanded
     panel below is a position:absolute overlay on top of .settings-main
     instead of widening this flex box, so opening/closing the menu
     never shifts or resizes the page content next to it (explicit
     request: "overlap", not push). */
  .settings-nav {
    position: relative;
    flex: 0 0 30px;
    width: 30px;
    padding: 0.5rem 0;
    align-items: center;
    /* Explicit, on top of the min-width:851px scoping further down on
       that rule's own overflow-y:auto - without either fix, that rule
       clipped the overlay panel below to this 30px box the instant it
       tried to escape it, which is why it rendered "underneath" the
       page content instead of on top of it. */
    overflow: visible;
  }
  .settings-nav-toggle { display: flex; }
  .settings-nav-items { display: none; }
  /* Open state looks exactly like the normal wide-window sidebar (same
     200px width, same padding/background) instead of a small dropdown -
     explicit request. top:0/bottom:0 (not a fixed height) so it always
     reaches the full height of .settings-nav's own box, whatever that
     happens to be. Covers the toggle button underneath it once open
     (z-index alone, no extra hide/show JS needed) - reopening isn't
     needed since this only ever closes via a nav-item pick or an
     outside click (board-switcher.js), never a second toggle click. */
  .settings-nav.open .settings-nav-items {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 200px;
    max-width: calc(100vw - 1.5rem);
    padding: 1.5rem 0.75rem;
    /* Same fixed light-blue + explicit text color as the expanded
       .settings-nav itself (see its own comment) - this is the exact
       same nav content, just repositioned as an overlay panel. */
    background: #d9f7ff;
    color: #1a1a1a;
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    z-index: 25;
  }
}
@media (max-width: 850px) and (prefers-color-scheme: dark) {
  /* Dark-mode counterpart of the overlay panel above - same pairing as
     .settings-nav's own identical dark-mode rule further up. */
  :root:not([data-theme="light"]) .settings-nav.open .settings-nav-items {
    background: #12232b;
    color: #e8e8e8;
  }
}
@media (max-width: 850px) {
  :root[data-theme="dark"] .settings-nav.open .settings-nav-items {
    background: #12232b;
    color: #e8e8e8;
  }
}

/* Member-facing settings reached via a plain "instellingen" link (not
   the sidebar's own Projecten/iCal-feeds entry, which appends ?open=1 -
   server.js's serveAccountSettingsHtml) land here with nothing selected
   in the nav - the content pane matches that by staying blank too,
   rather than jumping straight into that one page's own content. Same
   mechanism/markup as board-admin/accounts.css's own identical rule for
   the admin-facing settings pages. */
#settings-placeholder { display: none; }
body.settings-blank #settings-content { display: none; }
body.settings-blank #settings-placeholder { display: block; }

/* Explicit follow-up request: "create this for the blank opening page" -
   #settings-placeholder's own content (server.js's own
   accountInformatieDirectoryHtml) - a real "Informatie" directory instead
   of a single hint sentence. .settings-directory-link reuses
   .admin-section's own general card look (border/radius/padding) rather
   than the sidebar's own fixed-blue .settings-nav-item styling, since
   this sits in the plain page background, not that separate panel. */
.settings-directory-section h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.settings-directory-link {
  display: block;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.settings-directory-link:hover { background: var(--header-bg); }
.settings-directory-link-standalone { margin-top: 0.75rem; }
/* On this same blank landing page, below 850px, there is no content pane
   to justify collapsing the nav behind a tap - it's the only thing on
   screen, so show it expanded directly instead of the 30px toggle strip
   used everywhere else below that width. */
body.settings-blank .settings-nav {
  position: static;
  flex: 0 0 auto;
  width: auto;
  padding: 1.5rem 0.75rem;
  align-items: stretch;
  overflow: visible;
}
body.settings-blank .settings-nav-toggle { display: none; }
body.settings-blank .settings-nav-items {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  position: static;
  width: auto;
  max-width: none;
  padding: 0;
  background: none;
  border-right: none;
  box-shadow: none;
  overflow-y: visible;
}

/* .settings-main itself spans the full remaining width (no max-width) so
   its own scrollbar sits flush against the browser's right edge, not
   wherever the capped content happens to end - .settings-inner (below)
   carries the actual reading-width cap/padding instead, same as before
   just moved down one level. padding-bottom - this is the element that
   actually scrolls, so its own bottom content is what the fixed
   .save-top-bar could otherwise cover once something's staged. */
.settings-main { flex: 1 1 auto; min-width: 0; padding-bottom: 3.5rem; overflow-y: auto; }
.settings-inner { max-width: 900px; padding: 0.75rem; }
/* The sidebar itself scrolls independently too, on the rare window short
   enough (or board list long enough) that it wouldn't otherwise fit -
   same reasoning as .settings-main above, just for the nav column. Only
   above 850px - below it .settings-nav is a collapsed 30px strip (see
   that media query), and this rule's own overflow-y:auto would clip the
   overlay panel the toggle button opens the instant it tried to escape
   that 30px box (same specificity, later in source order than the
   media query's own overflow:visible, so it would otherwise win the
   cascade for this property and silently undo that fix). */
@media (min-width: 851px) {
  .settings-nav { overflow-y: auto; }
}

/* ---- Accounts: per-admin access to optional settings pages
   (admin/accounts.js accountAccessRowHtml) ---- */
.account-access-row td.board-member-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.account-access-label {
  font-weight: 600;
}

/* ---- Statistieken (admin/stats.html, admin/stats.js) ----
   Explicit request for a more professional, symmetrical look: every card
   gets the same header bar (title left, its action right), filters sit in
   a two-column grid with label-above fields of one height, and the save
   form is the filter card's tinted footer. */
/* Wider than the other settings pages: the result table needs the room. */
.settings-inner.stats-page {
  max-width: 1200px;
}
/* Compact (explicit request: less padding, lower fields - the filters
   were too much to take in at once). --py/--px: the card's padding, which
   the header bar, footer and settings panel bleed out over. */
.stats-card {
  --stats-field-h: 1.9rem;
  --py: 1rem;
  --px: 1.25rem;
  padding: var(--py) var(--px);
}
.stats-card-header,
.stats-card > h2:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* Lower bars (explicit request) - the result above gets the focus. */
  min-height: 2.3rem;
  margin: calc(-1 * var(--py)) calc(-1 * var(--px)) var(--py);
  font-size: 0.95rem;
  padding: 0 var(--px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  border-radius: 10px 10px 0 0;
}
.stats-card-header h2 {
  margin: 0;
  font-size: inherit;
}
.stats-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 1.85rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.stats-header-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.stats-primary-btn {
  height: var(--stats-field-h);
  padding: 0 1rem;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.stats-primary-btn:hover {
  filter: brightness(1.08);
}

/* Saved setups */
.stats-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.stats-presets .hint {
  margin: 0;
}
.stats-preset {
  display: inline-flex;
  align-items: stretch;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.85rem;
  transition: border-color 0.15s ease;
}
.stats-preset:hover {
  border-color: var(--accent);
}
.stats-preset button {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.stats-preset-open {
  padding: 0 0.4rem 0 0.9rem;
  font-weight: 500;
}
.stats-preset-open:hover {
  color: var(--accent);
}
.stats-preset-delete {
  padding: 0 0.7rem 0 0.3rem;
  opacity: 0.45;
}
.stats-preset-delete:hover {
  opacity: 1;
  color: var(--error);
}
#stats-presets-error:empty,
#stats-save-error:empty {
  display: none;
}

.stats-filter-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}
.stats-save-row input {
  box-sizing: border-box;
  width: 100%;
  height: var(--stats-field-h);
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background-color: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.stats-save-row input:hover {
  border-color: color-mix(in srgb, var(--fg) 30%, var(--border));
}
.stats-save-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.stats-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  height: 1.5rem;
  padding: 0 0.2rem 0 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--fg));
  font-size: 0.82rem;
  font-weight: 500;
}
.stats-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border: none;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.stats-chip button:hover {
  opacity: 1;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.stats-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--stats-field-h);
  font-size: 0.85rem;
  cursor: pointer;
}
.stats-toggle input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
}
.stats-toggle small {
  display: block;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* Save form at the bottom of Opgeslagen statistieken - just the field and
   its button (explicit request: no label, no grey footer bar). */
.stats-save-form {
  margin-top: 0.75rem;
}
.stats-save-row {
  display: flex;
  flex: 1 1 18rem;
  gap: 0.5rem;
  max-width: 30rem;
}
.stats-save-row input {
  flex: 1;
  min-width: 0;
}
.stats-save-form .error {
  margin: 0.2rem 0 0;
}

/* Result */
.stats-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.stats-table {
  font-size: 0.9rem;
}
.stats-table td,
.stats-table th {
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
}
.stats-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fg) 65%, transparent);
}
.stats-table tbody tr:last-child td {
  border-bottom: none;
}
.stats-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}
.stats-empty {
  opacity: 0.4;
}
/* Faded via color, not opacity - opacity would fade the cell's row
   background too. */
.stats-estimated {
  font-style: italic;
  color: color-mix(in srgb, var(--fg) 65%, transparent);
}
.stats-total td {
  font-weight: 700;
  background: var(--header-bg);
  border-top: 1px solid color-mix(in srgb, var(--fg) 35%, var(--border));
}
/* Clickable result rows - expanding lists their shows underneath. */
.stats-row {
  cursor: pointer;
}
.stats-row > td {
  transition: background 0.12s ease;
}
.stats-row:hover > td {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.stats-row.stats-total:hover > td {
  background: color-mix(in srgb, var(--accent) 6%, var(--header-bg));
}
.stats-row.open > td {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-bottom-color: transparent;
}
.stats-chevron {
  margin-right: 0.5rem;
  opacity: 0.5;
  transition: transform 0.18s ease;
  vertical-align: -1px;
}
.stats-row.open .stats-chevron {
  transform: rotate(90deg);
  opacity: 0.8;
}
.stats-shows-row > td {
  padding: 0 0.9rem 0.9rem 2.15rem !important;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.stats-shows {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg);
  font-size: 0.82rem;
}
.stats-shows th,
.stats-shows td {
  padding: 0.4rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  font-weight: normal;
}
/* Long client/venue names wrap instead of pushing the table wider. */
.stats-shows td:nth-child(3),
.stats-shows td:nth-child(4) {
  white-space: normal;
  min-width: 9rem;
}
.stats-shows tbody tr:last-child td {
  border-bottom: none;
}
.stats-shows th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fg) 60%, transparent);
  background: var(--header-bg);
}
.stats-show {
  cursor: pointer;
}
.stats-show td {
  transition: background 0.12s ease;
}
.stats-show:hover td {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Sortable headers (admin/stats.js: result table and show lists). */
.stats-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.12s ease;
}
.stats-sortable:hover {
  color: var(--accent) !important;
}
.stats-sort-arrow {
  margin-left: 0.3rem;
  font-size: 0.75em;
  color: var(--accent);
}
/* Info button at the end of the controls row (admin/stats.js setInfoOpen)
   - a small round "i"; its popup floats under it like the Kolommen list. */
.stats-info {
  position: relative;
}
.stats-info[hidden],
.stats-info-pop[hidden] {
  display: none;
}
.stats-info-btn {
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  color: inherit;
  font: italic 600 0.8rem/1 Georgia, 'Times New Roman', serif;
  opacity: 0.65;
  cursor: pointer;
}
.stats-info-btn:hover,
.stats-info-btn[aria-expanded="true"] {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}
.stats-info-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: min(20rem, calc(100vw - 2rem));
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 0.8rem;
  line-height: 1.45;
}
.stats-info-pop p {
  margin: 0;
}
.stats-info-pop p + p {
  margin-top: 0.4rem;
}

/* Places without a province - a collapsible card, header bar = summary */
#stats-unknown-section summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
#stats-unknown-section summary::-webkit-details-marker {
  display: none;
}
#stats-unknown-section summary::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.5;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.18s ease;
}
#stats-unknown-section details[open] summary::after {
  transform: translateY(25%) rotate(-135deg);
}
/* Border kept, just invisible: dropping it made the bar 1px lower, so
   the centered title jumped when unfolding (explicit bug report). */
#stats-unknown-section details:not([open]) summary {
  margin-bottom: calc(-1 * var(--py));
  border-bottom-color: transparent;
  border-radius: 10px;
}
.stats-unknown-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}
.stats-unknown-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
  align-items: center;
  gap: 1rem;
  max-width: 36rem;
}
.stats-unknown-list select {
  height: 2rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}
#stats-overrides h3 {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* Booking editor pop-up (admin/stats.js openBookingEditor): the Tour
   planning in an iframe, almost full-screen. */
.stats-editor {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: rgba(0, 0, 0, 0.45);
}
.stats-editor[hidden] {
  display: none;
}
.stats-editor-box {
  display: flex;
  flex-direction: column;
  width: min(1400px, 100%);
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.stats-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0 1.25rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.stats-editor-header button {
  height: 2rem;
  padding: 0 0.9rem;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
#stats-editor-frame {
  flex: 1;
  width: 100%;
  border: 0;
}
body.stats-editor-open {
  overflow: hidden;
}

@media screen and (max-width: 600px) {
  .stats-card {
    --py: 0.85rem;
    --px: 0.9rem;
  }
  .stats-unknown-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }
  .stats-editor {
    padding: 0;
  }
  .stats-editor-box {
    border-radius: 0;
  }
}

/* ---- Mijlpalen card (admin/stats.html #ms-section, admin/stats.js) ----
   Komend | Bereikt side by side, each booking a date block plus its
   milestone(s) as number badges; "Op weg naar" below with progress bars;
   the settings fold out under the header as a tinted panel. */
.ms-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  margin: calc(-1 * var(--py)) calc(-1 * var(--px)) var(--py);
  padding: var(--py) var(--px);
  background: color-mix(in srgb, var(--header-bg) 60%, var(--bg));
  border-bottom: 1px solid var(--border);
}
.ms-settings[hidden] {
  display: none;
}
/* Cards that fold in (admin/stats.js "Folding cards in"): the header bar
   toggles, same chevron as the provinces card; folded, only the bar
   stays, without its other buttons. */
.stats-collapsible > .stats-card-header {
  cursor: pointer;
}
.stats-collapse {
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.stats-collapsible > .stats-card-header h2 {
  margin-right: auto !important;
}
.stats-collapsible > .stats-card-header::after {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.5;
  transform: translateY(25%) rotate(-135deg);
  transition: transform 0.18s ease;
}
.stats-collapsed > .stats-card-header::after {
  transform: translateY(-25%) rotate(45deg);
}
.stats-collapsed > :not(.stats-card-header),
.stats-collapsed > .stats-card-header .stats-header-btn {
  display: none !important;
}
.stats-collapsed > .stats-card-header {
  margin-bottom: calc(-1 * var(--py));
  border-bottom-color: transparent;
  border-radius: 10px;
}
/* "2 actief" next to a folded Filters title. */
.ms-settings-block {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
.ms-settings-block h3 {
  margin: 0;
}
.ms-small {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}
.ms-rules {
  display: grid;
  gap: 0.4rem;
}
.ms-rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9rem 6.5rem;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.15s ease;
}
.ms-rule-off > input,
.ms-rule-off > .ms-every {
  opacity: 0.4;
}
.ms-rule .stats-toggle {
  min-height: 2rem;
}
.ms-rule input[type="text"],
.ms-rule input[type="number"],
.ms-offset-form input,
.ms-offset-form select {
  box-sizing: border-box;
  width: 100%;
  height: 2rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}
.ms-rule input:focus,
.ms-offset-form input:focus,
.ms-offset-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.ms-every {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0.8;
}
.ms-every input {
  min-width: 0;
}
/* No spinner arrows - they ate the room for "100". */
.ms-rule input[type="number"],
.ms-offset-form input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.ms-rule input[type="number"]::-webkit-inner-spin-button,
.ms-offset-form input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ms-offsets {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
}
.ms-offsets:empty {
  display: none;
}
.ms-offsets li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 2rem;
  padding: 0 0 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
}
.ms-offsets .hint {
  margin-left: 0.3rem;
  font-size: 0.78rem;
}
.ms-offset-count {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ms-offsets .stats-preset-delete {
  align-self: stretch;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
}
.ms-offset-form {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) 5.5rem auto;
  gap: 0.5rem;
}
.ms-offset-names {
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}
.ms-offset-form .stats-primary-btn {
  height: 2rem;
  padding: 0 0.9rem;
  font-size: 0.85rem;
}
#ms-error:empty {
  display: none;
}
#ms-error {
  margin: 0;
}

.ms-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.ms-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ms-toolbar-right {
  display: flex;
  gap: 0.5rem;
}
.ms-toolbar-right input,
.ms-toolbar-right select {
  box-sizing: border-box;
  height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background-color: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
}
.ms-toolbar-right input {
  width: 15rem;
}
.ms-toolbar-right select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  cursor: pointer;
}
.ms-toolbar-right input:focus,
.ms-toolbar-right select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.ms-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 2rem;
}
.ms-heading {
  margin: 0 0 0.6rem;
}
.ms-heading-note {
  margin-left: 0.4rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.ms-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ms-item {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.ms-item:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.ms-item.ms-today {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.ms-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.3rem 0 0.35rem;
  border-radius: 7px;
  background: var(--header-bg);
  line-height: 1.1;
  text-align: center;
}
.ms-weekday,
.ms-month,
.ms-year {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}
.ms-day {
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ms-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.ms-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.ms-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 1.45rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ms-badge-soft {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--fg));
}
.ms-what {
  min-width: 0;
}
.ms-pos {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.6;
}
.ms-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.6rem;
  font-size: 0.8rem;
  opacity: 0.7;
}
.ms-when {
  margin-left: auto;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.ms-empty {
  padding: 0.9rem;
  border: 1px dashed var(--border);
  border-radius: 9px;
  font-size: 0.85rem;
  opacity: 0.6;
  text-align: center;
}
.ms-more {
  display: flex;
  justify-content: center;
  padding-top: 0.2rem;
}

.ms-progress-wrap {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.ms-progress-wrap[hidden] {
  display: none;
}
.ms-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ms-progress-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem 3.8rem;
  align-items: center;
  gap: 0.7rem;
  min-height: 2rem;
  font-size: 0.88rem;
}
.ms-progress-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.ms-progress-text .ms-what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-bar {
  height: 0.4rem;
  border-radius: 999px;
  background: var(--header-bg);
  overflow: hidden;
}
.ms-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.ms-progress-count {
  font-size: 0.8rem;
  text-align: right;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media screen and (max-width: 900px) {
  .ms-settings,
  .ms-columns,
  .ms-progress {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media screen and (max-width: 600px) {
  .ms-rule {
    grid-template-columns: minmax(0, 1fr) 6.5rem;
  }
  .ms-rule .stats-toggle {
    grid-column: 1 / -1;
  }
  .ms-offset-form {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
  }
  .ms-offset-form select,
  .ms-offset-names {
    grid-column: 1 / -1;
  }
  .ms-toolbar-right {
    width: 100%;
  }
  .ms-toolbar-right input {
    flex: 1;
    width: auto;
    min-width: 0;
  }
}

/* ---- Resultaat on a phone (admin/stats.js renderResult) ----
   Explicit request: the table was unreadable at phone width (1000px of
   columns in 300). Below 600px every result row becomes a card - its
   name on top, the numbers in a 3-column grid with their column name
   (td[data-label]) above them - and an opened row's shows become compact
   two-line items. Sorting moves to .stats-mobile-sort. Desktop keeps
   the table; these bits stay hidden. */
.stats-mobile-sort,
.stats-shows .s-where,
.stats-shows .s-times {
  display: none;
}
@media screen and (max-width: 600px) {
  .stats-mobile-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
  }
  .stats-mobile-sort label {
    opacity: 0.65;
  }
  .stats-mobile-sort select {
    flex: 1;
    min-width: 0;
    height: 1.85rem;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--bg);
    color: var(--fg);
    font: inherit;
  }
  .stats-mobile-sort .stats-header-btn:disabled {
    opacity: 0.4;
  }
  .stats-table-wrap {
    overflow: visible;
    border: none;
    border-radius: 0;
  }
  .stats-table,
  .stats-table > tbody {
    display: block;
  }
  .stats-table > thead {
    display: none;
  }
  .stats-table > tbody > tr.stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
    margin-bottom: 0.5rem;
    padding: 0.7rem 0.85rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 9px;
  }
  .stats-table > tbody > tr.stats-row > td {
    display: block;
    padding: 0;
    border: none;
    background: none !important;
    text-align: left !important;
    white-space: normal;
  }
  .stats-table > tbody > tr.stats-row > td:empty {
    display: none;
  }
  .stats-table > tbody > tr.stats-row > td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.66rem;
    font-weight: 600;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--fg) 55%, transparent);
  }
  .stats-table > tbody > tr.stats-row > td.stats-key {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    font-weight: 600;
  }
  /* A second grouping: under the first, as a subtitle. */
  .stats-table > tbody > tr.stats-row > td.stats-key + td.stats-key {
    margin-top: -0.45rem;
    font-size: 0.82rem;
    font-weight: 400;
    opacity: 0.7;
  }
  .stats-table > tbody > tr.stats-row:hover {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  }
  .stats-table > tbody > tr.stats-row.open {
    margin-bottom: 0;
    border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
  }
  .stats-table > tbody > tr.stats-total {
    background: var(--header-bg);
  }
  .stats-table > tbody > tr.stats-total > td {
    border-top: none;
  }
  /* An opened row's shows: hanging under its card. */
  .stats-table > tbody > tr.stats-shows-row {
    display: block;
    margin-bottom: 0.5rem;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    border-top: none;
    border-radius: 0 0 9px 9px;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
  }
  .stats-table > tbody > tr.stats-shows-row > td {
    display: block;
    padding: 0 0.5rem 0.5rem !important;
    border: none;
    background: none;
  }
  .stats-shows,
  .stats-shows > tbody {
    display: block;
    border: none;
    background: none;
  }
  .stats-shows > thead {
    display: none;
  }
  .stats-shows > tbody {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .stats-shows tr.stats-show {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "date prod pub" "where where pub";
    align-items: baseline;
    gap: 0.1rem 0.6rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
  }
  .stats-shows tr.stats-show > td {
    display: block;
    padding: 0;
    border: none;
    white-space: normal;
  }
  .stats-shows .s-date {
    grid-area: date;
    font-variant-numeric: tabular-nums;
    white-space: nowrap !important;
  }
  .stats-shows .s-prod {
    grid-area: prod;
    font-weight: 500;
  }
  .stats-shows .s-pub {
    grid-area: pub;
    align-self: center;
    font-weight: 600;
  }
  .stats-shows .s-where {
    display: block;
    grid-area: where;
    font-size: 0.78rem;
    opacity: 0.7;
  }
  .stats-shows .s-times {
    display: inline;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.6;
  }
  .stats-shows .s-loc,
  .stats-shows .s-stad,
  .stats-shows .s-soort,
  .stats-shows .s-aantal {
    display: none !important;
  }
}

/* Settings side menu on a phone (explicit request: the 30px strip took
   too much room). Below 600px the menu takes no width at all: .settings-nav
   becomes a zero-width overlay on the layout's left edge, and its toggle a
   small tab in the top-left corner (styled like .settings-subtitle-bar,
   the page-name tab next to it). The open panel is unchanged - it already
   overlays the page from .settings-nav's left edge (the 850px rules). */
@media screen and (max-width: 600px) {
  .settings-layout {
    position: relative;
  }
  .settings-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    flex: none;
    width: 0;
    height: auto;
    padding: 0;
  }
  .settings-nav-toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 2.6rem;
    height: 2.1rem;
    padding: 0;
    /* inherit: the nav's own light/dark blue pair. */
    background: inherit;
    border: solid var(--border);
    border-width: 0 1px 1px 0;
    border-radius: 0 0 8px 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }
}

/* ---- Resultaat at the top, without a card (admin/stats.html
   #stats-result-section) ----
   Explicit request: the result was a section inside a section and didn't
   stand out among the setting cards. Now it's open page content: a large
   title + one-line summary, the totals as big figures, and the table
   with only row lines - the bordered cards follow underneath. */
.stats-hero {
  --py: 0;
  --px: 0;
  margin: 0.5rem 0 2.25rem;
}
.stats-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
/* The heading is what the result covers ("Seizoen 2025/2026 · Geel") -
   no separate "Resultaat" title (explicit request: that's obvious). */
.stats-hero-summary {
  min-width: 0;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.stats-hero-head .stats-header-btn {
  flex: none;
}
/* The heading as a quick production filter (admin/stats.js
   renderQuickList) - reads as the plain title, a small arrow says it
   opens; the list reuses the Kolommen list's look. */
.stats-quick {
  position: relative;
  min-width: 0;
}
.stats-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stats-quick-btn svg {
  flex: none;
  opacity: 0.45;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.stats-quick-btn:hover svg,
.stats-quick-btn[aria-expanded="true"] svg {
  opacity: 1;
}
.stats-quick-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.stats-quick-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* As wide as the names, not the heading above it (min-width: 100% from
   .stats-columns-list would follow a long "Productie: ..." title). */
.stats-quick > .stats-quick-list {
  width: max-content;
  min-width: 12rem;
  max-width: calc(100vw - 2rem);
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.9rem;
}
.stats-hero-head {
  align-items: center;
}
/* Filter dropdown (admin/stats.js renderFilters): a list of filter rows,
   the open row's submenu beside it in the same box. On a phone the
   submenu takes the list's place (back button). */
.stats-filter-menu {
  position: relative;
}
.stats-filter-panel:not([hidden]) {
  display: flex;
  align-items: stretch;
  padding: 0;
}
.stats-filter-rows {
  flex: none;
  width: 14rem;
  padding: 0.3rem;
}
.stats-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: none;
  border-radius: 5px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.stats-filter-row:hover,
.stats-filter-row.open {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.stats-filter-row > :first-child {
  flex: none;
}
.stats-filter-row-note {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  color: var(--accent);
  font-size: 0.8rem;
}
.stats-filter-row-arrow {
  flex: none;
  opacity: 0.45;
}
.stats-filter-sub {
  width: 16rem;
  max-height: min(70vh, 26rem);
  overflow-y: auto;
  padding: 0.3rem;
  border-left: 1px solid var(--border);
}
.stats-filter-sub[hidden] {
  display: none;
}
.stats-filter-sub-head {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.6;
}
.stats-filter-back {
  display: none;
  padding: 0 0.3rem;
  border: none;
  background: none;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.stats-filter-search {
  box-sizing: border-box;
  width: calc(100% - 0.6rem);
  height: 1.9rem;
  margin: 0.1rem 0.3rem 0.3rem;
  padding: 0 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.stats-filter-search:focus {
  outline: none;
  border-color: var(--accent);
}
.stats-filter-sub-extra {
  margin-top: 0.3rem;
  padding-top: 0.3rem;
  border-top: 1px solid var(--border);
}
.stats-filter-sub-extra.stats-date-range {
  padding: 0.5rem 0.3rem 0.2rem;
}
.stats-filter-empty {
  margin: 0.4rem 0.5rem;
  font-size: 0.85rem;
  opacity: 0.5;
}
.stats-date-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
}
.stats-date-range input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 1.9rem;
  padding: 0 0.3rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 0.8rem;
}
/* Active filters as chips under the controls (renderActiveFilters). */
.stats-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: -0.4rem 0 1rem;
}
.stats-active-filters[hidden] {
  display: none;
}
.stats-filters-clear {
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  opacity: 0.6;
  cursor: pointer;
}
.stats-filters-clear:hover {
  opacity: 1;
}
/* Big totals (admin/stats.js renderKpis): five figures on a line, the
   numbers shrinking with the width (container units) down to a floor,
   below which the grid wraps to more lines. Dividers are each figure's
   left border, pulled 1px out so the first one of every line is clipped
   off by the overflow. */
.stats-kpis {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.75rem 0;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-kpis:empty {
  display: none;
}
.stats-kpi {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  margin-left: -1px;
  padding: 0 1rem;
  border-left: 1px solid var(--border);
}
.stats-kpi-value {
  font-size: clamp(1.25rem, 4.2cqi, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.stats-kpi-value.stats-estimated {
  font-weight: 600;
}
.stats-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Totals block, first thing on the page, one line below it. */
.stats-kpi-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.stats-kpi-block:has(> .stats-kpis:empty) {
  display: none;
}
.stats-kpi-block > .stats-kpis {
  margin-bottom: 0;
  padding-top: 0;
  border: none;
}
.stats-table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.3rem 0.6rem;
}
.stats-table-tools .stats-toggle {
  gap: 0.4rem;
  min-height: 0;
  font-size: 0.85rem;
}
.stats-table-tools .stats-toggle span {
  opacity: 0.75;
}
.stats-table-tools .stats-toggle:hover span {
  opacity: 1;
}
.stats-table-tools .stats-info {
  margin-left: -0.3rem;
}
/* Light text buttons (+ Filter, Kolommen) - only the heading and the
   numbers stand out; the controls show up when you look for them. */
.stats-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.45rem;
  border: none;
  border-radius: 5px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.stats-text-btn:hover,
.stats-text-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.stats-text-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* Which shows: "+ Filter" first (its menu opens rightwards from the left
   edge), then the chips. */
.stats-hero-head {
  margin-bottom: 0.35rem;
}
.stats-scope-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1.25rem -0.45rem;
}
.stats-scope-row .stats-active-filters {
  margin: 0;
}
/* The table's own layout, right above it: rows on the left ("per
   productie", "+ daarbinnen"), columns on the right. */
.stats-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.stats-split {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-left: -0.45rem;
}
.stats-pill-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.25rem 1.45rem 0.25rem 0.45rem;
  border: none;
  border-radius: 5px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.stats-pill-select:hover {
  background-color: color-mix(in srgb, var(--accent) 10%, transparent);
}
.stats-pill-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.stats-pill-select[hidden] {
  display: none;
}
/* Kolommen is a table setting - quieter than + Filter, its list opens
   leftwards from the right edge. */
.stats-table-bar .stats-columns-trigger {
  color: inherit;
  opacity: 0.7;
}
.stats-table-bar .stats-columns-trigger:hover,
.stats-table-bar .stats-columns-trigger[aria-expanded="true"] {
  opacity: 1;
}
.stats-table-bar .stats-columns-list {
  left: auto;
  right: 0;
}
/* Kolommen dropdown (admin/stats.js renderColumnToggles): the list floats
   under its button and stays open while you tick several. */
.stats-columns-select {
  position: relative;
}
.stats-columns-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 100%;
  box-sizing: border-box;
  padding: 0.3rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.stats-columns-list[hidden] {
  display: none;
}
.stats-columns-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 5px;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.stats-columns-option:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.stats-columns-option input {
  margin: 0;
  accent-color: var(--accent);
}
.stats-hero .stats-table-wrap {
  border: none;
  border-radius: 0;
}
.stats-hero .stats-table thead th {
  background: none;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 25%, var(--border));
}
.stats-hero .stats-table td:first-child,
.stats-hero .stats-table th:first-child {
  padding-left: 0.4rem;
}
.stats-hero .stats-total td {
  background: none;
  border-top: 1px solid color-mix(in srgb, var(--fg) 25%, var(--border));
}
@media screen and (max-width: 600px) {
  .stats-hero {
    margin: 0.25rem 0 1.75rem;
  }
  .stats-hero-summary {
    font-size: 1.1rem;
  }
  .stats-kpi {
    padding: 0 0.6rem;
  }
  /* Filter menu: one column, the submenu replacing the rows. */
  .stats-filter-panel {
    width: min(20rem, calc(100vw - 2rem));
  }
  .stats-filter-rows,
  .stats-filter-sub {
    width: 100%;
    border-left: none;
  }
  .stats-filter-panel.sub-open .stats-filter-rows {
    display: none;
  }
  .stats-filter-back {
    display: inline;
  }
  .stats-hero .stats-table > tbody > tr.stats-total {
    background: var(--header-bg);
  }
}

/* Password pages (account/password.html, admin/password.html) and the
   one-time link shown on the Accounts page. */
.password-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 26rem;
}
.password-form input {
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
.password-form input[hidden] { display: none; }
.password-form .hint { margin: 0; font-size: 0.85rem; opacity: 0.75; }
.password-form button {
  align-self: flex-start;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}
.password-form button:disabled { opacity: 0.6; cursor: default; }
.password-form .error:empty { display: none; }
.password-form .password-done { margin: 0; font-weight: 600; }
.password-form .password-done[hidden] { display: none; }

#login-form[hidden],
#set-password-done[hidden] { display: none; }
#login-view .hint { margin: 0; font-size: 0.85rem; opacity: 0.75; }

.password-link-panel {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.password-link-panel[hidden] { display: none; }
.password-link-panel p { margin: 0 0 0.5rem; }
.password-link-row { display: flex; gap: 0.5rem; }
.password-link-row input {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
#accounts-table td.hint { font-size: 0.85rem; opacity: 0.7; }
/* .board-member-name's first child is a fixed-width "tab stop" for project
   names, which would cut these fields off. */
.account-actions-row .board-member-name > .account-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
  /* On a phone this cell is a narrow flexbox that would squeeze the field. */
  flex: 0 0 auto;
  width: max-content;
  max-width: calc(100vw - 6rem);
  overflow: visible;
  white-space: normal;
}
.landing-page-select {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  max-width: 100%;
}
.account-set-password { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; }
.account-set-password .account-email-label { flex: 1 1 auto; }
.password-link-row[hidden] { display: none; }
.account-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
.account-actions .link-btn { white-space: nowrap; }

.login-forgot { margin-top: 1rem; font-size: 0.9rem; }
.login-forgot a { color: var(--accent); }
.password-form + .password-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.account-email-label { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.account-email-input {
  flex: 1 1 auto;
  width: 15rem;
  min-width: 0;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
}
