/*
 * CashDesk design system.
 *
 * Source: CashDeskBV/misc/newLayouts/cashdesk-design-system.css — synced 2026-08-14.
 * This package owns the stylesheet; the mockups keep their copy until they are pointed here.
 *
 * MUST stay unlayered and free of !important. Unlayered CSS beats BlazorBlueprint's
 * layered Tailwind in the cascade, and that is the entire override mechanism.
 * DesignSystemTests asserts both.
 */

/*
 * ╔══════════════════════════════════════════════════════════════════╗
 * ║   CASHDESK DESIGN SYSTEM  v2.0                                  ║
 * ║   Gestandaardiseerd op basis van de CashDesk UI 2026            ║
 * ╚══════════════════════════════════════════════════════════════════╝
 *
 * INHOUDSOPGAVE
 * ─────────────
 *  1.  Tokens (kleur, maat, typografie)
 *  2.  Reset & base
 *  3.  Topbar
 *  4.  Breadcrumb
 *  5.  Tabbar / Tab-nav
 *  6.  Stat bar
 *  7.  Action bar / Filter bar
 *  8.  Buttons
 *  9.  Form inputs
 * 10.  Cards & section headers
 * 11.  Tables (data-table)
 * 12.  Badges & status indicators
 * 13.  Modal
 * 14.  Pagination
 * 15.  Sidebar
 * 16.  Dropdown menus
 * 17.  Tooltips
 * 18.  Toggle switch
 * 19.  Utility
 */


/* ══════════════════════════════════════════════════════════════
   1. TOKENS
   ══════════════════════════════════════════════════════════════ */
:root {
  /* — Brand — */
  --cd-blue:        #2a7de1;   /* primary interactive, links, active states */
  --cd-blue-lt:     #e8f1fc;   /* blue tinted backgrounds */
  --cd-blue-dk:     #2268c1;   /* blue hover */
  --cd-green:       #5cb85c;   /* success action (opslaan, toevoegen) */
  --cd-green-dk:    #4a9e4a;   /* green hover */
  --cd-section:     #1e2d40;   /* donkere section headers, topbar achtergrond */

  /* — Neutrals — */
  --cd-bg:          #f5f7fa;   /* pagina achtergrond */
  --cd-surface:     #fafbfc;   /* tabel header rijen, subtiele oppervlakken */
  --cd-white:       #ffffff;
  --cd-border:      #e4e8ed;   /* alle borders, dividers */
  --cd-border-md:   #cbd5e1;   /* licht sterkere borders, hover states */

  /* — Text — */
  --cd-text:        #1a2035;   /* primaire tekst */
  --cd-muted:       #6b7a92;   /* labels, secundaire tekst, placeholders */
  --cd-hint:        #c0c8d4;   /* placeholder, disabled */

  /* — Semantic — */
  --cd-success-bg:  #eafaf1;
  --cd-success-tx:  #1e7e34;
  --cd-success-bd:  #b8e8c8;

  --cd-warning-bg:  #fef9e7;
  --cd-warning-tx:  #9a6f00;
  --cd-warning-bd:  #f5dfa0;

  --cd-danger-bg:   #fff3f3;
  --cd-danger-tx:   #c0392b;
  --cd-danger-bd:   #f5c6c3;

  --cd-info-bg:     #e8f4fd;
  --cd-info-tx:     #1a6fa8;
  --cd-info-bd:     #c2dff2;

  --cd-purple-bg:   #f4f0fb;
  --cd-purple-tx:   #6c3db0;
  --cd-purple-bd:   #d9c9f2;

  /* — Extra icon kleuren — */
  --cd-amber-icon:  #d97706;   /* wisselgeld / waarschuwing iconen */

  /* — Spacing & sizing — */
  --cd-bar-h:       52px;      /* topbar en navbar; alles wat er langs moet rekent hiermee */
  --btn-h:          32px;      /* universele button hoogte */
  --btn-h-lg:       38px;      /* grote buttons (modal opslaan, checkout) */
  --radius-sm:      4px;
  --radius-md:      6px;
  --radius-lg:      8px;
  --radius-xl:      12px;
  --radius-pill:    20px;

  /* — Transitions — */
  --cd-transition:  .12s ease;
}


/* ══════════════════════════════════════════════════════════════
   2. RESET & BASE
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--cd-bg);
  color: var(--cd-text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--cd-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }


/* ══════════════════════════════════════════════════════════════
   3. TOPBAR  (wit, 52px — gestandaardiseerd 2026-05-27)
   ══════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--cd-bar-h);
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 400;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

/* Logo */
.logo-mark  { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.logo-img   { height: 32px; width: auto; display: block; }

/* Divider */
.div { width: 1px; height: 18px; background: var(--cd-border); flex-shrink: 0; }

/* Winkel-selector pill */
.store-label {
  display: flex; align-items: center; gap: 5px;
  height: 28px; padding: 0 10px;
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
  color: var(--cd-text);
  flex-shrink: 0;
  transition: border-color var(--cd-transition);
}
.store-label:hover        { border-color: var(--cd-border-md); }
.store-label svg          { width: 12px; height: 12px; stroke: var(--cd-muted); fill: none; stroke-width: 2; }
.store-label i { font-size: 12px; }
.store-dd-item            { display: flex; align-items: center; gap: 10px; padding: 9px 14px; width: 100%; border: none; background: none; text-align: left; cursor: pointer; transition: background var(--cd-transition); font-family: inherit; }
.store-dd-item:hover      { background: var(--cd-surface); }
.store-dd-item.active     { background: var(--cd-blue-lt); }

.spacer { flex: 1; }

/* Status chips (balie / keuken / klaar / bezorging) */
.status-group             { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.status-chip              { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid; cursor: pointer; transition: opacity var(--cd-transition); white-space: nowrap; }
.status-chip:hover        { opacity: .8; }
.status-chip svg          { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.status-chip i { font-size: 13px; }
.status-chip .chip-num    { font-size: 16px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.status-chip .chip-labels { display: flex; flex-direction: column; gap: 1px; }
.status-chip .chip-name   { font-size: 11px; font-weight: 600; line-height: 1; }
.status-chip .chip-sub    { font-size: 9px; font-weight: 400; opacity: .7; line-height: 1; }
.status-chip.counter      { background: var(--cd-blue-lt);    border-color: var(--cd-info-bd);    color: var(--cd-blue-dk); }
.status-chip.kitchen      { background: var(--cd-warning-bg); border-color: var(--cd-warning-bd); color: var(--cd-warning-tx); }
.status-chip.ready        { background: var(--cd-success-bg); border-color: var(--cd-success-bd); color: var(--cd-success-tx); }
.status-chip.delivery     { background: var(--cd-purple-bg);  border-color: var(--cd-purple-bd);  color: var(--cd-purple-tx); }

/* KPI groep in topbar */
.kpi-sep                  { width: 1px; height: 28px; background: var(--cd-border); flex-shrink: 0; margin: 0 2px; }
.kpi-group                { display: flex; align-items: center; flex-shrink: 0; }
.kpi-item                 { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 12px; border-right: 1px solid var(--cd-bg); cursor: pointer; min-width: 56px; transition: background var(--cd-transition); border-radius: 6px; }
.kpi-item:last-child      { border-right: none; }
.kpi-item:hover           { background: var(--cd-surface); }
.kpi-n                    { font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: -.4px; }
.kpi-l                    { font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cd-muted); margin-top: 1px; }
.kpi-pos .kpi-n           { color: var(--cd-success-tx); }
.kpi-neg .kpi-n           { color: var(--cd-danger-tx); }
.kpi-neu .kpi-n           { color: var(--cd-blue); }
.kpi-labor-chip.alert .kpi-n      { color: var(--cd-danger-tx); }
.kpi-labor-chip:not(.alert) .kpi-n { color: var(--cd-success-tx); }

/* Actie icon-knoppen */
.actions                  { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.ib                       { width: 32px; height: 32px; border-radius: 7px; border: 1px solid transparent; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--cd-muted); position: relative; transition: background var(--cd-transition), border-color var(--cd-transition), color var(--cd-transition); }
.ib:hover, .ib.on         { background: var(--cd-bg); border-color: var(--cd-border); color: var(--cd-text); }
.ib svg                   { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.ib i { font-size: 16px; }
.nbdg                     { position: absolute; top: 2px; right: 2px; background: var(--cd-blue); color: var(--cd-white); font-size: 8px; font-weight: 700; width: 13px; height: 13px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--cd-white); pointer-events: none; }
.ib-badge                 { position: absolute; top: 3px; right: 3px; background: var(--cd-blue); color: var(--cd-white); font-size: 8px; font-weight: 700; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--cd-white); pointer-events: none; line-height: 1; }

/* Taal-selector */
.lang-wrap                { position: relative; }
.lang-btn                 { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--cd-muted); transition: background var(--cd-transition), border-color var(--cd-transition); }
.lang-btn:hover           { background: var(--cd-bg); border-color: var(--cd-border); color: var(--cd-text); }
.lang-btn svg             { width: 8px; height: 8px; stroke: var(--cd-muted); fill: none; stroke-width: 2.5; }
.lang-btn i { font-size: 8px; }
.lang-wrap.open .lang-btn { background: var(--cd-bg); border-color: var(--cd-border); color: var(--cd-text); }
.lang-wrap.open .lang-caret { transform: rotate(180deg); }
.lang-caret               { transition: transform .15s; }
.lang-dropdown            { display: none; position: absolute; top: calc(100% + 5px); right: 0; background: var(--cd-white); border: 1px solid var(--cd-border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.1); overflow: hidden; z-index: 500; min-width: 120px; animation: langIn .12s ease; }
.lang-wrap.open .lang-dropdown { display: block; }
@keyframes langIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.lang-item                { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 11px; font-weight: 600; color: var(--cd-text); cursor: pointer; border: none; background: transparent; width: 100%; text-align: left; transition: background var(--cd-transition); }
.lang-item:hover          { background: var(--cd-surface); }
.lang-item.active         { background: var(--cd-blue-lt); color: var(--cd-blue-dk); }
.lang-item .flag          { width: 18px; height: 12px; border-radius: 2px; overflow: hidden; display: flex; flex-direction: column; flex-shrink: 0; }
.lang-item .flag span     { flex: 1; display: block; }

/* Avatar knop */
.av-btn                   { width: 30px; height: 30px; border-radius: 50%; background: var(--cd-blue); color: var(--cd-white); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; border: none; transition: opacity var(--cd-transition); flex-shrink: 0; }
.av-btn:hover             { opacity: .85; }

/* Flyout panels */
.pw                       { position: relative; display: flex; }
.fp                       { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 500; animation: fpin .12s ease; }
.fp.open                  { display: block; }
@keyframes fpin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.panel                    { background: var(--cd-white); border: 1px solid var(--cd-border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.04); overflow: hidden; }
.ph                       { background: var(--cd-text); padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; }
.pt                       { font-size: 11px; font-weight: 600; color: var(--cd-white); }
.pc                       { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255,255,255,.15); background: transparent; color: var(--cd-white); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; line-height: 1; transition: background var(--cd-transition); }
.pc:hover                 { background: rgba(255,255,255,.12); }

/* Telefoon-panel */
.php  { width: 272px; }
.phl  { padding: 8px; }
.ph-tog   { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 10px; border-bottom: 1px solid var(--cd-bg); margin-bottom: 6px; }
.ph-tog-l { font-size: 11px; color: var(--cd-text); }
.tgl      { position: relative; width: 34px; height: 19px; flex-shrink: 0; }
.tgl input           { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl-tr              { position: absolute; inset: 0; border-radius: 10px; background: var(--cd-border); transition: background .2s; cursor: pointer; }
.tgl input:checked + .tgl-tr { background: var(--cd-green); }
.tgl-th              { position: absolute; top: 2.5px; left: 2.5px; width: 14px; height: 14px; border-radius: 50%; background: var(--cd-white); transition: transform .2s; pointer-events: none; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tgl input:checked ~ .tgl-th { transform: translateX(15px); }
.ph-row  { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; cursor: pointer; transition: background var(--cd-transition); }
.ph-row:hover { background: var(--cd-surface); }
.ph-ico  { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ph-ico svg   { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }
.ph-ico i { font-size: 11px; }
.ph-ico.in    { background: var(--cd-success-bg); color: var(--cd-success-tx); }
.ph-ico.miss  { background: var(--cd-danger-bg);  color: var(--cd-danger-tx); }
.ph-num  { font-size: 11px; font-weight: 600; color: var(--cd-text); flex: 1; }
.ph-tm   { font-size: 10px; color: var(--cd-muted); }
.ph-more { display: block; text-align: center; font-size: 11px; color: var(--cd-blue); padding: 8px; border-top: 1px solid var(--cd-bg); text-decoration: none; }
.ph-more:hover { background: var(--cd-surface); }

/* Klok-panel */
.ctp  { width: 256px; }
.ct-bd  { padding: 12px; }
.ct-sc  { margin-bottom: 12px; }
.ct-sc:last-child { margin-bottom: 0; }
.ct-sh  { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.ct-ic  { width: 22px; height: 22px; background: var(--cd-text); border-radius: 5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ct-ic svg { width: 11px; height: 11px; stroke: var(--cd-white); fill: none; stroke-width: 2; }
.ct-ic i { font-size: 11px; }
.ct-nm  { font-size: 10px; font-weight: 700; color: var(--cd-text); text-transform: uppercase; letter-spacing: .05em; }
.ct-ds  { font-size: 10px; color: var(--cd-muted); margin-bottom: 7px; }
.ct-ct  { display: flex; align-items: center; }
.ct-b   { width: 30px; height: 30px; border: 1px solid var(--cd-border); background: var(--cd-white); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--cd-text); cursor: pointer; transition: background var(--cd-transition); }
.ct-b:first-child { border-radius: 6px 0 0 6px; }
.ct-b:last-child  { border-radius: 0 6px 6px 0; }
.ct-b:hover { background: var(--cd-surface); }
.ct-v   { width: 42px; height: 30px; border-top: 1px solid var(--cd-border); border-bottom: 1px solid var(--cd-border); border-left: none; border-right: none; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--cd-text); }
.ct-ft  { padding: 8px 12px; border-top: 1px solid var(--cd-bg); display: flex; gap: 6px; }
.ct-ft button { flex: 1; height: 26px; border: none; border-radius: 6px; font-size: 10px; font-weight: 600; cursor: pointer; }
.ct-ca  { background: var(--cd-danger-bg); color: var(--cd-danger-tx); }
.ct-sv  { background: var(--cd-blue); color: var(--cd-white); }

/* Provider-panel */
.opm    { width: 340px; }
.op-row { padding: 10px 14px; border-bottom: 1px solid var(--cd-bg); }
.op-row:last-of-type { border-bottom: none; }
.op-top  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.op-info { flex: 1; min-width: 0; }
.op-prov { font-size: 10px; font-weight: 700; color: var(--cd-muted); letter-spacing: .04em; text-transform: uppercase; }
.op-name { font-size: 12px; font-weight: 500; color: var(--cd-text); }
.op-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.op-st   { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.op-st.open   { background: var(--cd-success-bg); border-color: var(--cd-success-bd); color: var(--cd-success-tx); }
.op-st.closed { background: var(--cd-danger-bg);  border-color: var(--cd-danger-bd);  color: var(--cd-danger-tx); }
.op-st.temp   { background: var(--cd-warning-bg); border-color: var(--cd-warning-bd); color: var(--cd-warning-tx); }
.op-dot { width: 5px; height: 5px; border-radius: 50%; }
.op-st.open .op-dot   { background: var(--cd-success-tx); }
.op-st.closed .op-dot { background: var(--cd-danger-tx); }
.op-st.temp .op-dot   { background: var(--cd-warning-tx); }
.op-exp { width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--cd-border); background: var(--cd-white); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--cd-muted); }
.op-exp svg  { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2.5; transition: transform .14s; }
.op-exp i { font-size: 10px; }
.op-exp.open svg { transform: rotate(180deg); }
.op-exp.open i { flex-shrink: 0; }
.op-acts { display: none; flex-wrap: wrap; gap: 4px; padding: 7px 0 2px; }
.op-acts.vis { display: flex; }
.op-btn  { height: 22px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--cd-border); background: var(--cd-white); font-size: 10px; font-weight: 700; color: var(--cd-text); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.op-btn.oa  { color: var(--cd-success-tx); border-color: var(--cd-success-bd); }
.op-btn.oa:hover { background: var(--cd-success-bg); }
.op-btn.ca  { color: var(--cd-danger-tx); border-color: var(--cd-danger-bd); }
.op-btn.ca:hover { background: var(--cd-danger-bg); }
.op-btn.ta  { color: var(--cd-warning-tx); border-color: var(--cd-warning-bd); }
.op-btn.ta:hover { background: var(--cd-warning-bg); }
.op-add  { padding: 8px 14px; border-top: 1px solid var(--cd-bg); display: flex; justify-content: flex-end; }
.op-add button { height: 26px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--cd-border); background: var(--cd-white); font-size: 10px; font-weight: 600; color: var(--cd-text); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.op-add button svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; }
.op-add button i { font-size: 10px; }

/* Notificatie-panel */
.notp   { width: 300px; }
.not-f  { padding: 7px 10px; border-bottom: 1px solid var(--cd-bg); }
.not-fb { height: 22px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--cd-border); background: var(--cd-white); font-size: 10px; font-weight: 500; color: var(--cd-text); cursor: pointer; display: flex; align-items: center; gap: 3px; }
.not-fb svg { width: 9px; height: 9px; stroke: currentColor; fill: none; stroke-width: 2; }
.not-fb i { font-size: 9px; }
.not-ls { padding: 8px 10px; }
.not-it { border: 1px solid var(--cd-bg); border-radius: 8px; padding: 8px 10px; margin-bottom: 5px; cursor: pointer; transition: background var(--cd-transition); }
.not-it:last-child { margin-bottom: 0; }
.not-it:hover { background: var(--cd-surface); }
.not-ih { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.not-ty { display: flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; }
.not-ty svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; }
.not-ty i { font-size: 10px; }
.not-ty.info { color: var(--cd-blue); }
.not-ty.ok   { color: var(--cd-success-tx); }
.not-dt { font-size: 9px; color: var(--cd-muted); }
.not-tx { font-size: 11px; color: var(--cd-text); }
.not-ft { padding: 7px 10px; border-top: 1px solid var(--cd-bg); text-align: center; }
.not-ft a { font-size: 11px; color: var(--cd-blue); text-decoration: none; }

/* Account-panel */
.accp   { width: 268px; }
.ac-hd  { background: var(--cd-text); padding: 14px; display: flex; align-items: center; gap: 10px; }
.ac-av  { width: 36px; height: 36px; border-radius: 50%; background: var(--cd-blue); color: var(--cd-white); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 2px solid rgba(255,255,255,.15); }
.ac-nm  { font-size: 12px; font-weight: 600; color: var(--cd-white); line-height: 1.3; }
.ac-rl  { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 1px; }
.ac-st  { font-size: 10px; color: rgba(255,255,255,.35); margin-top: 2px; }
.ac-acts { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--cd-bg); }
.ac-btn  { flex: 1; height: 26px; border-radius: 6px; font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 3px; transition: background var(--cd-transition); }
.ac-btn svg   { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; }
.ac-btn i { font-size: 10px; }
.ac-btn.out   { border: 1px solid var(--cd-border); background: var(--cd-white); color: var(--cd-text); }
.ac-btn.out:hover { background: var(--cd-surface); }
.ac-btn.pri   { border: none; background: var(--cd-blue); color: var(--cd-white); }
.ac-btn.pri:hover { background: var(--cd-blue-dk); }
.ac-lbl  { font-size: 9px; font-weight: 700; color: var(--cd-muted); padding: 8px 12px 3px; text-transform: uppercase; letter-spacing: .08em; }
.ac-sel  { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border-bottom: 1px solid var(--cd-bg); font-size: 11px; color: var(--cd-text); cursor: pointer; transition: background var(--cd-transition); }
.ac-sel:hover { background: var(--cd-surface); }
.ac-sel svg   { width: 9px; height: 9px; stroke: var(--cd-blue); fill: none; stroke-width: 2.5; }
.ac-sel i { font-size: 9px; }
.ac-nav a     { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 11px; color: var(--cd-text); text-decoration: none; transition: background var(--cd-transition); }
.ac-nav a:hover     { background: var(--cd-surface); }
.ac-nav a svg       { width: 13px; height: 13px; stroke: var(--cd-muted); fill: none; stroke-width: 2; flex-shrink: 0; }
.ac-nav a i { font-size: 13px; }
.ac-nav a.hl        { color: var(--cd-blue); }
.ac-nav a.hl svg    { stroke: var(--cd-blue); }
.ac-nav a.hl i { flex-shrink: 0; }
.ac-nav a.danger    { color: var(--cd-danger-tx); }
.ac-nav a.danger svg { stroke: var(--cd-danger-tx); }
.ac-nav a.danger i { flex-shrink: 0; }
.ac-nav a.danger:hover { background: var(--cd-danger-bg); }
.ac-dv  { height: 1px; background: var(--cd-bg); margin: 4px 0; }

/* Inkomende-oproep toast */
.call-toast           { display: none; position: fixed; top: 60px; right: 16px; width: 284px; z-index: 999; background: var(--cd-white); border: 1px solid var(--cd-border); border-radius: 12px; box-shadow: 0 10px 32px rgba(0,0,0,.14); overflow: hidden; animation: fpin .2s ease; }
.call-toast.show      { display: block; }
.cth  { background: var(--cd-blue-dk); padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; }
.cth span { font-size: 11px; font-weight: 700; color: var(--cd-white); }
.ctc  { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: var(--cd-white); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 11px; line-height: 1; }
.ctc:hover { background: rgba(255,255,255,.15); }
.ctb  { padding: 11px 13px; display: flex; align-items: center; gap: 11px; }
.ctr  { width: 32px; height: 32px; border-radius: 50%; background: var(--cd-blue-lt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; animation: ring .9s ease-in-out infinite; }
.ctr svg { width: 16px; height: 16px; stroke: var(--cd-blue); fill: none; stroke-width: 2.5; }
.ctr i { font-size: 16px; }
@keyframes ring { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
.ctn  { font-size: 14px; font-weight: 800; color: var(--cd-text); letter-spacing: -.3px; flex: 1; }
.ctt  { font-size: 10px; color: var(--cd-muted); }

/* Responsive */
@media (max-width: 1100px) { .kpi-group, .kpi-sep { display: none; } }
@media (max-width: 860px)  { .status-chip.ready, .status-chip.delivery { display: none; } }
@media (max-width: 600px)  {
  .topbar { padding: 0 10px; gap: 6px; }
  .fp { position: fixed; top: auto; bottom: 52px; right: 0; left: 0; }
  .php, .ctp, .opm, .notp, .accp { width: 100%; border-radius: 12px 12px 0 0; }
}


/* ══════════════════════════════════════════════════════════════
   4. BREADCRUMB
   ══════════════════════════════════════════════════════════════ */
.breadcrumb {
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--cd-muted);
}
.breadcrumb a         { color: var(--cd-muted); text-decoration: none; }
.breadcrumb a:hover   { color: var(--cd-blue); }
.breadcrumb .sep      { color: var(--cd-border-md); }
.breadcrumb .current  { color: var(--cd-text); font-weight: 500; }


/* ══════════════════════════════════════════════════════════════
   5. TABBAR / TAB-NAV
   ══════════════════════════════════════════════════════════════ */
.tabbar,
.tab-nav {
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  display: flex;
  align-items: flex-end;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
}
.tabbar::-webkit-scrollbar,
.tab-nav::-webkit-scrollbar { display: none; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 14px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cd-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--cd-transition);
  user-select: none;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: inherit;
  flex-shrink: 0;
}
.tab:hover  { color: var(--cd-text); }
.tab.active { color: var(--cd-blue); border-bottom-color: var(--cd-blue); }
.tab svg, .tab i    { width: 14px; height: 14px; font-size: 14px; }
.tab i { font-size: 14px; }

.tab-badge {
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px; font-weight: 600;
  background: var(--cd-blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.tab:not(.active) .tab-badge { background: #e2e8f0; color: #475569; }

.tab-add {
  width: 28px; height: 28px;
  border: none; background: none;
  color: var(--cd-muted);
  cursor: pointer;
  font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  align-self: center;
  margin-left: 2px;
}
.tab-add:hover { background: var(--cd-bg); }


/* ══════════════════════════════════════════════════════════════
   6. STAT BAR
   ══════════════════════════════════════════════════════════════ */
.stat-bar {
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  padding: 10px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stat-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--cd-bg);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
}

.stat-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 15px; height: 15px; }
.stat-icon i { font-size: 15px; }
.stat-icon.blue   { background: var(--cd-blue-lt);    color: var(--cd-blue); }
.stat-icon.green  { background: var(--cd-success-bg); color: var(--cd-success-tx); }
.stat-icon.amber  { background: var(--cd-warning-bg); color: var(--cd-warning-tx); }
.stat-icon.purple { background: var(--cd-purple-bg);  color: var(--cd-purple-tx); }
.stat-icon.red    { background: var(--cd-danger-bg);  color: var(--cd-danger-tx); }

.stat-value { font-size: 18px; font-weight: 700; color: var(--cd-text); line-height: 1; }
.stat-label { font-size: 11px; color: var(--cd-muted); margin-top: 2px; }

/* KPI Grid — larger metric cards in a responsive grid (content area) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: 1fr 1fr; } }

.kpi-card {
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.kpi-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon i { font-size: 16px; }
.kpi-icon.blue   { background: var(--cd-blue-lt);    color: var(--cd-blue); }
.kpi-icon.green  { background: var(--cd-success-bg); color: var(--cd-success-tx); }
.kpi-icon.amber  { background: var(--cd-warning-bg); color: var(--cd-warning-tx); }
.kpi-icon.purple { background: var(--cd-purple-bg);  color: var(--cd-purple-tx); }
.kpi-icon.danger { background: var(--cd-danger-bg);  color: var(--cd-danger-tx); }

.kpi-value { font-size: 22px; font-weight: 700; color: var(--cd-text); line-height: 1; }
.kpi-label { font-size: 11px; color: var(--cd-muted); margin-top: 2px; }


/* ══════════════════════════════════════════════════════════════
   7. ACTION BAR / FILTER BAR
   ══════════════════════════════════════════════════════════════ */
.actionbar {
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar {
  background: var(--cd-white);
  border-bottom: 1px solid var(--cd-border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.filter-bar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* Filter chips */
.filter-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-pill);
  background: var(--cd-white);
  font-size: 11px; font-weight: 500;
  color: var(--cd-text);
  cursor: pointer;
  transition: all var(--cd-transition);
  white-space: nowrap;
}
.filter-chip:hover { background: var(--cd-bg); border-color: var(--cd-border-md); }
.filter-chip.active {
  background: var(--cd-blue-lt);
  border-color: var(--cd-blue);
  color: var(--cd-blue);
  font-weight: 600;
}
.filter-chip svg { width: 11px; height: 11px; }
.filter-chip i { font-size: 11px; }

/* Search input within bars */
.search-wrap { position: relative; }
.search-wrap input {
  height: var(--btn-h);
  width: 240px;
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-md);
  padding: 0 12px 0 34px;
  font-size: 12px;
  color: var(--cd-text);
  background: var(--cd-white);
  outline: none;
  transition: border-color var(--cd-transition);
}
.search-wrap input:focus       { border-color: var(--cd-blue); }
.search-wrap input::placeholder { color: var(--cd-hint); }
.search-ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--cd-muted);
  display: flex; align-items: center;
  pointer-events: none;
}
.search-ico svg { width: 14px; height: 14px; }
.search-ico i { font-size: 14px; }


/* ══════════════════════════════════════════════════════════════
   8. BUTTONS
   ══════════════════════════════════════════════════════════════
   btn-primary  = blauw  (hoofdactie, navigatie, interactie)
   btn-success  = groen  (opslaan, toevoegen, afrekenen)
   btn-secondary = wit/grijs  (neutrale actie)
   btn-danger   = rood   (verwijderen, annuleren met destructieve werking)
   btn-ghost    = transparant (lichte acties)
   ══════════════════════════════════════════════════════════════ */
.btn {
  height: var(--btn-h);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--cd-border);
  background: var(--cd-white);
  color: var(--cd-text);
  transition: background var(--cd-transition), border-color var(--cd-transition);
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.btn:hover { background: var(--cd-bg); }
.btn svg, .btn i   { width: 13px; height: 13px; flex-shrink: 0; font-size: 13px; }
.btn i { font-size: 13px; }

/* Primary — blauw */
.btn-primary {
  background: var(--cd-blue);
  border-color: var(--cd-blue);
  color: #fff;
}
.btn-primary:hover { background: var(--cd-blue-dk); border-color: var(--cd-blue-dk); }

/* Success — groen */
.btn-success {
  background: var(--cd-green);
  border-color: var(--cd-green);
  color: #fff;
}
.btn-success:hover { background: var(--cd-green-dk); border-color: var(--cd-green-dk); }

/* Secondary — wit met border */
.btn-secondary {
  background: var(--cd-white);
  border-color: var(--cd-border);
  color: var(--cd-text);
}
.btn-secondary:hover { background: var(--cd-bg); }

/* Danger — rood */
.btn-danger {
  background: var(--cd-danger-bg);
  border-color: var(--cd-danger-bd);
  color: var(--cd-danger-tx);
}
.btn-danger:hover { background: #ffe8e6; border-color: var(--cd-danger-tx); }

/* Ghost — transparant */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--cd-muted);
}
.btn-ghost:hover { background: var(--cd-bg); color: var(--cd-text); border-color: var(--cd-border); }

/* Large variant */
.btn-lg {
  height: var(--btn-h-lg);
  padding: 0 20px;
  font-size: 13px;
}

/* Icon-only */
/* btn-icon — vierkante bordered icon button, extends .btn */
.btn-icon {
  width: var(--btn-h);
  padding: 0;
  justify-content: center;
}
.btn-icon.btn-lg { width: var(--btn-h-lg); }

/* btn-ghost-icon — borderloze ghost icon button (toolbar, tabel-acties) */
.btn-ghost-icon {
  border: none; background: none; cursor: pointer;
  color: var(--cd-muted); display: inline-flex; align-items: center;
  padding: 4px; border-radius: var(--radius-sm);
  transition: background var(--cd-transition), color var(--cd-transition);
}
.btn-ghost-icon:hover { background: var(--cd-bg); color: var(--cd-text); }


/* ══════════════════════════════════════════════════════════════
   9. FORM INPUTS
   ══════════════════════════════════════════════════════════════ */

/* Field wrapper */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--cd-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.field-input {
  height: var(--btn-h);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-md);
  padding: 0 12px;
  font-size: 13px;
  color: var(--cd-text);
  background: var(--cd-white);
  outline: none;
  transition: border-color var(--cd-transition);
  width: 100%;
}
.field-input:focus          { border-color: var(--cd-blue); }
.field-input::placeholder   { color: var(--cd-hint); }
.field-input:disabled       { background: var(--cd-bg); color: var(--cd-muted); cursor: not-allowed; }

/* Select */
select.field-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%236b7a92' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  cursor: pointer;
}

/* Textarea */
textarea.field-input {
  height: auto;
  min-height: 72px;
  padding: 8px 12px;
  resize: vertical;
  line-height: 1.5;
}

/* Hint/error text under field */
.field-hint  { font-size: 11px; color: var(--cd-muted); }
.field-error { font-size: 11px; color: var(--cd-danger-tx); }

/* Input with icon / filter-bar wrapper */
.field-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.field-wrap.wide { width: 220px; }
.field-wrap.med  { width: 148px; }

.field-ico {
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: var(--cd-muted);
  pointer-events: none;
}
.field-ico svg { width: 13px; height: 13px; }
.field-ico i { font-size: 13px; }

/* Generate/apply button used in filter bars */
.btn-generate {
  height: var(--btn-h);
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: var(--cd-blue);
  border: none;
  color: var(--cd-white);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: opacity .12s; flex-shrink: 0;
}
.btn-generate:hover { opacity: .88; }


/* ══════════════════════════════════════════════════════════════
   10. CARDS & SECTION HEADERS
   ══════════════════════════════════════════════════════════════ */
.card {
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--cd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-header-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--cd-text);
}

.card-body { padding: 16px; }

/* Mirrors .card-header, for actions under the content. */
.card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--cd-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Dark section header (blauwgrijs) */
.section-header {
  background: var(--cd-section);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
  letter-spacing: .01em;
}
.card > .section-header:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.section-header .count {
  background: rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 11px; font-weight: 500;
}


/* ══════════════════════════════════════════════════════════════
   11. DATA TABLE
   ══════════════════════════════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  padding: 9px 14px;
  text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--cd-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--cd-border);
  background: var(--cd-surface);
  white-space: nowrap;
}
.data-table thead th.sortable       { cursor: pointer; user-select: none; }
.data-table thead th.sortable:hover { color: var(--cd-text); }
.data-table thead th.sort-active    { color: var(--cd-blue); }
.data-table thead th .sort-icon {
  display: inline-flex; align-items: center;
  margin-left: 4px; opacity: .4;
}
.data-table thead th.sort-active .sort-icon { opacity: 1; color: var(--cd-blue); }

.data-table tbody tr {
  border-bottom: 1px solid var(--cd-border);
  transition: background var(--cd-transition);
}
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover       { background: #f7f9ff; }
.data-table tbody td {
  padding: 10px 14px;
  vertical-align: middle;
  font-size: 13px;
  color: var(--cd-text);
}

/* Number column */
.data-table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Muted cell text */
.cell-muted { font-size: 12px; color: var(--cd-muted); }
.cell-link  { font-size: 12px; color: var(--cd-blue); text-decoration: none; }
.cell-link:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════════
   12. BADGES & STATUS INDICATORS
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px; font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
  line-height: 1.4;
}
.badge svg { width: 10px; height: 10px; flex-shrink: 0; }
.badge i { font-size: 10px; }

.badge-success {
  background: var(--cd-success-bg);
  color: var(--cd-success-tx);
  border-color: var(--cd-success-bd);
}
.badge-danger {
  background: var(--cd-danger-bg);
  color: var(--cd-danger-tx);
  border-color: var(--cd-danger-bd);
}
.badge-warning {
  background: var(--cd-warning-bg);
  color: var(--cd-warning-tx);
  border-color: var(--cd-warning-bd);
}
.badge-info {
  background: var(--cd-info-bg);
  color: var(--cd-info-tx);
  border-color: var(--cd-info-bd);
}
.badge-neutral {
  background: #f0f2f5;
  color: var(--cd-muted);
  border-color: var(--cd-border);
}
.badge-purple {
  background: var(--cd-purple-bg);
  color: var(--cd-purple-tx);
  border-color: var(--cd-purple-bd);
}
.badge-blue {
  background: var(--cd-blue-lt);
  color: var(--cd-blue);
  border-color: #c2d9f6;
}

/* Status indicator (dot + label) */
.status-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
}
.status-indicator::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-indicator.online::before  { background: var(--cd-success-tx); }
.status-indicator.offline::before { background: var(--cd-muted); }
.status-indicator.warning::before { background: var(--cd-warning-tx); }
.status-indicator.danger::before  { background: var(--cd-danger-tx); }


/* ══════════════════════════════════════════════════════════════
   13. MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,20,40,.45);
  display: none; align-items: center; justify-content: center;
  z-index: 500;
  padding: 24px;
}
/* Both patterns supported: <cd-modal> removes .hidden; page JS adds .open or .active */
.modal-overlay.open,
.modal-overlay.active  { display: flex; }
.modal-overlay.hidden  { display: none; }

.modal {
  background: var(--cd-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px);
  width: 100%;
  max-width: 560px;
  overflow: hidden;
}
.modal.modal-sm  { max-width: 420px; }
.modal.modal-lg  { max-width: 760px; }
.modal.modal-xl  { max-width: 960px; }

.modal-header {
  background: var(--cd-section);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.modal-title {
  font-size: 14px; font-weight: 600;
  color: #fff;
  letter-spacing: .01em;
}
.modal-close {
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--cd-transition);
}
.modal-close:hover { background: rgba(255,255,255,.15); color: #fff; }
.modal-close svg { width: 12px; height: 12px; }
.modal-close i { font-size: 12px; }

/* Modal footer buttons gebruiken btn btn-success / btn btn-secondary */

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--cd-border);
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex-shrink: 0;
  background: var(--cd-white);
}


/* ══════════════════════════════════════════════════════════════
   14. PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 20px;
  background: var(--cd-white);
  border-top: 1px solid var(--cd-border);
}
.pagination-info {
  font-size: 12px; color: var(--cd-muted);
  margin-right: auto;
}
.page-btn {
  height: 28px; min-width: 28px;
  padding: 0 6px;
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-md);
  background: var(--cd-white);
  color: var(--cd-text);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--cd-transition);
}
.page-btn:hover       { background: var(--cd-bg); }
.page-btn.active      { background: var(--cd-blue); border-color: var(--cd-blue); color: #fff; }
.page-btn:disabled    { opacity: .4; cursor: not-allowed; }
.page-btn svg, .page-btn i         { width: 12px; height: 12px; font-size: 12px; }
.page-btn i { font-size: 12px; }


/* ══════════════════════════════════════════════════════════════
   15. SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--cd-white);
  border-right: 1px solid var(--cd-border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--cd-muted);
  border-bottom: 1px solid var(--cd-border);
}
.sidebar-list  { flex: 1; padding: 6px 0; }
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  cursor: pointer;
  color: var(--cd-text);
  transition: background var(--cd-transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item:hover { background: var(--cd-bg); }
.sidebar-item.active {
  background: var(--cd-blue-lt);
  color: var(--cd-blue);
  font-weight: 600;
}
.sidebar-item svg { width: 14px; height: 14px; flex-shrink: 0; }
.sidebar-item i { font-size: 14px; }

.sidebar-add { padding: 10px 16px; border-top: 1px solid var(--cd-border); }
.sidebar-add button {
  width: 100%; height: 30px;
  border: 1px dashed var(--cd-border-md);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--cd-blue);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all var(--cd-transition);
}
.sidebar-add button:hover {
  background: var(--cd-blue-lt);
  border-color: var(--cd-blue);
}


/* ══════════════════════════════════════════════════════════════
   16. DROPDOWN MENUS
   ══════════════════════════════════════════════════════════════ */
.dd-wrap  { position: relative; display: inline-flex; }
.dd-trigger {
  height: var(--btn-h); width: var(--btn-h);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-md);
  background: var(--cd-white);
  cursor: pointer;
  color: var(--cd-muted);
  flex-shrink: 0;
  transition: background var(--cd-transition);
}
.dd-trigger:hover { background: var(--cd-bg); color: var(--cd-text); }
.dd-trigger svg, .dd-trigger i   { width: 13px; height: 13px; font-size: 13px; }
.dd-trigger i { font-size: 13px; }

.dd-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px); right: 0;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  min-width: 180px;
  z-index: 100;
  overflow: hidden;
}
.dd-menu.open { display: block; }

.dd-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: 12px; color: var(--cd-text);
  cursor: pointer;
  border: none; background: none;
  width: 100%; text-align: left;
  font-family: inherit;
  transition: background var(--cd-transition);
}
.dd-item:hover { background: var(--cd-bg); }
.dd-item svg, .dd-item i   { width: 14px; height: 14px; flex-shrink: 0; font-size: 14px; color: var(--cd-muted); }
.dd-item i { font-size: 14px; }
.dd-item.danger     { color: var(--cd-danger-tx); }
.dd-item.danger svg, .dd-item.danger i { color: var(--cd-danger-tx); }
.dd-item.danger i { flex-shrink: 0; }

.dd-divider { height: 1px; background: var(--cd-border); margin: 3px 0; }


/* ══════════════════════════════════════════════════════════════
   17. TOOLTIPS
   ══════════════════════════════════════════════════════════════ */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--cd-section); color: #fff;
  border-radius: var(--radius-md);
  padding: 5px 9px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
}
.tooltip::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--cd-section);
}
.tooltip-wrap:hover .tooltip { display: block; }


/* ══════════════════════════════════════════════════════════════
   18. TOGGLE SWITCH
   ══════════════════════════════════════════════════════════════ */
.tog {
  position: relative;
  display: inline-block;
  width: 32px; height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}
.tog input {
  opacity: 0; width: 0; height: 0;
  position: absolute;
}
.tog-sl {
  position: absolute; inset: 0;
  background: var(--cd-border-md);
  border-radius: 999px;
  transition: background var(--cd-transition);
}
.tog-sl::before {
  content: '';
  position: absolute; left: 2px; top: 2px;
  width: 14px; height: 14px;
  background: var(--cd-white);
  border-radius: 50%;
  transition: transform var(--cd-transition);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.tog input:checked + .tog-sl            { background: var(--cd-blue); }
.tog input:checked + .tog-sl::before   { transform: translateX(14px); }
.tog input:disabled + .tog-sl          { opacity: .5; cursor: not-allowed; }


/* ══════════════════════════════════════════════════════════════
   19. UTILITY
   ══════════════════════════════════════════════════════════════ */

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--cd-muted); }
.empty-icon { width: 48px; height: 48px; margin: 0 auto 16px; background: var(--cd-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 22px; height: 22px; stroke: var(--cd-muted); }
.empty-icon i { font-size: 22px; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--cd-text); margin-bottom: 6px; }
.empty-sub { font-size: 12.5px; }

.content { padding: 20px; }

/* Text utilities */
.text-muted   { color: var(--cd-muted); }
.text-danger  { color: var(--cd-danger-tx); }
.text-success { color: var(--cd-success-tx); }
.text-blue    { color: var(--cd-blue); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }

/* Flex helpers */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-4        { gap: 4px; }
.gap-6        { gap: 6px; }
.gap-8        { gap: 8px; }
.gap-10       { gap: 10px; }
.ml-auto      { margin-left: auto; }

/* Divider */
.divider-h { height: 1px; background: var(--cd-border); margin: 8px 0; }
.divider-v { width: 1px; height: 16px; background: var(--cd-border); flex-shrink: 0; }

/* Truncate */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────
   RAPPORT LAYOUT  (shared by all rapport-*.html)
   ─────────────────────────────────────────── */
.rapport-header {
  padding: 20px 24px 12px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.rapport-title h1 { font-size: 28px; font-weight: 700; color: var(--cd-text); line-height: 1.1; margin-bottom: 6px; }
.rapport-title p  { font-size: 13px; color: var(--cd-muted); }

.rapport-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Secondary action button (export, print, …) */
/* btn-action — rapport-header actieknop (iets hoger dan .btn, dikkere border) */
.btn-action {
  height: 34px; padding: 0 14px;
  border: 1.5px solid var(--cd-border); background: var(--cd-white);
  color: var(--cd-text); font-size: 12px; font-weight: 500;
  cursor: pointer; font-family: inherit; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--cd-transition); white-space: nowrap;
}
.btn-action:hover { background: var(--cd-bg); }
.btn-action svg, .btn-action i { width: 13px; height: 13px; flex-shrink: 0; font-size: 13px; }

.rapport-body { display: flex; gap: 0; padding: 0 24px 32px; align-items: flex-start; }

/* Chart area */
.chart-section { width: 520px; flex-shrink: 0; }

.chart-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chart-control-label { font-size: 11px; color: var(--cd-muted); }

.chart-select {
  height: 28px; border: 1px solid var(--cd-border); border-radius: var(--radius-md);
  padding: 0 22px 0 8px; font-size: 12px; color: var(--cd-text);
  background: var(--cd-white); outline: none; font-family: inherit; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%236b7a92' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 12px;
}

.chart-wrap {
  position: relative; height: 320px;
  background: var(--cd-white); border: 1px solid var(--cd-border);
  border-radius: var(--radius-md); padding: 16px;
}

/* Table area inside rapport-body */
.table-section  { flex: 1; min-width: 0; margin-left: 24px; }
.table-wrap     { overflow-x: auto; }

.data-table thead tr th              { text-align: right; white-space: nowrap; }
.data-table thead tr th:first-child  { text-align: left; }
.data-table tbody tr td              { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr td:first-child  { text-align: left; font-weight: 500; }

tfoot tr td              { padding: 9px 10px; border-top: 2px solid var(--cd-section); font-size: 12px; font-weight: 700; text-align: right; background: #f8f9fb; }
tfoot tr td:first-child  { text-align: left; }

/* Grouped sub-header row */
.data-table thead.main-head tr th             { background: var(--cd-section); font-weight: 700; }
.data-table thead.main-head tr th:first-child { text-align: left; }

/* Total / summary row */
tr.total-row td              { font-weight: 700; background: var(--cd-section); border-top: 2px solid var(--cd-border); text-align: right; font-variant-numeric: tabular-nums; }
tr.total-row td:first-child  { text-align: left; }

/* Expand / collapse row button */
.expand-btn {
  background: none; border: 1.5px solid var(--cd-border); border-radius: 4px;
  width: 22px; height: 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cd-muted); transition: all .15s; flex-shrink: 0;
}
.expand-btn:hover           { border-color: var(--cd-blue); color: var(--cd-blue); }
.expand-btn svg, .expand-btn i             { width: 11px; height: 11px; font-size: 11px; transition: transform .18s; }
.expand-btn i { font-size: 11px; }
.expand-btn.open svg        { transform: rotate(90deg); }
.expand-btn.open i { flex-shrink: 0; }

/* Percentage bar (inline in table cells) */
.pct-bar-wrap { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.pct-bar      { height: 6px; border-radius: 3px; background: var(--cd-blue); min-width: 2px; transition: width .3s; }


/* ══════════════════════════════════════════════════════════════
   SECTION 14 — FORM VALIDATION
   ══════════════════════════════════════════════════════════════ */

.field-error { font-size: 10px; color: var(--cd-danger-tx); margin-top: 3px; display: none; }
.field.has-error .field-error  { display: block; }
.field.has-error .field-input  { border-color: var(--cd-danger-tx); }


/* ══════════════════════════════════════════════════════════════
   SECTION 15 — SEARCH WRAP
   ══════════════════════════════════════════════════════════════ */

.search-wrap            { position: relative; }
.search-wrap input      { height: var(--btn-h); width: 200px; border: 1px solid var(--cd-border); border-radius: var(--radius-md); padding: 0 12px 0 32px; font-size: 12px; color: var(--cd-text); background: var(--cd-white); outline: none; font-family: inherit; transition: border-color var(--cd-transition); }
.search-wrap input:focus { border-color: var(--cd-blue); }
.search-wrap input::placeholder { color: var(--cd-hint); }
.search-ico             { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--cd-muted); pointer-events: none; display: flex; }
.search-ico svg, .search-ico i { width: 13px; height: 13px; font-size: 13px; }


/* ══════════════════════════════════════════════════════════════
   SECTION 16 — SELECT WRAP
   ══════════════════════════════════════════════════════════════ */

.select-wrap            { position: relative; display: inline-flex; align-items: center; }
.select-wrap select     { height: var(--btn-h); border: 1px solid var(--cd-border-md); border-radius: var(--radius-md); padding: 0 32px 0 12px; font-size: 12px; color: var(--cd-text); background: var(--cd-white); font-family: inherit; outline: none; appearance: none; cursor: pointer; min-width: 160px; transition: border-color var(--cd-transition); }
.select-wrap select:focus { border-color: var(--cd-blue); }
.select-chevron         { position: absolute; right: 10px; pointer-events: none; color: var(--cd-muted); display: flex; align-items: center; }
.select-chevron svg, .select-chevron i { width: 13px; height: 13px; font-size: 13px; }
.select-label           { font-size: 11px; font-weight: 500; color: var(--cd-muted); margin-bottom: 2px; }


/* ══════════════════════════════════════════════════════════════
   SECTION 17 — FILTER PANEL
   ══════════════════════════════════════════════════════════════ */

.filter-panel           { display: none; position: absolute; top: calc(100% + 6px); left: 0; width: 260px; background: var(--cd-white); border: 1px solid var(--cd-border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 150; overflow: hidden; }
.filter-panel.open      { display: block; }
.filter-panel-header    { padding: 9px 14px 8px; font-size: 11px; font-weight: 600; color: var(--cd-muted); text-transform: uppercase; letter-spacing: .05em; background: var(--cd-surface); border-bottom: 1px solid var(--cd-border); display: flex; align-items: center; justify-content: space-between; }
.filter-panel-body      { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.filter-panel-footer    { padding: 8px 14px; border-top: 1px solid var(--cd-border); display: flex; justify-content: space-between; align-items: center; background: var(--cd-surface); }
.filter-group-label     { font-size: 11px; font-weight: 500; color: var(--cd-muted); margin-bottom: 6px; display: block; }
.filter-chips           { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip            { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--cd-border); background: var(--cd-white); font-size: 11px; font-weight: 500; color: var(--cd-muted); cursor: pointer; font-family: inherit; transition: all var(--cd-transition); user-select: none; }
.filter-chip:hover      { border-color: var(--cd-blue); color: var(--cd-blue); background: var(--cd-blue-lt); }
.filter-chip.active     { border-color: var(--cd-blue); color: var(--cd-blue); background: var(--cd-blue-lt); font-weight: 600; }


/* ══════════════════════════════════════════════════════════════
   SECTION 18 — STATUS DOT
   ══════════════════════════════════════════════════════════════ */

.status-dot             { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-dot.active      { background: var(--cd-blue); }
.status-dot.clocked     { background: var(--cd-success-tx); }
.status-dot.away        { background: var(--cd-hint); }
.status-dot.empty       { background: transparent; }
.status-dot.warning     { background: var(--cd-warning-tx); }
.status-dot.danger      { background: var(--cd-danger-tx); }


/* ══════════════════════════════════════════════════════════════
   SECTION 19 — LIVE BADGE
   ══════════════════════════════════════════════════════════════ */

.live-badge             { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--cd-success-bg); border: 1px solid var(--cd-success-bd); color: var(--cd-success-tx); font-size: 11px; font-weight: 600; }
.live-dot               { width: 6px; height: 6px; border-radius: 50%; background: var(--cd-success-tx); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse        { 0%,100% { opacity: 1; } 50% { opacity: .4; } }


/* ══════════════════════════════════════════════════════════════
   SECTION 20 — PROGRESS BAR
   ══════════════════════════════════════════════════════════════ */

.progress-bar-wrap      { background: var(--cd-border); border-radius: var(--radius-pill); height: 6px; overflow: hidden; }
.progress-bar           { height: 100%; border-radius: var(--radius-pill); background: var(--cd-blue); transition: width .4s ease; }
.progress-bar.success   { background: var(--cd-green); }


/* ══════════════════════════════════════════════════════════════
   SECTION 19a — PAGE STRUCTURE & TILES
   ══════════════════════════════════════════════════════════════ */

/* Promoted out of home.css. These are how a page is built — a content column,
   labelled sections, a greeting, a grid of tiles — so every page needs them, and
   leaving them in one page's stylesheet meant every other page reinvented them or
   linked home.css for three rules. */

.page                   { padding: 16px 20px; max-width: 1200px; margin: 0 auto; }
.section                { margin-bottom: 18px; }
.section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--cd-muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}

.welcome-row            { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.welcome-text           { font-size: 16px; font-weight: 700; color: var(--cd-text); }
.welcome-sub            { font-size: 12px; color: var(--cd-muted); margin-top: 1px; font-weight: 400; }

.tile {
  background: var(--cd-section); border-radius: var(--radius-lg);
  padding: 12px 14px; cursor: pointer; text-decoration: none;
  display: flex; flex-direction: column; gap: 5px; min-height: 88px;
  border: 1px solid rgba(255,255,255,.04);
  transition: transform .12s, box-shadow .12s, background .12s;
  position: relative; overflow: hidden;
}
.tile:hover             { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.tile.disabled          { opacity: .45; pointer-events: none; }

.tile-icon {
  width: 28px; height: 28px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tile-icon i            { font-size: 15px; color: rgba(255,255,255,.85); }
.tile-icon svg          { width: 15px; height: 15px; stroke: rgba(255,255,255,.85); fill: none; stroke-width: 2; }
.tile-lock svg          { width: 11px; height: 11px; stroke: var(--cd-muted); fill: none; stroke-width: 2; }

.tile-name              { font-size: 12px; font-weight: 700; color: var(--cd-white); }
.tile-desc              { font-size: 10px; color: rgba(255,255,255,.5); line-height: 1.4; }
.tile-lock              { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--cd-muted); margin-top: auto; }

@media (prefers-reduced-motion: reduce) {
  .tile:hover           { transform: none; }
}

/* ══════════════════════════════════════════════════════════════
   SECTION 19b — BOTTOM NAVIGATION
   ══════════════════════════════════════════════════════════════ */

/* Promoted out of the cd-footer web component in cashdesk-components.js, where it was
   only reachable by using that component. Same design, named to the design system's
   convention rather than after the element that happened to hold it.

   Not fixed-positioned: it is a row of the app shell, so it needs no reserved padding
   and cannot overlap the content it sits under. */

.navbar {
  height: var(--cd-bar-h);
  background: var(--cd-white);
  border-top: 2px solid var(--cd-blue);
  display: flex;
  align-items: stretch;
  box-shadow: 0 -1px 4px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.navbar-item {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: 0;
  font-family: inherit;
  color: var(--cd-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .12s, background .12s;
}
.navbar-item:hover     { color: var(--cd-blue); background: var(--cd-blue-lt); }
.navbar-item.active    { color: var(--cd-blue); }
.navbar-item.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 2px;
  background: var(--cd-blue);
  border-radius: 2px 2px 0 0;
}
.navbar-item svg       { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; flex-shrink: 0; }
.navbar-label          { line-height: 1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.navbar-badge-wrap     { position: relative; display: flex; align-items: center; justify-content: center; }
.navbar-badge {
  position: absolute; top: -5px; right: -8px;
  background: var(--cd-blue); color: var(--cd-white);
  font-size: 8px; font-weight: 700;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}

/* The overflow panel. Eleven destinations do not fit on a bar and do not want to;
   the ones people reach for stay visible and the rest live behind one more button.
   It opens upward, because the bar is at the bottom. */

/* Shares the bar evenly with the items beside it: it wraps a .navbar-item, and a wrapper
   that does not claim its own track collapses to nothing and takes the button with it. */
.navbar-more           { position: relative; flex: 1 1 0; min-width: 0; display: flex; }

.navbar-panel {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--cd-white);
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0,0,0,.14);
  padding: 6px;
  z-index: 420;
  overflow: hidden;
}
.navbar-panel.open     { display: block; }

/* Sits under the panel and over everything else, so the click meant to dismiss the panel
   lands somewhere. One below .navbar-panel's z-index, deliberately. */
.navbar-backdrop       { position: fixed; inset: 0; z-index: 419; }

.navbar-panel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--cd-text);
  text-align: left;
}
.navbar-panel-item:hover    { background: var(--cd-blue-lt); color: var(--cd-blue); }
.navbar-panel-item.active   { color: var(--cd-blue); font-weight: 600; }
.navbar-panel-item svg      { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; flex-shrink: 0; }
.navbar-panel-separator     { height: 1px; background: var(--cd-border); margin: 6px 4px; }

/* ══════════════════════════════════════════════════════════════
   SECTION 20a — RESPONSIVE GRID
   ══════════════════════════════════════════════════════════════ */

/* Lets the grid decide how many columns fit, instead of being told.

   `.tile-grid` declares four columns and `.tile-grid.cols-3` declares three, so
   every layout needs a modifier per count and a media query per breakpoint to stop
   four columns being crushed on a narrow screen.

   auto-fill with a minimum does that on its own: as many columns as fit at the
   given minimum, sharing the leftover space equally. One class, no breakpoints,
   and it adapts to a sidebar opening as readily as to a phone.

   Override the minimum per grid where the content needs more or less room:
       <div class="grid-auto" style="--grid-min: 280px">                          */

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 220px), 1fr));
  gap: var(--grid-gap, 8px);
}

/* Same, but the last row stretches to fill rather than leaving a ragged gap.
   Prefer auto-fill when the number of items varies a lot — auto-fit on two items
   across a wide screen gives you two very wide tiles. */
.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--grid-min, 220px), 1fr));
  gap: var(--grid-gap, 8px);
}

/* ══════════════════════════════════════════════════════════════
   SECTION 20b — ALERTS
   ══════════════════════════════════════════════════════════════ */

/* An inline message inside a page: a warning above a form, a result after saving.

   Badges already carry the semantic colours, but a badge is a label on something
   else — it has no room for a sentence. There was no component for the sentence,
   so every screen improvised one.

   Toasts are the transient sibling: a toast interrupts and disappears, an alert
   stays with the thing it is about. */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--cd-border);
  border-radius: var(--radius-md);
  background: var(--cd-surface);
  color: var(--cd-text);
  font-size: 13px;
  line-height: 1.45;
}

.alert-icon           { flex-shrink: 0; margin-top: 1px; }
.alert-body           { flex: 1 1 auto; min-width: 0; }
.alert-title          { font-weight: 600; margin-bottom: 2px; }

.alert-success        { background: var(--cd-success-bg); color: var(--cd-success-tx); border-color: var(--cd-success-bd); }
.alert-warning        { background: var(--cd-warning-bg); color: var(--cd-warning-tx); border-color: var(--cd-warning-bd); }
.alert-danger         { background: var(--cd-danger-bg);  color: var(--cd-danger-tx);  border-color: var(--cd-danger-bd); }
.alert-info           { background: var(--cd-info-bg);    color: var(--cd-info-tx);    border-color: var(--cd-info-bd); }

/* ══════════════════════════════════════════════════════════════
   SECTION 21 — APP SHELL
   ══════════════════════════════════════════════════════════════ */

/* Header, content and footer as a column. The header and footer size themselves and
   the content takes what is left.

   This replaces `<body style="padding-top:52px;padding-bottom:52px;">`, which every
   page repeated. Those numbers were reserving room for a fixed footer — and the top
   one was reserving room for a sticky topbar, which never needed it, since a sticky
   element stays in the flow. A page without a header or footer got the padding anyway.

   Nothing here is positioned, so there are no magic numbers to keep in step with the
   height of a bar, and a missing header or footer simply takes no space. */

.app-shell {
  display: flex;
  flex-direction: column;
  /* Exactly one viewport tall, not "at least" — that is what keeps the header and the footer
     in view. With min-height the column grows with its content, nothing ever overflows, and
     the page scrolls as a whole, taking the bars with it. Pinned to the height, the content
     row is the only thing left that can scroll. */
  height: 100dvh;
}

.app-shell-header,
.app-shell-footer       { flex: 0 0 auto; }

/* The row between header and footer: an optional side column beside the content. */
.app-shell-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.app-shell-side         { flex: 0 0 auto; min-height: 0; overflow-y: auto; }

.app-shell-main {
  flex: 1 1 auto;
  min-width: 0;           /* a wide table inside must scroll, not stretch the column */
  min-height: 0;          /* without this a long child refuses to shrink and the footer is pushed off screen */
  overflow-y: auto;
}

/* Narrow screens: the side column becomes a scrollable strip above the content.
   A 220px sidebar on a 390px phone leaves nothing for the page, and hiding it behind
   a button hides the navigation entirely — a horizontal strip keeps it reachable. */
@media (max-width: 720px) {
  .app-shell-body       { flex-direction: column; }

  .app-shell-side       { overflow-x: auto; overflow-y: hidden; }
  .app-shell-side .sidebar {
    width: auto;
    border-right: none;
    border-bottom: 1px solid var(--cd-border);
    flex-direction: row;
  }
  .app-shell-side .sidebar-list {
    display: flex;
    flex-direction: row;
    gap: 4px;
    white-space: nowrap;
  }
  .app-shell-side .sidebar-header { display: none; }
}

/* The footer is the one place that meets the home indicator on a phone. */
.app-shell-footer       { padding-bottom: env(safe-area-inset-bottom, 0); }

/* ══════════════════════════════════════════════════════════════
   SECTION 22 — SPINNERS & BUSY STATES
   ══════════════════════════════════════════════════════════════ */

/* Skeletons cover content that is still arriving. A spinner covers an action that is
   still running — a button waiting on a save, a panel waiting on a fetch. Both exist
   because they answer different questions: "what will appear here" versus "is anything
   happening". */

@keyframes spin         { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2px solid var(--cd-border);
  border-top-color: var(--cd-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner-sm             { width: 14px; height: 14px; }
.spinner-lg             { width: 32px; height: 32px; border-width: 3px; }
.spinner-light          { border-color: rgba(255,255,255,.35); border-top-color: var(--cd-white); }

/* On a filled button the spinner sits on colour, so it needs the light variant. */
.btn-primary .spinner,
.btn-success .spinner,
.btn-danger .spinner    { border-color: rgba(255,255,255,.35); border-top-color: var(--cd-white); }

/* A button that is waiting: visibly inactive, and unclickable even before the
   disabled attribute lands. Prevents the double submit. */
.btn.is-busy            { opacity: .7; pointer-events: none; cursor: default; }

/* A section or page waiting on data. Centred, with room to breathe. */
.page-loader            { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 24px; }
.page-loader-text       { font-size: 13px; color: var(--cd-muted); }

@media (prefers-reduced-motion: reduce) {
  .spinner              { animation-duration: 2s; }
  .skeleton             { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   SECTION 23 — SKELETON LOADER
   ══════════════════════════════════════════════════════════════ */

@keyframes shimmer      { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton               { animation: shimmer 1.4s infinite linear; background: linear-gradient(90deg, var(--cd-surface) 25%, var(--cd-border) 50%, var(--cd-surface) 75%); background-size: 400% 100%; }
.skeleton-card          { background: var(--cd-white); border: 1px solid var(--cd-border); border-radius: var(--radius-xl); overflow: hidden; }
.skeleton-img           { height: 180px; }
.skeleton-body          { padding: 14px; }
.skeleton-line          { height: 12px; border-radius: 4px; margin-bottom: 8px; }
.skeleton-line.w-60     { width: 60%; }
.skeleton-line.w-80     { width: 80%; }
.skeleton-line.w-40     { width: 40%; }


/* ══════════════════════════════════════════════════════════════
   SECTION 24 — TOAST / MELDING
   ══════════════════════════════════════════════════════════════ */

/* Toast stack (fixed overlay) */
.toast-stack            { position: fixed; bottom: 24px; right: 24px; width: 340px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
/* A page with a footer bar keeps that bar in view, so 24px from the bottom lands on top of it.
   Lifted clear of it here rather than in the stack's own offset, because a page without a
   footer — a login screen — should keep its toasts in the corner. */
body:has(.app-shell-footer) .toast-stack { bottom: calc(var(--cd-bar-h) + 16px); }
.m-toast                { border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.07); }

/* Melding row (inline in meldingen list) */
@keyframes slideIn      { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.melding                { display: flex; align-items: center; gap: 12px; padding: 11px 16px; position: relative; overflow: hidden; margin-bottom: 6px; animation: slideIn .2s ease; }
.melding::before        { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.m-icon                 { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.m-icon svg, .m-icon i  { width: 15px; height: 15px; font-size: 15px; }
.m-body                 { flex: 1; min-width: 0; padding-right: 20px; }
.m-title                { font-size: 13px; font-weight: 600; line-height: 1.3; }
.m-text                 { font-size: 12px; line-height: 1.5; margin-top: 1px; opacity: .82; }
.m-meta                 { font-size: 11px; margin-top: 4px; opacity: .6; display: flex; align-items: center; gap: 10px; }
.m-close                { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: inherit; opacity: .45; font-size: 13px; transition: opacity .12s, background .12s; }
.m-close:hover          { opacity: 1; background: rgba(0,0,0,.08); }

/* Melding variants */
.m-info                 { background: #e8f3ff; border-radius: 8px; color: #1a3a6b; }
.m-info::before         { background: #2a7de1; }
.m-info .m-icon         { background: #2a7de1; color: #fff; }
.m-success              { background: #eafaf1; border-radius: 8px; color: #1a4a1a; }
.m-success::before      { background: var(--cd-success-tx); }
.m-success .m-icon      { background: var(--cd-success-tx); color: #fff; }
.m-warning              { background: var(--cd-warning-bg); border-radius: 8px; color: #78350f; }
.m-warning::before      { background: var(--cd-warning-tx); }
.m-warning .m-icon      { background: var(--cd-warning-tx); color: #fff; }
.m-danger               { background: var(--cd-danger-bg); border-radius: 8px; color: var(--cd-danger-tx); }
.m-danger::before       { background: var(--cd-danger-tx); }
.m-danger .m-icon       { background: var(--cd-danger-tx); color: #fff; }


/* ══════════════════════════════════════════════════════════════
   SECTION 25 — ACTION GROUP (tabel-rij acties)
   ══════════════════════════════════════════════════════════════ */

/* Container: primaire knop + chevron-dropdown als één blok */
.action-group              { display: inline-flex; justify-content: flex-end; }

/* Primaire actieknop — blauw, linker hoek afgerond */
.btn-view                  { height: var(--btn-h); display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: var(--radius-md) 0 0 var(--radius-md); font-size: 12px; font-weight: 500; cursor: pointer; border: 1px solid var(--cd-blue); background: var(--cd-blue); color: var(--cd-white); transition: opacity var(--cd-transition); font-family: inherit; white-space: nowrap; }
.btn-view:hover            { opacity: .88; }
.btn-view svg, .btn-view i { width: 13px; height: 13px; font-size: 13px; }

/* Chevron-trigger naast btn-view: rechter hoek afgerond, zelfde blauw */
.action-group .dd-trigger  { border-radius: 0 var(--radius-md) var(--radius-md) 0; border-left: 1px solid rgba(255,255,255,.25); border-color: var(--cd-blue); background: var(--cd-blue); color: rgba(255,255,255,.85); }
.action-group .dd-trigger:hover { background: var(--cd-blue-dk); color: var(--cd-white); }
