
  :root {
    /* Match hetekraan.nl (Impreza): Karla body, Poppins headings */
    --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Poppins', system-ui, -apple-system, sans-serif;
    --bg: #0a0a0f;
    --surface: #13131a;
    --surface2: #1a1a24;
    --surface3: #22222f;
    --border: rgba(255, 255, 255, 0.072);
    --accent: #ff6b35;
    --accent2: #00d4aa;
    --blue: #4a9eff;
    --text: #e8e8f0;
    --muted: #666680;
    --yellow: #ffd000;
    --reparatie: #ff6b35;
    --onderhoud: #00d4aa;
    --installatie: #4a9eff;
    --herafspraak: #b794f6;
    --klaar-bg: #0d2018;
    --klaar-border: #1a4030;
    /* Afspraakkaart: actie-iconen — zelfde basis als weektegels (surface2 + subtiele rand) */
    --appt-action-icon-size: 44px;
    --appt-action-icon-radius: 14px;
    --appt-action-icon-bg: var(--surface2);
    --appt-action-icon-bg-hover: var(--surface2);
    --appt-action-icon-bg-active: var(--surface3);
    --appt-action-icon-border: var(--border);
    --appt-action-icon-border-hover: rgba(255, 255, 255, 0.14);
    --appt-action-icon-fg: rgba(232, 232, 240, 0.72);
    --appt-action-icon-fg-hover: rgba(248, 248, 252, 0.92);
    /* Afsprakenpaneel: kopregel-acties (2 util + CTA) */
    --appts-header-util-size: 48px;
    --appts-header-cta-height: 48px;
    --appts-header-actions-gap: 10px;
    --appts-header-util-gap: 6px;
  }

  html {
    overflow-x: clip;
  }
  .hk-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100dvh;
    overflow-x: clip;
  }

  /* HEADER — mobile-first, wraps on narrow screens */
  header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  @media (min-width: 1180px) {
    body:not(.user-jerry) header {
      position: relative;
      top: auto;
      z-index: 20;
    }
  }

  .logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
  }
  .logo span { color: var(--accent); }

  .planner-header-brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }
  .planner-brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .planner-brand-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: min(220px, 50vw);
    object-fit: contain;
    object-position: center;
  }

  .date-nav {
    display: flex;
    align-items: center;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .date-nav button {
    background: none;
    border: none;
    color: var(--muted);
    padding: 10px 12px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: color 0.15s;
    flex-shrink: 0;
    touch-action: manipulation;
  }
  .date-nav button:hover { color: var(--text); }
  .date-nav-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .date-label {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 10px;
    padding: 8px 8px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    letter-spacing: 0.5px;
    flex: 1;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-stats {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }
  .btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    padding: 8px 12px;
    min-height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    touch-action: manipulation;
  }
  .btn-logout:hover { color: var(--text); border-color: var(--muted); }
  .stat { display: flex; flex-direction: column; align-items: center; }
  .stat-val {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .stat-val.green { color: var(--accent2); }
  .stat-val.orange { color: var(--accent); }
  .stat-label { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

  /* LAYOUT — app shell (<1180px); side-by-side planner from 1180px */
  .layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    min-height: calc(100dvh - 52px - 48px);
    width: 100%;
    max-width: 100vw;
  }

  .appointments {
    padding: 12px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left));
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .appointments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .appointments-header-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--appts-header-actions-gap);
    flex: 1;
    min-width: 0;
  }
  .appointments-header-util {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--appts-header-util-gap);
  }
  /* Vierkant: zelfde maat/radius als weektegel-inactief */
  .appointments-header-util .btn-dagopgave {
    width: var(--appts-header-util-size);
    height: var(--appts-header-util-size);
    min-width: var(--appts-header-util-size);
    min-height: var(--appts-header-util-size);
    padding: 0;
    box-sizing: border-box;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
    filter: grayscale(1);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
  }
  .appointments-header-util .btn-dagopgave:hover {
    background: var(--surface3);
    color: var(--ink);
    border-color: rgba(255, 255, 255, 0.12);
    filter: grayscale(1);
  }
  .appointments-header-util .planner-app-icon-btn.btn-day-block {
    width: var(--appts-header-util-size);
    height: var(--appts-header-util-size);
    min-width: var(--appts-header-util-size);
    min-height: var(--appts-header-util-size);
    border-radius: 14px;
    box-sizing: border-box;
  }
  .appointments-header-actions .planner-app-icon-btn.btn-day-block:not(.is-day-blocked):hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: var(--surface3);
    color: var(--ink);
  }
  /* CTA: zelfde taal als .planner-week-day.is-active (accentvulling + rand + halo) */
  .appointments-header-actions .btn-add {
    height: var(--appts-header-cta-height);
    min-height: var(--appts-header-cta-height);
    padding: 0 16px;
    box-sizing: border-box;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(255, 107, 53, 0.22);
    border: 1px solid var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.35);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  }
  .appointments-header-actions .btn-add:hover {
    opacity: 1;
    background: rgba(255, 107, 53, 0.3);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.5);
  }
  .appointments-header-actions .btn-add .btn-add-accent {
    color: var(--accent);
    font-weight: 700;
    margin-right: 2px;
  }

  .section-title {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    color: rgba(102, 102, 128, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.1em;
  }

  .btn-add {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
  }
  .btn-add:hover { opacity: 0.85; }

  /* KAART */
  .appt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s;
    position: relative;
  }
  .appt-card:hover { border-color: var(--surface3); transform: translateY(-1px); }
  .appt-card.done {
    background: var(--klaar-bg);
    border-color: rgba(0, 212, 170, 0.35);
    border-left: 2px solid rgba(0, 212, 170, 0.55);
    opacity: 0.9;
  }
  .appt-card.done:hover { transform: none; border-color: var(--accent2); }

  /* Groen vinkje badge rechtsboven */
  .appt-card.done::after {
    content: '✓ Klaar';
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 212, 170, 0.14);
    color: var(--accent2);
    border: 1px solid rgba(0, 212, 170, 0.4);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    letter-spacing: 0.05em;
    pointer-events: none;
  }

  /* Groene vloed-animatie bij afronding */
  @keyframes greenFlood {
    0%   { background: var(--surface); box-shadow: inset 0 0 0 0 rgba(0, 212, 170, 0); }
    20%  { background: rgba(0, 212, 170, 0.18); box-shadow: inset 0 0 0 2px rgba(0, 212, 170, 0.45); }
    60%  { background: rgba(0, 212, 170, 0.1); box-shadow: inset 0 0 0 1px rgba(0, 212, 170, 0.28); }
    100% { background: var(--klaar-bg); box-shadow: none; }
  }
  .appt-card.just-done {
    animation: greenFlood 1.4s ease-out forwards;
    border-color: rgba(0, 212, 170, 0.45) !important;
    border-left: 2px solid rgba(0, 212, 170, 0.65) !important;
  }
  .appt-number {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: var(--font-body);
    font-size: clamp(14px, 3.35vw, 17px);
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: -0.02em;
    line-height: 1.15;
  }

  .appt-inner { padding: 12px 12px 12px 30px; }

  .appt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    gap: 6px;
  }

  .appt-internal-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .appt-internal-slot__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    flex-shrink: 0;
  }
  .appt-internal-slot__input {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 120px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
  }
  .appt-internal-slot__input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  .appt-time {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 208, 0, 0.72);
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.3;
  }
  .appt-card.done .appt-time { color: var(--muted); }
  .appt-card.done .btn-done,
  .appt-card.done .btn-confirm,
  .appt-card.done .btn-cancel { display: none !important; }
  .appt-card.done .btn-invoice-retry { display: inline-flex !important; }

  .time-window-badge {
    display: inline-block;
    font-size: 9px;
    font-family: var(--font-body);
    font-weight: 500;
    background: rgba(255, 208, 0, 0.06);
    border: 1px solid rgba(255, 208, 0, 0.18);
    color: rgba(255, 208, 0, 0.78);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 5px;
    vertical-align: middle;
  }
  .appt-card.violation .time-window-badge {
    background: rgba(255,80,80,0.12);
    border-color: rgba(255,80,80,0.4);
    color: #ff6060;
    opacity: 1;
  }
  .slot-daypart-hint {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 208, 0, 0.62);
  }
  .ghl-cal-time-hint {
    font-size: 9px;
    color: rgba(102, 102, 128, 0.92);
    font-weight: 400;
    margin-left: 4px;
    font-family: var(--font-body);
  }
  .appt-card.violation { border-color: rgba(255,80,80,0.4); }

  .appt-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .appt-actions .icon-btn.appt-action-icon {
    width: var(--appt-action-icon-size);
    height: var(--appt-action-icon-size);
    min-width: var(--appt-action-icon-size);
    max-width: var(--appt-action-icon-size);
    padding: 0;
    font-size: 0;
    line-height: 0;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--appt-action-icon-fg);
    background: var(--appt-action-icon-bg);
    border: 1px solid var(--appt-action-icon-border);
    border-radius: var(--appt-action-icon-radius);
    box-shadow: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    -webkit-font-smoothing: antialiased;
  }
  .appt-actions .icon-btn.appt-action-icon .appt-action-svg {
    width: calc(var(--appt-action-icon-size) * 0.44);
    height: calc(var(--appt-action-icon-size) * 0.44);
    flex-shrink: 0;
    display: block;
    stroke: currentColor;
  }
  .appt-actions .icon-btn.appt-action-icon:hover {
    color: var(--appt-action-icon-fg-hover);
    background: var(--appt-action-icon-bg-hover);
    border-color: var(--appt-action-icon-border-hover);
  }
  .appt-actions .icon-btn.appt-action-icon:active {
    color: var(--appt-action-icon-fg-hover);
    background: var(--appt-action-icon-bg-active);
    border-color: var(--appt-action-icon-border-hover);
  }
  .appt-actions .icon-btn.appt-action-icon:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.22);
    outline-offset: 2px;
  }
  .appt-actions a.icon-btn.appt-action-icon {
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    color: var(--appt-action-icon-fg);
  }
  .appt-actions a.icon-btn.appt-action-icon:visited {
    color: var(--appt-action-icon-fg);
  }
  .appt-actions a.icon-btn.appt-action-icon:hover,
  .appt-actions a.icon-btn.appt-action-icon:visited:hover {
    color: var(--appt-action-icon-fg-hover);
  }

  .appt-actions__icons {
    display: flex;
    align-items: center;
    gap: inherit;
    flex-wrap: nowrap;
    flex-shrink: 0;
    min-width: 0;
  }
  .appt-actions__mobile {
    display: none;
    position: relative;
    flex-shrink: 0;
  }
  .appt-actions__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    min-width: min(220px, calc(100vw - 32px));
    padding: 6px;
    margin: 0;
    list-style: none;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  }
  .appt-actions__dropdown.is-open {
    display: block;
  }
  .appt-actions__menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .appt-actions__menu-item:hover,
  .appt-actions__menu-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
  }
  .appt-actions__menu-item--danger {
    color: var(--reparatie);
  }
  .appt-actions__menu-item--danger:hover,
  .appt-actions__menu-item--danger:focus-visible {
    background: rgba(255, 80, 80, 0.12);
  }

  .icon-btn {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
    touch-action: manipulation;
  }
  .icon-btn:hover { color: var(--text); border-color: var(--muted); }
  .icon-btn.danger:hover { color: var(--reparatie); border-color: var(--reparatie); }
  .icon-btn.ghl:hover { color: var(--blue); border-color: var(--blue); }
  .icon-btn.edit-action {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #cfd3dc;
    border-color: #3a404d;
    min-width: 78px;
    width: auto;
    padding: 0 10px;
  }
  .icon-btn.edit-action:hover { color: #ffffff; border-color: #586070; }
  .details-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface2);
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .details-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: 600;
  }
  .details-line {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 4px;
  }
  .details-line:last-child { margin-bottom: 0; }
  .details-empty {
    color: var(--muted);
    font-size: 12px;
  }
  .details-price-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
    padding: 4px 0;
  }
  .details-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: var(--yellow);
  }

  /* Main column: address (hero) → name → description */
  .appt-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 12px;
    min-width: 0;
  }
  .appt-address {
    font-family: var(--font-body);
    font-size: clamp(15px, 3.6vw, 18px);
    font-weight: 700;
    font-style: normal;
    color: var(--text);
    line-height: 1.28;
    letter-spacing: -0.02em;
    margin: 0;
    min-width: 0;
  }

  .appt-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0;
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.35;
    text-transform: none;
  }

  .appt-desc {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
  }
  .appt-desc:empty {
    display: none;
  }
  .appt-body--compact {
    gap: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
  }
  .appt-desc--muted {
    color: rgba(120, 120, 145, 0.95);
    font-size: 12px;
  }

  /* Extra info rij */
  .appt-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }
  .meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .meta-label {
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: 600;
    color: rgba(102, 102, 128, 0.88);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .meta-value {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    color: var(--ink);
  }
  .appt-notes {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 8px;
    line-height: 1.45;
  }

  /* A message GHL did not take (public/app/planner-bericht.js). */
  .appt-bericht-open {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #ffb347;
    background: rgba(255, 140, 0, 0.12);
    border: 1px solid rgba(255, 140, 0, 0.35);
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 8px;
  }
  .appt-bericht-open__btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  .appt-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    row-gap: 8px;
  }
  .appt-footer-left {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .appt-footer-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
    text-align: right;
    min-width: 0;
  }
  .appt-footer-actions-touch {
    display: block;
    width: 100%;
  }
  .appt-footer-right .appt-footer-actions-touch {
    width: auto;
  }

  .appt-footer-cta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 6px;
    width: min(168px, 42vw);
    max-width: 100%;
  }
  .appt-footer-cta-row .btn-prijs,
  .appt-footer-cta-row .btn-done {
    font-family: var(--font-body);
    min-width: 0;
    min-height: 32px;
    padding: 5px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: 100%;
    box-sizing: border-box;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
  }
  .appt-footer-cta-row .btn-prijs:hover,
  .appt-footer-cta-row .btn-done:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: var(--surface3);
  }
  .appt-footer-cta-row .btn-prijs.active,
  .appt-footer-cta-row .btn-done.active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.22);
    background: var(--surface3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .appt-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

  .tag {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 6px;
  }
  .tag.reparatie { background: rgba(255, 107, 53, 0.1); color: rgba(255, 140, 100, 0.95); }
  .tag.onderhoud { background: rgba(0, 212, 170, 0.1); color: rgba(120, 230, 200, 0.95); }
  .tag.installatie { background: rgba(74, 158, 255, 0.1); color: rgba(150, 190, 255, 0.95); }
  .tag.herafspraak { background: rgba(183, 148, 246, 0.12); color: rgba(196, 181, 253, 0.98); }

  .appt-phone {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
  }
  .appt-price {
    font-family: var(--font-body);
    font-size: clamp(15px, 3.8vw, 18px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: rgba(0, 212, 170, 0.88);
    line-height: 1.1;
  }
  .appt-card.done .appt-price { color: rgba(102, 102, 128, 0.85); font-weight: 600; }

  .btn-done {
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    touch-action: manipulation;
  }
  .btn-done:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: var(--surface3);
  }
  .btn-done.active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--surface3);
  }

  /* COMPLETE BAR */
  .complete-bar {
    display: none;
    background: var(--surface2);
    border-top: 1px solid var(--border);
    padding: 10px 12px 10px 30px;
    flex-direction: column;
    gap: 8px;
  }
  .complete-bar.visible { display: flex; }

  .complete-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .complete-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
  }
  .complete-footer-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex: 1 1 200px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .complete-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
  }
  .complete-footer-left .service-date-row--last-maint {
    margin: 0;
    padding: 0;
    border-top: none;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .complete-footer-left .service-date-row--last-maint label::after {
    content: ':';
  }

  .review-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--muted);
    user-select: none;
  }

  .toggle {
    width: 32px;
    height: 18px;
    background: var(--surface3);
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
    border: 1px solid var(--border);
    flex-shrink: 0;
  }
  .toggle.on { background: var(--accent2); border-color: var(--accent2); }
  .toggle::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.2s;
  }
  .toggle.on::after { left: 16px; }

  .service-date-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--muted);
    flex-wrap: wrap;
  }

  .service-date-row input {
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    outline: none;
  }
  .service-date-row input:focus { border-color: var(--accent); }
  .service-date-row--last-maint {
    padding: 10px 0 12px;
    margin-top: 4px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
  }
  .service-date-row--last-maint label {
    font: inherit;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    flex-shrink: 0;
  }

  .btn-confirm {
    background: var(--accent2);
    color: #0a0a0f;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    margin-left: auto;
    transition: opacity 0.15s;
  }
  .btn-confirm:hover { opacity: 0.85; }

  .btn-prijs {
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
  }
  .btn-prijs:hover {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
    background: var(--surface3);
  }
  .btn-prijs.active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
    background: var(--surface3);
  }

  /* ROUTE PANEL */
  .route-panel {
    padding: 12px max(12px, env(safe-area-inset-right)) 16px max(12px, env(safe-area-inset-left));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
  }
  .route-panel > * {
    min-width: 0;
  }

  .route-panel-status {
    flex: 0 0 auto;
  }

  .route-status-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 12px 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  }

  .route-status-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .route-status-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2px;
  }

  .route-status-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.2;
  }

  .route-status-text {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
  }

  .route-status-badge {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--ink);
    background: rgba(0, 0, 0, 0.2);
    max-width: 42%;
    text-align: center;
    line-height: 1.2;
  }

  .route-status-badge--local {
    border-color: rgba(0, 212, 170, 0.35);
    color: var(--accent2);
    background: rgba(0, 212, 170, 0.08);
  }

  .route-status-badge--central {
    border-color: rgba(255, 179, 71, 0.45);
    color: #ffc266;
    background: rgba(255, 140, 0, 0.1);
  }

  .route-toolbar--card {
    margin-top: 12px;
  }

  .route-local-hint {
    font-size: 11px;
    color: var(--muted);
    margin: 8px 0 0;
    line-height: 1.4;
  }

  .route-reset-link {
    margin-top: 6px;
    font-size: 11px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    text-align: left;
  }

  .route-flow-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: clip;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.12);
  }

  .route-panel-footer {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .route-summary {
    font-size: 11px;
    color: var(--ink-soft);
    line-height: 1.45;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
  }

  .route-summary__line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
  }

  .route-summary__bit strong {
    font-weight: 600;
    color: var(--ink);
  }

  .route-summary__sub {
    font-weight: 400;
    color: var(--muted);
  }

  .route-summary__muted {
    color: var(--muted);
  }

  .route-phase {
    padding: 0 10px 2px;
  }

  .route-phase__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0 8px;
    margin-top: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .route-phase:first-of-type .route-phase__head {
    margin-top: 0;
    padding-top: 10px;
  }

  .route-phase__label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

  .route-phase__window {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }

  .route-phase__head--pm .route-phase__label {
    color: rgba(0, 212, 170, 0.88);
  }

  .route-transition {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 10px 10px 8px;
    margin: 2px 0 4px;
  }

  .route-transition__rail {
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.15), rgba(0, 212, 170, 0.35));
    flex-shrink: 0;
  }

  .route-transition__title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 4px;
  }

  .route-transition__meta {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
  }

  .route-transition__meta--muted {
    color: var(--muted);
    font-weight: 400;
  }

  .route-empty-day {
    padding: 18px 14px 10px;
    text-align: center;
  }

  .route-empty-day__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
  }

  .route-empty-day__sub {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
    max-width: 240px;
    margin: 0 auto;
  }

  .route-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: stretch;
    margin-top: 8px;
    margin-bottom: 0;
    padding: 0 0 8px 0;
  }
  .route-toolbar .btn-optimize {
    flex: 1 1 140px;
    min-width: 0;
  }
  .route-toolbar .btn-unlock-route,
  .route-toolbar .btn-confirm-route {
    flex: 1 1 auto;
    min-height: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .btn-optimize {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 10px;
    min-height: unset;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.5px;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
  }
  .btn-optimize:hover { opacity: 0.85; }
  .btn-optimize:disabled { opacity: 0.35; cursor: not-allowed; }
  .btn-unlock-route {
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    min-height: unset;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
  }
  .btn-unlock-route:hover { border-color: var(--accent); color: var(--accent); }

  .btn-confirm-route {
    background: rgba(0,212,170,0.1);
    border: 1px solid var(--accent2);
    color: var(--accent2);
    padding: 8px 10px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    min-height: unset;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
    transition: background 0.15s;
  }
  .btn-confirm-route:hover { background: rgba(0,212,170,0.2); }
  .btn-confirm-route.saved { background: rgba(0,212,170,0.25); }

  .route-list { display: flex; flex-direction: column; padding-bottom: 4px; }

  .planning-section { margin-bottom: 18px; }
  .planning-section:last-child { margin-bottom: 0; }
  .planning-section-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.3;
  }

  .empty-hint {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    font-size: 13px;
    color: var(--muted);
  }

  .route-drag-handle {
    color: #888;
    font-size: 18px;
    line-height: 1;
    cursor: grab;
    padding: 4px 6px;
    flex-shrink: 0;
    user-select: none;
    border-radius: 4px;
  }
  .route-drag-handle:hover { background: var(--surface3); color: white; }
  .route-item[draggable='false'] .route-drag-handle {
    opacity: 0.28;
    cursor: not-allowed;
  }
  .route-item.dragging { opacity: 0.35; }
  .route-item.drag-over { border-top: 2px solid var(--accent); }

  .route-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s;
  }
  .route-item:last-child { border-bottom: none; }
  .route-item:hover { opacity: 0.92; background: rgba(255, 255, 255, 0.02); }
  .route-item.done { opacity: 0.4; }
  .route-item.has-violation {
    border-left: 2px solid rgba(255, 140, 0, 0.65);
    padding-left: 8px;
  }

  .route-item--depot {
    cursor: default;
    opacity: 1;
  }
  .route-item--depot:hover {
    opacity: 1;
    background: transparent;
  }

  .route-drag-handle--ghost {
    visibility: hidden;
  }

  .route-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .route-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  .route-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }

  .route-sub-row__pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    max-width: 52%;
  }

  .route-eta {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    flex-shrink: 0;
  }

  .route-eta--muted {
    font-weight: 500;
    color: var(--ink-muted);
  }
  /* A stop put last after a booking, without a calculated time (docs/specs/nieuwe-boeking-in-route.md). */
  .route-eta.route-eta--no-time {
    color: #b45309;
    font-size: 11px;
    font-weight: 600;
    white-space: normal;
    line-height: 1.2;
  }

  .route-job-pill,
  .route-day-pill {
    flex-shrink: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ink-soft);
    max-width: 38%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .route-job-pill {
    border-color: rgba(0, 212, 170, 0.25);
    color: rgba(0, 212, 170, 0.85);
    background: rgba(0, 212, 170, 0.06);
  }

  .route-pin-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 179, 71, 0.35);
    color: #ffc266;
    background: rgba(255, 140, 0, 0.08);
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  button.route-pin-pill {
    cursor: pointer;
    font-family: inherit;
  }

  .route-pin-badge {
    display: inline-block;
    background: #BA7517;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
  }

  .route-violation {
    margin-left: 6px;
    font-size: 12px;
    color: #ffb347;
  }

  /* Boekingen tab (public/app/planner-boekingen.js) */
  .boekingen-section-title { font-size: 14px; margin: 14px 0 8px; color: var(--muted); }
  .boekingen-card { border: 1px solid var(--border, rgba(127,127,127,0.25)); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
  .boekingen-card.status-kan_niet, .boekingen-card.status-geen_reactie, .boekingen-card.status-verlopen { border-color: rgba(255,120,80,0.55); }
  .boekingen-card.status-geboekt { opacity: 0.75; }
  .boekingen-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
  .boekingen-status { font-size: 12px; font-weight: 600; }
  .boekingen-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
  .boekingen-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .boekingen-form { margin-top: 10px; display: grid; gap: 6px; font-size: 13px; }
  .boekingen-form-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .boekingen-form-row > span { min-width: 110px; color: var(--muted); }
  .boekingen-chip { display: inline-flex; gap: 3px; align-items: center; }
  .boekingen-empty { padding: 18px 12px; color: var(--muted); }
  .boekingen-form-frame { display: block; width: 100%; height: calc(100vh - 230px); min-height: 600px; border: 0; margin-top: 10px; }

  .route-violation-text {
    margin-top: 2px;
    font-size: 11px;
    color: #ff6b6b;
  }

  .route-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--muted);
    flex-shrink: 0;
  }
  .route-num.depot { background: rgba(255,107,53,0.15); border-color: var(--accent); color: var(--accent); font-size: 11px; }

  .route-info { flex: 1; min-width: 0; }
  .route-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .route-addr { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .route-time { font-family: var(--font-body); font-size: 10px; color: var(--muted); flex-shrink: 0; }

  .btn-maps, .btn-morning {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 9px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    width: 100%;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
  }
  .btn-maps:hover { border-color: var(--blue); color: var(--blue); }
  .btn-morning { color: var(--muted); }
  .btn-morning:hover { border-color: var(--accent2); color: var(--accent2); }

  /* TOTAL BAR */
  .total-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
  }
  .total-label { font-family: var(--font-body); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
  .total-amount {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 16px;
    color: var(--accent2);
    font-variant-numeric: tabular-nums;
  }

  /* MODAL — full-width on phone, safe areas, scroll containment */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-overlay.visible { display: flex; }

  /* "Geschiedenis" of an appointment (public/app/planner-geschiedenis.js). */
  .geschiedenis-modal { max-width: 620px; }
  .geschiedenis-body { max-height: 60vh; overflow-y: auto; }
  .geschiedenis-regel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(127, 127, 127, 0.2);
    font-size: 13px;
  }
  .geschiedenis-regel--terug { opacity: 0.6; }
  .geschiedenis-regel__knop { flex-shrink: 0; font-size: 12px; padding: 4px 8px; }

  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    width: 100%;
    max-width: 100%;
    max-height: min(92dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px));
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: auto;
    box-sizing: border-box;
  }

  .modal-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
  }
  .modal-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
  }
  .modal-actions > button,
  .modal-actions > a {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
  .modal-actions.modal-actions--split {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .modal-actions--split > div {
    width: 100%;
  }
  .modal-actions--split .modal-actions-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .modal-actions--split .modal-actions-row > button {
    width: 100%;
    min-height: 48px;
  }
  .touch-price-overlay .modal {
    max-width: 720px;
  }
  .touch-price-overlay-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .touch-price-overlay-sub {
    margin: -6px 0 2px;
    font-size: 12px;
    color: var(--muted);
  }
  .touch-price-overlay-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 14px;
  }
  .touch-price-overlay-footer > button {
    min-height: 44px;
  }
  .btn-cancel {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
  }
  .btn-invoice-retry {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
  }
  .price-invoice-retry-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
  }
  .btn-save {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
  }
  .btn-send-link {
    background: #25D366;
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
  }
  .btn-delete-appt {
    background: rgba(255,80,80,0.1);
    border: 1px solid rgba(255,80,80,0.35);
    color: #ff6060;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
  }
  .btn-delete-appt:hover { background: rgba(255,80,80,0.2); }
  .btn-delete {
    background: #c0392b;
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    touch-action: manipulation;
    margin-right: auto;
  }
  .btn-delete:hover { background: #a83224; }
  .hk-snap-modal-overlay {
    position: fixed; inset: 0; z-index: 1200;
    background: rgba(0,0,0,0.45);
    display: none; align-items: center; justify-content: center; padding: 16px;
  }
  .hk-snap-modal-overlay.is-open { display: flex; }
  .hk-snap-modal {
    background: var(--surface, #fff); color: var(--text, #111);
    border-radius: 12px; width: 100%; max-width: 420px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25); overflow: hidden;
  }
  .hk-snap-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
  }
  .hk-snap-modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
  .hk-snap-close {
    background: none; border: 0; font-size: 22px; line-height: 1;
    cursor: pointer; color: var(--muted); padding: 0 4px;
  }
  .hk-snap-modal-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
  .hk-snap-modal-body .form-label { margin-top: 6px; }
  .hk-snap-modal-body .form-select,
  .hk-snap-modal-body .form-input {
    width: 100%; box-sizing: border-box; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--font-body); font-size: 13px; background: #fff; color: var(--text);
  }
  .hk-snap-modal-body textarea.form-input { resize: vertical; min-height: 64px; }
  .hk-snap-note { margin: 4px 0 0; font-size: 11px; color: var(--muted); font-style: italic; }
  .modal-actions--snap {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px; border-top: 1px solid var(--border);
  }
  .modal-actions--snap .btn-cancel { margin-left: auto; }

  /* ── UI-schaal groot (class: body.ui-scale-large) — handmatig óf automatisch voor account "jerry" (zie applyUiScalePref) ─ */

  @media (min-width: 1180px) {
    body.ui-scale-large .date-label { font-size: 15px; width: 210px; flex: 0 0 210px; }
  }
  @media (max-width: 1179px) {
    body.ui-scale-large .date-label { font-size: 13px; }
  }
  body.ui-scale-large .stat-val                  { font-size: 20px; }
  body.ui-scale-large .stat-label                { font-size: 10px; }
  body.ui-scale-large .section-title             { font-size: 13px; }
  body.ui-scale-large .btn-add                   { font-size: 14px; padding: 10px 18px; }
  body.ui-scale-large .btn-dagopgave             { font-size: 17px; padding: 8px 11px; }
  body.ui-scale-large .planner-app-icon-btn.btn-day-block .btn-day-block-ic { font-size: 24px; }
  body.ui-scale-large .planning-section-title {
    font-size: 15px;
    letter-spacing: 0.055em;
  }
  body.ui-scale-large .day-blocked-banner       { font-size: 15px; padding: 12px 14px; }
  body.ui-scale-large .appt-number              { font-size: clamp(15px, 3.4vw, 17px); color: var(--ink-muted); }
  body.ui-scale-large .appt-time                { font-size: 18px; }
  body.ui-scale-large .slot-daypart-hint         { font-size: 16px; }
  body.ui-scale-large .ghl-cal-time-hint         { font-size: 13px; }
  body.ui-scale-large .time-window-badge         { font-size: 12px; padding: 3px 7px; }
  body.ui-scale-large .appt-address             { font-size: clamp(16px, 3.6vw, 19px); }
  body.ui-scale-large .appt-name                { font-size: 15px; font-weight: 500; }
  body.ui-scale-large .appt-desc                { font-size: 13px; }
  body.ui-scale-large .meta-label               { font-size: 10px; }
  body.ui-scale-large .meta-value               { font-size: 13px; }
  body.ui-scale-large .appt-notes              { font-size: 14px; padding: 6px 10px; }
  body.ui-scale-large .tag                      { font-size: 12px; padding: 5px 10px; }
  body.ui-scale-large .appt-phone               { font-size: 14px; }
  body.ui-scale-large .appt-price               { font-size: clamp(17px, 3.9vw, 20px); font-weight: 700; }
  body.ui-scale-large .btn-done                 { font-size: 14px; padding: 8px 14px; }
  body.ui-scale-large .btn-confirm              { font-size: 14px; padding: 9px 18px; }
  body.ui-scale-large .btn-prijs                { font-size: 14px; padding: 9px 14px; }
  body.ui-scale-large .icon-btn                 { width: 38px; height: 38px; font-size: 15px; border-radius: 8px; }
  body.ui-scale-large .appt-actions .icon-btn.appt-action-icon {
    --appt-action-icon-size: 44px;
    --appt-action-icon-radius: 14px;
  }
  body.ui-scale-large .appt-footer-cta-row .btn-prijs,
  body.ui-scale-large .appt-footer-cta-row .btn-done {
    font-size: 11px;
    padding: 6px 8px;
    min-height: 36px;
  }
  body.ui-scale-large .icon-btn.edit-action     { font-size: 12px; min-width: 82px; }
  body.ui-scale-large .complete-row             { font-size: 14px; }
  body.ui-scale-large .service-date-row         { font-size: 14px; }
  body.ui-scale-large .service-date-row input   { font-size: 13px; padding: 7px 10px; }
  body.ui-scale-large .review-toggle            { font-size: 14px; }
  body.ui-scale-large .appt-inner               { padding: 14px 16px 14px 36px; }
  body.ui-scale-large .appt-card                { margin-bottom: 12px; }
  body.ui-scale-large .total-label              { font-size: 13px; }
  body.ui-scale-large .total-amount             { font-size: 22px; }
  /* Route panel */
  body.ui-scale-large .route-name               { font-size: 14px; }
  body.ui-scale-large .route-addr               { font-size: 12px; }
  body.ui-scale-large .route-time               { font-size: 13px; }
  body.ui-scale-large .btn-optimize             { font-size: 14px; padding: 13px; }
  body.ui-scale-large .mobile-tab               { font-size: 12px; padding: 14px 0; }

  .btn-dagopgave {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 10px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-dagopgave:hover { background: var(--surface3); color: var(--text); }

  .planner-app-icon-btn.btn-day-block {
    flex-shrink: 0;
    gap: 0;
    padding: 0;
  }
  .planner-app-icon-btn.btn-day-block .btn-day-block-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 600;
    color: var(--ink-soft);
    filter: grayscale(1);
    opacity: 0.65;
  }
  .planner-app-icon-btn.btn-day-block:hover .btn-day-block-ic {
    opacity: 0.88;
    color: var(--ink);
  }
  .planner-app-icon-btn.btn-day-block.is-day-blocked .btn-day-block-ic {
    filter: grayscale(1) brightness(1.08);
    opacity: 0.98;
    color: var(--ink);
  }
  .planner-app-icon-btn.btn-day-block.is-day-blocked {
    border-color: rgba(255, 140, 0, 0.42);
    background: rgba(255, 140, 0, 0.12);
  }
  .planner-app-icon-btn.btn-day-block.is-day-blocked:hover {
    border-color: rgba(255, 140, 0, 0.55);
    background: rgba(255, 140, 0, 0.18);
  }
  .btn-day-block--menu.planner-app-icon-btn {
    margin: 4px auto 0;
  }

  .appt-card.cal-block {
    border-color: rgba(255, 140, 0, 0.45);
    background: rgba(255, 140, 0, 0.06);
  }
  .appt-card.cal-block .appt-number { color: #ffb347; }
  .appt-card.cal-block .appt-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 200, 150, 0.92);
    letter-spacing: 0.02em;
  }

  .day-blocked-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 140, 0, 0.45);
    background: rgba(255, 140, 0, 0.12);
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
  }
  .day-blocked-banner strong { color: #ffb347; }
  .day-blocked-dismiss {
    margin-left: 10px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 140, 0, 0.45);
    background: rgba(255, 140, 0, 0.12);
    color: #ffb347;
    cursor: pointer;
  }
  .day-blocked-dismiss:hover { background: rgba(255, 140, 0, 0.22); }
  .day-blocked-banner.day-blocked-banner--customer-full {
    border-color: rgba(220, 74, 26, 0.45);
    background: rgba(220, 74, 26, 0.12);
    color: #e77d5b;
  }
  .day-blocked-banner.day-blocked-banner--customer-full strong {
    color: #dc4a1a;
  }
  .planner-app-icon-btn.btn-day-block.is-day-customer-full:not(.is-day-blocked) {
    border-color: rgba(120, 190, 255, 0.45);
    background: rgba(70, 140, 220, 0.12);
  }
  .planner-app-icon-btn.btn-day-block.is-day-customer-full:not(.is-day-blocked) .btn-day-block-ic {
    color: rgba(170, 210, 255, 0.95);
  }
  .planning-section--blocks .planning-section-title {
    color: rgba(255, 180, 120, 0.88);
    border-bottom-color: rgba(255, 140, 0, 0.22);
  }

  /* Dagopgave modal */
  .dagopgave-modal {
    max-width: 600px;
    width: 100%;
    max-height: min(90dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 24px));
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dagopgave-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
  }
  .dagopgave-header > div:first-child {
    flex: 1 1 200px;
    min-width: 0;
  }
  .dagopgave-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
  }
  .dagopgave-row {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: var(--surface2);
  }
  .dagopgave-row-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
  }
  .dagopgave-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
  }
  .dagopgave-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent2);
  }
  .dagopgave-meta {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
    line-height: 1.5;
  }
  .dagopgave-lines {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 6px;
  }
  .dagopgave-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    padding: 2px 0;
  }
  .dagopgave-line.basis { color: var(--text); }
  .dagopgave-grand {
    border-top: 2px solid var(--border);
    margin-top: 14px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
  }
  .dagopgave-empty {
    text-align: center;
    padding: 30px 0;
    color: var(--muted);
    font-size: 13px;
  }

  /* Print-stijlen — alleen dagopgave zichtbaar bij afdrukken */
  @media print {
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body > *:not(#dagopgavePrintArea) { display: none !important; }
    #dagopgavePrintArea {
      display: block !important;
      font-family: var(--font-body);
      color: #111;
      padding: 24px;
    }
    .po-header { margin-bottom: 20px; border-bottom: 2px solid #111; padding-bottom: 12px; }
    .po-title { font-size: 20px; font-weight: 700; }
    .po-subtitle { font-size: 12px; color: #555; margin-top: 3px; }
    .po-row { border: 1px solid #ccc; border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; page-break-inside: avoid; }
    .po-row-header { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
    .po-meta { font-size: 11px; color: #555; margin-bottom: 6px; line-height: 1.5; }
    .po-line { display: flex; justify-content: space-between; font-size: 11px; color: #333; border-top: 1px solid #eee; padding: 3px 0; }
    .po-grand { border-top: 2px solid #111; margin-top: 12px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
  }

  .form-row { margin-bottom: 8px; }
  .form-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; display: block; }
  .form-hint-subtle { font-size: 11px; color: var(--muted); margin-top: 4px; min-height: 14px; }
  .form-hint-subtle.is-error { color: var(--reparatie); }
  .form-input, .form-select {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 7px 10px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 12px;
    transition: border-color 0.15s;
    outline: none;
  }
  .form-input:focus, .form-select:focus { border-color: var(--accent); }
  .form-select option { background: var(--surface2); }
  .form-input,
  .form-select {
    min-height: 44px;
    touch-action: manipulation;
  }
  textarea.form-input {
    min-height: 88px;
  }
  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
  }

  /* TOAST */
  .toast {
    position: fixed;
    bottom: 16px;
    right: 16px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 300;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s;
    max-width: 280px;
    line-height: 1.5;
  }
  .toast.show { transform: translateY(0); opacity: 1; }
  .toast.success {
    border-color: var(--accent2);
    color: var(--accent2);
  }
  .toast.info { border-color: var(--blue); }
  .toast.loading { border-color: var(--accent); }
  .toast.warning {
    border-color: #f59e0b;
    color: #f59e0b;
  }

  /* Voorkomt scroll-anchoring jumps op iOS/Safari bij DOM-wissel in de kaartenlijst */
  #apptList {
    overflow-anchor: none;
  }
  .appt-card {
    overflow-anchor: none;
  }

  /* PRIJS SECTIE */
  .price-section {
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .price-empty-note {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--muted);
    margin: 2px 0 6px;
  }
  .price-section-label {
    font-family: var(--font-body);
    font-size: 9px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
  }
  .extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text);
    padding: 2px 0;
  }
  .extra-remove {
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
    padding: 0 4px;
    transition: color 0.15s;
  }
  .extra-remove:hover { color: var(--reparatie); }
  .add-extra-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
  }
  .add-extra-row .form-input {
    padding: 5px 8px;
    font-size: 11px;
    height: 30px;
  }
  .price-input { width: 72px; flex-shrink: 0; }
  .btn-add-extra {
    background: var(--surface3);
    border: 1px solid var(--border);
    color: var(--accent2);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
  }
  .btn-add-extra:hover { border-color: var(--accent2); background: rgba(0,212,170,0.1); }
  .btn-add-price-line {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px dashed var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent2);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .btn-add-price-line:hover {
    border-color: var(--accent2);
    background: rgba(0, 212, 170, 0.08);
  }
  .extra-item--basis {
    font-weight: 500;
    opacity: 0.95;
  }
  @media (max-width: 720px) {
    .price-section .form-input,
    .price-section .price-input {
      font-size: 16px; /* iOS: voorkomt zoom op focus */
    }
  }
  .catalog-v1-results {
    display: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 170px;
    overflow: auto;
    background: rgba(255,255,255,0.02);
  }
  .catalog-v1-results.is-open { display: block; }
  .catalog-v1-result {
    width: 100%;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: var(--text);
    padding: 12px 12px;
    min-height: 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    touch-action: manipulation;
  }
  .catalog-v1-result:last-child { border-bottom: none; }
  .catalog-v1-result:hover { background: rgba(255,255,255,0.06); }
  .catalog-v1-empty {
    color: var(--muted);
    font-size: 12px;
    padding: 8px 10px;
  }
  .catalog-v1-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text);
    margin-top: 4px;
  }
  .catalog-v1-line button {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
  }
  .price-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--accent2);
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 8px;
    gap: 12px;
  }
  .touch-price-overlay .price-total-row > span:first-child,
  .complete-bar .price-total-row > span:first-child {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .touch-price-overlay .price-total-row span:last-child,
  .complete-bar .price-total-row span:last-child {
    font-size: clamp(28px, 6.5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  ::-webkit-scrollbar { width: 4px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

  /* LOGIN */
  .login-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    overflow-x: clip;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .login-overlay.hidden { display: none; }
  .login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 340px;
    max-width: 100%;
  }
  .login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
  }
  .login-logo img {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto 12px;
    object-fit: contain;
  }
  @media (max-width: 480px) {
    .login-logo img {
      height: 32px;
    }
  }
  .login-box .login-field:first-of-type { margin-top: 10px; }
  .login-field { margin-bottom: 14px; }
  .login-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; display: block; }
  .login-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
  }
  .login-input:focus { border-color: var(--accent); }
  .login-error { font-size: 12px; color: var(--reparatie); margin-bottom: 10px; display: none; }
  .login-error.visible { display: block; }
  .btn-login {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 12px;
    min-height: 48px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s;
    letter-spacing: 0.02em;
    margin-top: 6px;
    touch-action: manipulation;
  }
  .btn-login:hover { opacity: 0.85; }

  /* —— Responsive: mobile-first layout + min-width enhancements —— */
  .mobile-tabs {
    display: none;
    flex-shrink: 0;
    height: 48px;
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    padding: 0 max(0px, env(safe-area-inset-right)) 0 max(0px, env(safe-area-inset-left));
  }
  .mobile-tab {
    flex: 1;
    padding: 12px 8px;
    min-height: 48px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    touch-action: manipulation;
  }
  .mobile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
  }
  .hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: none;
    background: rgba(20, 20, 20, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-bottom-nav .mobile-tab {
    border-bottom: none;
    border-radius: 8px;
    min-height: 44px;
    height: 44px;
    padding: 6px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .mobile-bottom-nav .mobile-tab.active {
    background: rgba(255, 107, 53, 0.14);
    color: var(--accent);
  }
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 130;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
  }
  .mobile-menu-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
  .mobile-menu-panel {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(84vw, 300px);
    max-width: 100%;
    background: var(--surface);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 24px rgba(26, 21, 18, 0.08);
    transform: translateX(-102%);
    transition: transform 0.24s ease;
    padding: max(14px, env(safe-area-inset-top)) 14px 16px max(16px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--wm-radius-md, 10px);
    border: 1px solid var(--border);
    background: #fff;
    color: #645c52;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .mobile-menu-item:hover {
    background: #fdfbf8;
    border-color: #d9d2c5;
  }
  .mobile-menu-item:active {
    background: #f5f1ea;
  }
  .mobile-menu-item--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .mobile-menu-item--primary:hover {
    opacity: 0.92;
    background: var(--accent);
    border-color: var(--accent);
  }
  .mobile-menu-item--danger {
    border-color: rgba(160, 47, 8, 0.35);
    color: #a02f08;
    background: #fff8f5;
  }
  .mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
  }
  .mobile-menu-subtitle {
    margin-top: 4px;
  }
  .mobile-menu-nav-item {
    justify-content: flex-start;
    gap: 10px;
    text-align: left;
  }
  .mobile-menu-nav-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d9d2c5;
    transition: background 0.15s ease;
  }
  .mobile-menu-nav-item.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }
  .mobile-menu-nav-item.is-active .mobile-menu-nav-dot {
    background: #fff;
  }
  body.ipad-field-vp .mobile-menu-item {
    min-height: 50px;
    font-size: 14px;
  }
  /* iPad field — Voorraad / Bestellijst / Buslijst typography */
  body.ipad-field-vp #panelInventory .table-clean,
  body.ipad-field-vp #panelBestellijst .table-clean {
    font-size: 16px;
  }
  body.ipad-field-vp #panelInventory .table-clean th,
  body.ipad-field-vp #panelBestellijst .table-clean th {
    font-size: 14px;
    padding: 10px 8px;
  }
  body.ipad-field-vp #panelInventory .table-clean td,
  body.ipad-field-vp #panelBestellijst .table-clean td {
    padding: 10px 8px;
  }
  body.ipad-field-vp #inventoryTable tbody td[colspan] {
    font-size: 17px;
  }
  body.ipad-field-vp #panelInventory .status-pill,
  body.ipad-field-vp #panelBestellijst .status-pill {
    font-size: 14px;
    padding: 4px 10px;
  }
  body.ipad-field-vp #panelInventory .field-input {
    font-size: 16px;
    padding: 10px 12px;
    min-height: 44px;
  }
  body.ipad-field-vp #panelInventory .chip-btn:not([data-delete-id]) {
    min-height: 44px;
    font-size: 14px;
    padding: 8px 14px;
  }
  body.ipad-field-vp #panelInventory .chip-btn[data-delete-id] {
    min-height: 32px;
    font-size: 12px;
    padding: 4px 10px;
    opacity: 0.75;
  }
  body.ipad-field-vp #panelInventory .today-btn,
  body.ipad-field-vp #panelBestellijst .today-btn {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 16px;
  }
  body.ipad-field-vp #panelBestellijst .table-clean td span {
    font-size: 15px;
  }
  body.ipad-field-vp #panelInventory .today-page-heading p,
  body.ipad-field-vp #panelBestellijst .today-page-heading p,
  body.ipad-field-vp #panelBuslijst .today-page-heading p {
    font-size: 15px;
  }
  body.ipad-field-vp #panelBuslijst .buslijst-group-title {
    font-size: 17px;
    margin-bottom: 8px;
  }
  body.ipad-field-vp #panelBuslijst .buslijst-line {
    font-size: 17px;
    padding: 10px 12px;
    line-height: 1.45;
  }
  /* Klaar-modal footer meta (datum + review toggle) */
  body.ipad-field-vp .complete-footer-left .service-date-row--last-maint label,
  body.ipad-field-vp .complete-footer-left .review-toggle {
    font-size: 16px;
  }
  body.ipad-field-vp .complete-footer-left .service-date-row--last-maint input[type='date'] {
    font-size: 16px;
    padding: 8px 12px;
    min-height: 44px;
  }
  body.ipad-field-vp .complete-footer-left .review-toggle .toggle {
    width: 44px;
    height: 26px;
    border-radius: 13px;
  }
  body.ipad-field-vp .complete-footer-left .review-toggle .toggle::after {
    width: 20px;
    height: 20px;
  }
  body.ipad-field-vp .complete-footer-left .review-toggle .toggle.on::after {
    left: 20px;
  }
  /* Voorraad bewerk-modus: card-layout op iPad (acties altijd bereikbaar) */
  body.ipad-field-vp #inventoryTable.inventory-table--editing {
    display: block;
    width: 100%;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing thead {
    display: none;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody {
    display: block;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-group-row {
    display: block;
    margin-top: 14px;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-group-row:first-child {
    margin-top: 0;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-group-row td {
    display: block;
    padding: 10px 12px;
    border-bottom: none;
    font-size: 17px;
    font-weight: 600;
    color: #475569;
    background: #f8f9fb;
    border-radius: 10px;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row {
    display: block;
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    text-align: right;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td::before {
    content: attr(data-label);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
    text-align: left;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td[data-label="Naam"] {
    display: block;
    padding-top: 0;
    padding-bottom: 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    font-size: 17px;
    font-weight: 700;
    text-align: left;
    line-height: 1.35;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td[data-label="Naam"]::before {
    display: none;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td.inventory-actions-cell {
    display: block;
    padding-top: 10px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td.inventory-actions-cell::before {
    display: block;
    margin-bottom: 8px;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing .inventory-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
  }
  body.ipad-field-vp #inventoryTable.inventory-table--editing tbody tr.inventory-edit-row td[data-label="Minimum"] .field-input {
    max-width: none;
    width: 120px;
  }
  .mobile-menu-overlay.visible .mobile-menu-panel {
    transform: translateX(0);
  }
  @media (max-width: 1179px) {
    body {
      padding-bottom: calc(66px + env(safe-area-inset-bottom));
      font-size: 15px;
    }
    .hamburger-btn {
      display: inline-flex;
    }
    .mobile-bottom-nav {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
    }
  }
  /* Zoeken: verborgen in layout; opent als paneel onder header via 🔎 */
  .global-search {
    --global-search-top: 56px;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--global-search-top);
    z-index: 160;
    padding: 0 max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }
  .global-search.global-search--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .global-search-panel {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding-top: 8px;
  }
  .global-search-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 14px;
  }
  .global-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    z-index: 165;
    max-height: min(340px, 52vh);
    overflow: auto;
    display: none;
  }
  .global-search-results.open { display: block; }
  .global-search-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
  }
  .global-search-item:last-child { border-bottom: none; }
  .global-search-item:hover { background: rgba(255,255,255,0.04); }
  .global-search-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
  }

  .appointments.tab-hidden,
  .route-panel.tab-hidden {
    display: none !important;
  }

  .header-stats > .stat:nth-child(2),
  .header-stats > .stat:nth-child(3) {
    display: none;
  }

  .toast {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    max-width: none;
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  @media (min-width: 400px) {
    .header-stats > .stat:nth-child(2),
    .header-stats > .stat:nth-child(3) {
      display: flex;
    }
  }

  @media (min-width: 640px) {
    .modal {
      max-width: min(440px, calc(100vw - 32px));
      padding: 20px;
      padding-left: max(20px, env(safe-area-inset-left));
      padding-right: max(20px, env(safe-area-inset-right));
      padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    .dagopgave-modal {
      max-width: min(600px, calc(100vw - 32px));
    }

    .form-row-2 {
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }

    .modal-actions:not(.modal-actions--split) {
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
    }
    .modal-actions:not(.modal-actions--split) > button,
    .modal-actions:not(.modal-actions--split) > a {
      width: auto;
      min-width: min(100%, 140px);
    }

    .modal-actions.modal-actions--split {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: flex-end;
      gap: 12px;
    }
    .modal-actions.modal-actions--split .modal-actions-row {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: flex-end;
      width: auto;
    }
    .modal-actions.modal-actions--split .modal-actions-row > button {
      width: auto;
      min-width: 120px;
    }
  }

  @media (min-width: 1180px) {
    .mobile-tabs {
      display: none;
    }

    .appointments.tab-hidden,
    .route-panel.tab-hidden {
      display: none !important;
    }

    .layout {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
      height: auto;
      min-height: calc(100dvh - 52px);
      max-height: none;
      overflow-y: auto;
    }

    .appointments {
      border-right: none;
      border-bottom: 1px solid var(--border);
      padding: 16px;
      height: auto;
      max-height: none;
      min-height: 0;
      overflow-y: visible;
    }

    .route-panel {
      padding: 16px;
      height: auto;
      max-height: none;
      min-height: 0;
      overflow: visible;
      border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .date-nav-wrap {
      display: none !important;
    }

    .date-label {
      flex: 0 0 auto;
      width: 180px;
      font-size: 11px;
      padding: 8px 10px;
    }

    header {
      flex-wrap: wrap;
      padding: 6px 14px 8px;
      height: auto;
      min-height: 52px;
      row-gap: 8px;
    }
    .planner-header-brand-row {
      flex: 0 1 auto;
      justify-content: flex-start;
    }

    .toast {
      left: auto;
      right: max(16px, env(safe-area-inset-right));
      max-width: 360px;
    }

    .icon-btn {
      width: 28px;
      height: 28px;
      font-size: 12px;
      border-radius: 6px;
    }
    .icon-btn.edit-action {
      font-size: 10px;
      min-width: 76px;
      width: auto;
      height: 28px;
      min-height: 28px;
      padding: 0 6px;
    }

    input.form-input,
    select.form-select {
      min-height: unset;
    }
    textarea.form-input {
      min-height: 72px;
    }

    .btn-add {
      padding: 7px 14px;
      min-height: unset;
      font-size: 12px;
      border-radius: 6px;
    }

    .btn-optimize {
      padding: 10px;
      min-height: unset;
      font-size: 12px;
    }

    .route-toolbar .btn-unlock-route,
    .route-toolbar .btn-confirm-route {
      min-height: unset;
    }

    .btn-logout {
      min-height: unset;
      padding: 6px 10px;
      border-radius: 6px;
    }

    .date-nav button {
      padding: 8px 10px;
      min-width: 0;
      min-height: 0;
      font-size: 14px;
    }

    .btn-dagopgave {
      padding: 5px 8px;
      min-width: 0;
      min-height: 0;
      font-size: 14px;
      border-radius: 6px;
    }
    .planner-app-icon-btn.btn-day-block {
      width: 44px;
      height: 44px;
      min-height: 44px;
      border-radius: 10px;
    }
    .planner-app-icon-btn.btn-day-block .btn-day-block-ic { font-size: 18px; }

    .appointments-header-actions {
      gap: 8px;
    }
    .appointments-header-util .btn-dagopgave,
    .appointments-header-util .planner-app-icon-btn.btn-day-block {
      width: var(--appts-header-util-size);
      height: var(--appts-header-util-size);
      min-width: var(--appts-header-util-size);
      min-height: var(--appts-header-util-size);
      border-radius: 14px;
    }
    .appointments-header-util .btn-dagopgave {
      padding: 0;
      font-size: 18px;
    }
    .appointments-header-actions .btn-add {
      height: var(--appts-header-cta-height);
      min-height: var(--appts-header-cta-height);
      padding: 0 16px;
      font-size: 13px;
      border-radius: 14px;
    }

    .btn-done {
      padding: 5px 10px;
      border-radius: 6px;
    }

    .planner-app-tools {
      display: inline-flex !important;
      margin-left: auto;
    }
    .planner-app-tools > .planner-app-icon-btn:not(#btnGlobalSearch) {
      display: none !important;
    }
    .planner-week-nav {
      display: flex !important;
      order: 3;
      flex: 1 1 100%;
      min-width: 0;
    }
    header > div:first-child .hamburger-btn {
      display: inline-flex;
    }
    .planner-brand-logo {
      height: 38px;
      max-width: min(200px, 36vw);
    }
  }

  /* App widths: comfortable card type when not using full desktop card density */
  @media (max-width: 1179px) {
    .appt-inner { padding: 12px 10px 12px 30px; }
    .appt-number { left: 8px; font-size: clamp(15px, 3.5vw, 17px); }
    .appt-name { font-size: 15px; font-weight: 500; }
    .appt-time { font-size: 18px; }
    .appt-address { font-size: clamp(16px, 3.8vw, 18px); }
    .appt-desc { font-size: 13px; }
    .tag { font-size: 11px; padding: 5px 9px; }
    .appt-phone { font-size: 13px; }
    .appt-footer-cta-row {
      width: min(176px, 48vw);
    }
    .appt-footer-cta-row .btn-prijs,
    .appt-footer-cta-row .btn-done {
      min-height: 34px;
      font-size: 11px;
      padding: 6px 8px;
    }
  }

  @media (min-width: 1180px) {
    .stat-label { display: block; }
  }

  /* ═══ Jerry mode: extra laag (touch, formulieren, catalogus, modals) — met body.ui-scale-large (handmatig of account jerry) ═══ */
  body.ui-scale-large {
    --jerry-focus: 0 0 0 3px rgba(0, 212, 170, 0.4);
    --appts-header-util-size: 52px;
    --appts-header-cta-height: 52px;
  }

  /* ── Explicit Jerry mode alias + stronger readability targets ── */
  body.jerry-mode {
    font-size: 18px;
  }
  body.jerry-mode .appt-address { font-size: 22px; line-height: 1.3; font-weight: 700; }
  body.jerry-mode .appt-name { font-size: 20px; line-height: 1.35; font-weight: 500; color: var(--ink-soft); }
  body.jerry-mode .appt-desc,
  body.jerry-mode .appt-notes,
  body.jerry-mode .route-name,
  body.jerry-mode .route-addr,
  body.jerry-mode .route-time,
  body.jerry-mode .details-line { font-size: 20px; line-height: 1.45; }
  body.jerry-mode button,
  body.jerry-mode .btn-add,
  body.jerry-mode .btn-save,
  body.jerry-mode .btn-cancel,
  body.jerry-mode .btn-done,
  body.jerry-mode .btn-prijs,
  body.jerry-mode .btn-optimize,
  body.jerry-mode .btn-confirm-route,
  body.jerry-mode .btn-unlock-route,
  body.jerry-mode .btn-maps,
  body.jerry-mode .btn-morning,
  body.jerry-mode .icon-btn,
  body.jerry-mode .mobile-tab {
    min-height: 56px !important;
    padding: 10px 14px;
    font-size: 18px;
  }
  body.jerry-mode .planner-app-icon-btn {
    min-height: 56px !important;
    height: 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    padding: 0 !important;
    font-size: 22px !important;
  }
  body.jerry-mode .appointments-header-actions .appointments-header-util .btn-dagopgave,
  body.jerry-mode .appointments-header-actions .appointments-header-util .planner-app-icon-btn.btn-day-block {
    width: var(--appts-header-util-size) !important;
    height: var(--appts-header-util-size) !important;
    min-width: var(--appts-header-util-size) !important;
    min-height: var(--appts-header-util-size) !important;
    padding: 0 !important;
    font-size: 20px !important;
    border-radius: 14px !important;
  }
  body.jerry-mode .appointments-header-actions > .btn-add {
    min-height: var(--appts-header-cta-height) !important;
    height: var(--appts-header-cta-height) !important;
    padding: 0 18px !important;
    font-size: 14px !important;
    border-radius: 14px !important;
  }
  body.jerry-mode .icon-btn {
    width: auto;
    min-width: 56px;
    border-radius: 10px;
  }
  body.jerry-mode .appt-actions .icon-btn.appt-action-icon {
    min-height: unset !important;
    padding: 0 !important;
    width: var(--appt-action-icon-size) !important;
    min-width: var(--appt-action-icon-size) !important;
    max-width: var(--appt-action-icon-size) !important;
    height: var(--appt-action-icon-size) !important;
    border-radius: var(--appt-action-icon-radius) !important;
  }
  body.jerry-mode .appt-footer-cta-row .btn-prijs,
  body.jerry-mode .appt-footer-cta-row .btn-done {
    min-height: 44px !important;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }
  body.jerry-mode .appt-card {
    margin-bottom: 18px;
    border-radius: 14px;
  }
  body.jerry-mode .appt-inner {
    padding: 18px 18px 18px 40px;
  }
  body.jerry-mode .appointments,
  body.jerry-mode .route-panel {
    padding: 18px;
    gap: 14px;
  }
  @media (max-width: 1179px) {
    body.jerry-mode .layout {
      grid-template-columns: 1fr !important;
      grid-template-rows: auto;
      height: auto;
      min-height: auto;
      max-height: none;
    }
    body.jerry-mode .appointments,
    body.jerry-mode .route-panel {
      height: auto;
      max-height: none;
      overflow: visible;
      border-right: none;
      border-bottom: 1px solid var(--border);
    }
    body.jerry-mode .mobile-bottom-nav {
      display: grid !important;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 8px;
    }
    body.jerry-mode .hamburger-btn {
      display: inline-flex !important;
      width: 48px;
      height: 48px;
      font-size: 20px;
    }
  }
  @media (min-width: 1180px) {
    body.ui-scale-large .planner-brand-logo {
      height: 42px;
      max-width: min(220px, 42vw);
    }
  }

  body.ui-scale-large .appt-inner {
    padding-top: 16px;
    padding-bottom: 16px;
    line-height: 1.45;
  }
  body.ui-scale-large .appt-address {
    font-size: clamp(18px, 4.2vw, 22px);
    line-height: 1.28;
    font-weight: 700;
    color: var(--text);
    word-break: break-word;
  }
  body.ui-scale-large .appt-name {
    font-size: clamp(15px, 3.6vw, 18px);
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink-soft);
    word-break: break-word;
  }
  body.ui-scale-large .appt-time {
    font-size: clamp(15px, 3.8vw, 19px);
  }
  body.ui-scale-large .appt-desc {
    line-height: 1.5;
    word-break: break-word;
    color: var(--ink-soft);
    font-size: clamp(13px, 3.2vw, 15px);
  }
  body.ui-scale-large .appt-card {
    margin-bottom: 14px;
  }

  body.ui-scale-large .section-title {
    line-height: 1.3;
    word-break: break-word;
  }
  body.ui-scale-large .route-name,
  body.ui-scale-large .route-addr {
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
  }

  body.ui-scale-large .form-row {
    margin-bottom: 14px;
  }
  body.ui-scale-large .form-label {
    font-size: 12px;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    line-height: 1.3;
  }
  body.ui-scale-large .form-input:focus,
  body.ui-scale-large .form-select:focus {
    box-shadow: var(--jerry-focus);
    border-color: var(--accent2);
  }
  body.ui-scale-large textarea.form-input {
    min-height: 104px;
    line-height: 1.45;
    font-size: 16px;
    padding: 12px 14px;
  }

  body.ui-scale-large .catalog-v1-results {
    max-height: min(50dvh, 280px);
  }
  body.ui-scale-large .catalog-v1-result {
    min-height: 52px;
    padding: 14px 14px;
    font-size: 15px;
    line-height: 1.35;
  }
  body.ui-scale-large .catalog-v1-empty {
    font-size: 14px;
    padding: 12px 14px;
  }
  body.ui-scale-large .catalog-v1-line {
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.35;
  }
  body.ui-scale-large .catalog-v1-line button {
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  body.ui-scale-large .modal-title {
    font-size: 18px;
    line-height: 1.3;
  }
  body.ui-scale-large .modal {
    padding: 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  body.ui-scale-large .modal-actions {
    gap: 14px;
    margin-top: 18px;
  }
  body.ui-scale-large .modal-actions > button,
  body.ui-scale-large .modal-actions > a {
    min-height: 58px;
    font-size: 16px;
  }
  body.ui-scale-large .modal-actions--split .modal-actions-row > button {
    min-height: 58px;
  }

  body.ui-scale-large .dagopgave-header-actions .btn-save,
  body.ui-scale-large .dagopgave-header-actions .btn-cancel {
    min-height: 56px;
  }

  /* Mobiel Jerry: maximale tikdoelen */
  @media (max-width: 1179px) {
    body.ui-scale-large .form-input,
    body.ui-scale-large .form-select {
      min-height: 56px;
      padding: 14px 16px;
      font-size: 16px;
    }
    body.ui-scale-large .stat-val {
      font-size: 26px;
    }
    body.ui-scale-large .stat-label {
      display: block;
      font-size: 9px;
      margin-top: 4px;
    }
    body.ui-scale-large .btn-add {
      min-height: 60px;
      padding: 14px 18px;
      font-size: 16px;
    }
    body.ui-scale-large .btn-dagopgave {
      min-height: 56px;
      padding: 12px 14px;
      font-size: 14px;
    }
    body.ui-scale-large .planner-app-icon-btn.btn-day-block {
      width: 56px;
      height: 56px;
      min-height: 56px;
      min-width: 56px;
      border-radius: 12px;
    }
    body.ui-scale-large .appointments-header-actions .btn-add {
      min-height: var(--appts-header-cta-height);
      height: var(--appts-header-cta-height);
      padding: 0 18px;
      font-size: 14px;
      border-radius: 14px;
    }
    body.ui-scale-large .appointments-header-util .btn-dagopgave {
      min-height: var(--appts-header-util-size);
      height: var(--appts-header-util-size);
      padding: 0;
      font-size: 18px;
    }
    body.ui-scale-large .appointments-header-util .planner-app-icon-btn.btn-day-block {
      width: var(--appts-header-util-size);
      height: var(--appts-header-util-size);
      min-width: var(--appts-header-util-size);
      min-height: var(--appts-header-util-size);
      border-radius: 14px;
    }
    body.ui-scale-large .btn-optimize {
      min-height: 58px;
      font-size: 15px;
      padding: 14px 12px;
    }
    body.ui-scale-large .route-toolbar .btn-unlock-route,
    body.ui-scale-large .route-toolbar .btn-confirm-route {
      min-height: 56px;
      padding: 12px 14px;
      font-size: 14px;
    }
    body.ui-scale-large .btn-maps,
    body.ui-scale-large .btn-morning {
      min-height: 56px;
      padding: 14px 12px;
      font-size: 15px;
    }
    body.ui-scale-large .btn-logout {
      min-height: 52px;
      padding: 12px 14px;
      font-size: 12px;
    }
    body.ui-scale-large .date-nav button {
      min-width: 52px;
      min-height: 56px;
      font-size: 20px;
      padding: 12px 14px;
    }
    body.ui-scale-large .mobile-tab {
      font-size: 12px;
      padding: 14px 8px;
      min-height: 52px;
    }
    body.ui-scale-large .icon-btn {
      width: 52px;
      height: 52px;
      font-size: 17px;
      border-radius: 10px;
    }
    body.ui-scale-large .appt-actions .icon-btn.appt-action-icon {
      --appt-action-icon-size: 48px;
      --appt-action-icon-radius: 14px;
      font-size: 20px;
    }
    body.ui-scale-large .icon-btn.edit-action {
      min-width: 90px;
      height: 52px;
      min-height: 52px;
      font-size: 13px;
    }
    body.ui-scale-large .appt-footer-cta-row .btn-done,
    body.ui-scale-large .appt-footer-cta-row .btn-prijs {
      min-height: 40px;
      padding: 7px 10px;
      font-size: 12px;
    }
    body.ui-scale-large .btn-confirm {
      min-height: 52px;
      padding: 12px 16px;
      font-size: 15px;
    }
    body.ui-scale-large .modal-actions > button,
    body.ui-scale-large .modal-actions > a {
      min-height: 60px;
      font-size: 16px;
    }
  }

  /* Desktop Jerry: groter leesbaar, layout blijft compact */
  @media (min-width: 1180px) {
    body.ui-scale-large .form-input,
    body.ui-scale-large .form-select {
      min-height: 50px;
      padding: 11px 14px;
      font-size: 15px;
    }
    body.ui-scale-large textarea.form-input {
      min-height: 96px;
      font-size: 15px;
    }
    body.ui-scale-large .btn-add {
      min-height: 48px;
      padding: 10px 16px;
      font-size: 14px;
      border-radius: 8px;
    }
    body.ui-scale-large .btn-dagopgave {
      min-height: 48px;
      padding: 10px 12px;
      font-size: 13px;
    }
    body.ui-scale-large .planner-app-icon-btn.btn-day-block {
      width: 48px;
      height: 48px;
      min-height: 48px;
      min-width: 48px;
    }
    body.ui-scale-large .appointments-header-actions .btn-add {
      min-height: var(--appts-header-cta-height);
      height: var(--appts-header-cta-height);
      padding: 0 18px;
      font-size: 14px;
      border-radius: 14px;
    }
    body.ui-scale-large .appointments-header-util .btn-dagopgave {
      min-height: var(--appts-header-util-size);
      height: var(--appts-header-util-size);
      padding: 0;
      font-size: 18px;
    }
    body.ui-scale-large .appointments-header-util .planner-app-icon-btn.btn-day-block {
      width: var(--appts-header-util-size);
      height: var(--appts-header-util-size);
      min-width: var(--appts-header-util-size);
      min-height: var(--appts-header-util-size);
      border-radius: 14px;
    }
    body.ui-scale-large .btn-optimize {
      min-height: 50px;
      font-size: 14px;
    }
    body.ui-scale-large .route-toolbar .btn-unlock-route,
    body.ui-scale-large .route-toolbar .btn-confirm-route {
      min-height: 48px;
    }
    body.ui-scale-large .btn-logout {
      min-height: 40px;
      padding: 8px 12px;
    }
    body.ui-scale-large .date-nav button {
      min-height: 44px;
      min-width: 40px;
      font-size: 15px;
    }
    body.ui-scale-large .modal-actions > button,
    body.ui-scale-large .modal-actions > a {
      min-height: 50px;
      font-weight: 500;
    }
    body.ui-scale-large .modal-actions--split .modal-actions-row > button {
      min-height: 50px;
    }
    body.ui-scale-large .icon-btn {
      width: 40px;
      height: 40px;
      font-size: 15px;
    }
    body.ui-scale-large .appt-actions .icon-btn.appt-action-icon {
      --appt-action-icon-size: 44px;
      --appt-action-icon-radius: 14px;
      font-size: 19px;
    }
    body.ui-scale-large .icon-btn.edit-action {
      font-size: 12px;
      min-width: 84px;
      height: 40px;
      min-height: 40px;
    }
    body.ui-scale-large .modal {
      padding: 22px;
      max-width: min(480px, calc(100vw - 32px));
    }
    body.ui-scale-large .dagopgave-modal {
      max-width: min(640px, calc(100vw - 32px));
    }
  }

  /* ── App shell (width < 1180px): week strip, tabs, touch-first cards ── */
  .planner-app-tools {
    display: none;
    align-items: center;
    gap: 10px;
  }
  .planner-app-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
  }
  .planner-app-icon-btn:hover {
    border-color: var(--muted);
    color: var(--accent);
  }
  .planner-week-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
  }
  .planner-week-nav-row {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .planner-week-nav-center {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    padding-left: 52px;
    padding-right: 52px;
    box-sizing: border-box;
  }
  .planner-week-nav-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
  }
  .planner-week-edge {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
  }
  .planner-week-edge:hover {
    border-color: var(--muted);
    color: var(--accent);
  }
  .planner-week-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    flex-shrink: 0;
  }
  .planner-week-icon-btn:hover {
    border-color: var(--muted);
  }
  /** Kalender: rechts, uitgelijnd met weekstrip (absolute in .planner-week-nav-row) */
  .planner-week-calendar-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
  /*
   * Day navigation (docs/specs/dag-navigatie.md): ‹ › and Vandaag sit before the date so they never move when the
   * date changes width. 34px on desktop (same as Blokkeer / Nieuwe afspraak), 44px for touch (iPad, phone).
   */
  .planner-day-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    --day-nav-h: 34px;
  }
  @media (pointer: coarse), (max-width: 1179px) {
    .planner-day-nav {
      --day-nav-h: 44px;
    }
  }
  /*
   * The pair is exactly --day-nav-h high (same as Vandaag / Blokkeer) and each arrow keeps that full height:
   * the frame is an inset outline, which takes no space, instead of a border.
   */
  .planner-day-nav-arrows {
    display: inline-flex;
    flex: 0 0 auto;
    height: var(--day-nav-h);
    outline: 1px solid var(--border);
    outline-offset: -1px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-card);
  }
  .planner-day-nav-btn {
    width: var(--day-nav-h);
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
  }
  .planner-day-nav-btn + .planner-day-nav-btn {
    border-left: 1px solid var(--border);
  }
  .planner-day-nav-btn:hover,
  .planner-day-nav-today:not(:disabled):hover {
    background: var(--bg-page);
  }
  .planner-day-nav-today {
    flex: 0 0 auto;
    height: var(--day-nav-h);
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .planner-day-nav-today:disabled {
    color: var(--ink-muted);
    opacity: 0.5;
    cursor: default;
  }
  .planner-day-nav-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    min-height: var(--day-nav-h);
    cursor: pointer;
  }
  .planner-day-nav-caret {
    font-size: 12px;
    color: var(--ink-muted);
    flex: 0 0 auto;
  }
  /*
   * Tablets (iPad): the date row gets the full width and stays on one line; "Blokkeer" / "+ Nieuwe afspraak" go on
   * their own row under it, right-aligned, each on one line.
   */
  @media (min-width: 761px) and (max-width: 1179px) {
    #panelAfspraken > .today-page-header {
      flex-wrap: wrap;
      row-gap: 10px;
    }
    #panelAfspraken > .today-page-header > .today-page-heading {
      flex: 1 1 100%;
      min-width: 0;
    }
    #panelAfspraken > .today-page-header .appointments-header-actions {
      flex: 0 0 auto;
      margin-left: auto;
    }
    #panelAfspraken > .today-page-header .appointments-header-actions .today-btn {
      white-space: nowrap;
    }
    .planner-day-nav-label h1 {
      white-space: nowrap;
    }
  }
  /* Phones: the controls row stays put and the date goes on its own line under it, at full width. */
  @media (max-width: 760px) {
    #panelAfspraken > .today-page-header {
      flex-wrap: wrap;
    }
    #panelAfspraken > .today-page-header > .today-page-heading {
      flex: 1 1 100%;
      min-width: 0;
    }
    .planner-day-nav {
      flex-wrap: wrap;
      row-gap: 6px;
    }
    .planner-day-nav-label {
      flex: 1 1 100%;
    }
    .planner-day-nav-label h1 {
      font-size: 18px;
      line-height: 1.2;
      overflow-wrap: anywhere;
    }
  }
  /* The native date input covers the date text so a tap opens the system picker (also on iOS). */
  .planner-day-nav-picker {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
    font-size: 16px;
  }
  .planner-week-strip {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: auto;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 2px;
    scrollbar-width: none;
  }
  .planner-week-strip::-webkit-scrollbar {
    display: none;
  }
  .planner-week-day {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 10px 8px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    line-height: 1.1;
    touch-action: manipulation;
  }
  .planner-week-day .planner-week-day-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
  }
  .planner-week-day.is-active {
    background: rgba(255, 107, 53, 0.22);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.35);
  }
  .planner-week-day.is-active .planner-week-day-num {
    color: var(--accent);
  }
  @media (max-width: 1179px) {
    header {
      position: relative;
      flex-wrap: wrap;
      padding: 4px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
      row-gap: 4px;
    }
    header > div:first-child {
      flex: 1 1 100%;
      order: 1;
      min-height: 56px;
    }
    header > div:first-child .hamburger-btn {
      display: none !important;
    }
    .planner-header-brand-row {
      gap: 0;
      min-height: 0;
      width: 100%;
      justify-content: center;
    }
    .planner-brand-mark {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: max(4px, env(safe-area-inset-top));
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      width: max-content;
      max-width: calc(100vw - 132px);
      margin: 0;
      pointer-events: auto;
    }
    .planner-brand-logo {
      display: block;
      height: clamp(40px, 10.5vw, 48px);
      width: auto;
      max-width: min(200px, calc(100vw - 132px));
      object-fit: contain;
      object-position: center;
    }
    .planner-app-tools {
      display: flex;
      position: absolute;
      top: max(6px, env(safe-area-inset-top));
      right: max(10px, env(safe-area-inset-right));
      order: 2;
      z-index: 2;
    }
    .date-nav-wrap {
      display: none !important;
    }
    .planner-week-nav {
      display: flex;
      flex-direction: row;
      align-items: center;
      order: 4;
      flex: 1 1 100%;
      width: 100%;
      min-width: 0;
    }
    .header-stats {
      order: 3;
      width: 100%;
      justify-content: stretch;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      max-width: none;
    }
    .header-stats .stat {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 10px 8px;
      min-height: 58px;
      justify-content: center;
    }
    .header-stats .stat-val {
      font-size: 28px;
    }
    .header-stats .stat-label {
      font-size: 10px;
      margin-top: 4px;
      letter-spacing: 0.08em;
    }

    .layout {
      grid-template-columns: 1fr !important;
      grid-template-rows: minmax(0, 1fr) !important;
      min-height: calc(100dvh - 48px - 76px) !important;
      height: auto !important;
      max-height: none !important;
    }
    .appointments {
      border-right: none !important;
      max-height: none !important;
      height: auto !important;
      padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
    }
    .route-panel {
      display: none !important;
    }
    .route-panel:not(.tab-hidden) {
      display: flex !important;
    }
    .appointments.tab-hidden {
      display: none !important;
    }

    .global-search-input {
      min-height: 46px;
      font-size: 15px;
      border-radius: 12px;
    }

    .planning-section {
      margin-bottom: 28px;
    }
    .planning-section-title {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.055em;
      text-transform: uppercase;
      color: var(--ink-soft);
      border-bottom: 1px solid rgba(255, 255, 255, 0.09);
      margin-bottom: 16px;
      padding-bottom: 10px;
      line-height: 1.3;
    }

    .appt-card {
      border-radius: 16px;
      margin-bottom: 20px;
      display: grid;
      grid-template-columns: 44px 1fr;
      grid-template-rows: auto auto;
      align-items: start;
      column-gap: 2px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
    }
    .appt-card.done::after {
      top: 14px;
      right: 14px;
      font-size: 11px;
      padding: 4px 10px;
      border-radius: 8px;
    }
    .appt-number {
      position: static;
      grid-column: 1;
      grid-row: 1;
      padding: 16px 0 0 4px;
      font-size: clamp(15px, 3.6vw, 18px);
      font-weight: 700;
      color: var(--ink-soft);
      letter-spacing: -0.02em;
    }
    .appt-inner {
      grid-column: 2;
      grid-row: 1;
      padding: 16px 16px 16px 4px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
    }
    .appt-inner > .appt-body {
      order: -2;
    }
    .appt-inner > .appt-top {
      order: -3;
      margin-bottom: 6px;
    }
    .appt-inner > .appt-meta,
    .appt-inner > .appt-notes {
      order: 1;
    }
    .appt-inner > .appt-footer {
      order: 2;
    }
    .appt-card > .complete-bar {
      grid-column: 1 / -1;
      grid-row: 2;
    }

    .appt-top {
      justify-content: space-between;
      margin-bottom: 0;
      align-items: center;
      gap: 8px;
    }
    .appt-top .appt-time {
      font-size: 12px;
    }
    .appt-actions {
      gap: 8px;
      flex-shrink: 0;
    }
    .appt-actions .icon-btn.appt-action-icon {
      --appt-action-icon-size: 48px;
      --appt-action-icon-radius: 14px;
    }

    .appt-body {
      gap: 12px;
      margin: 10px 0 14px;
    }
    .appt-address {
      font-size: clamp(17px, 4.4vw, 21px);
      font-weight: 700;
      line-height: 1.22;
    }
    .appt-name {
      font-size: 14px;
      font-weight: 500;
      color: var(--ink-soft);
      margin: 0;
    }
    .appt-desc {
      font-size: 13px;
      line-height: 1.5;
      color: var(--ink-soft);
      margin: 0;
    }
    .tag {
      font-size: 12px;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 999px;
    }
    .appt-phone {
      font-size: 13px;
    }
    .appt-price {
      font-size: clamp(16px, 4.2vw, 19px);
      font-weight: 700;
    }

    .appt-footer {
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-end;
      gap: 10px;
      margin-top: 8px;
    }
    .appt-footer-left {
      flex: 1 1 auto;
      min-width: 0;
    }
    .appt-footer-right {
      flex: 0 0 auto;
    }
    .appt-tags {
      width: 100%;
      align-items: center;
    }
    .appt-footer-actions-touch {
      width: auto;
    }
    .appt-footer-cta-row {
      width: min(172px, 46vw);
    }
    .appt-footer-cta-row .btn-prijs,
    .appt-footer-cta-row .btn-done {
      min-height: 36px;
      padding: 7px 8px;
      font-size: 11px;
      font-weight: 600;
      border-radius: 8px;
    }

    .complete-bar {
      padding: 16px;
      padding-left: 16px;
      border-radius: 0 0 14px 14px;
    }
    .btn-confirm {
      min-height: 52px;
      padding: 12px 18px;
      font-size: 15px;
      font-weight: 700;
      border-radius: 10px;
    }
    .btn-cancel {
      min-height: 48px;
      padding: 10px 14px;
      font-size: 14px;
    }
  }

  /**
   * Telefoon (≤639px): ná max-width 1179-blok zodat deze regels winnen op smalle viewports.
   * iPad portrait (768px) blijft buiten deze query.
   */
  @media (max-width: 639px) {
    .appt-actions {
      overflow-x: visible;
      flex-wrap: nowrap;
    }
    .appt-actions__icons {
      display: none !important;
    }
    .appt-actions__mobile {
      display: block !important;
    }
    .appt-actions__menu-btn .appt-action-svg {
      width: calc(var(--appt-action-icon-size) * 0.5);
      height: calc(var(--appt-action-icon-size) * 0.5);
    }
    .appt-footer {
      flex-wrap: nowrap;
      flex-direction: column;
      align-items: stretch;
      gap: 10px;
      row-gap: 10px;
    }
    .appt-footer-left {
      width: 100%;
    }
    .appt-footer-right {
      width: 100%;
      max-width: none;
      align-items: flex-end;
      flex-direction: column;
      gap: 6px;
      text-align: right;
    }
    .appt-price {
      width: 100%;
      text-align: right;
      line-height: 1.2;
    }
    .appt-footer-actions-touch {
      width: 100%;
      max-width: 260px;
      margin-left: auto;
    }
    .appt-footer-cta-row {
      width: 100%;
      max-width: 260px;
      margin-left: auto;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
  }

  /*
   * ── Account jerry: primaire schaal (staat laatst in deze stylesheet → wint op ui-scale-large / jerry-mode)
   * Zelfde layout/hiërarchie; alleen grotere type, tikdoelen en lucht.
   */
  body.user-jerry {
    --appt-action-icon-size: 60px;
    --appt-action-icon-radius: 18px;
    --appts-header-util-size: 60px;
    --appts-header-cta-height: 58px;
  }

  body.user-jerry .stat-val {
    font-size: clamp(28px, 6.5vw, 40px) !important;
    line-height: 1.1;
  }
  body.user-jerry .stat-label {
    font-size: 12px !important;
    letter-spacing: 0.08em;
    margin-top: 6px;
  }
  body.user-jerry .section-title {
    font-size: 15px !important;
  }
  body.user-jerry .planning-section-title {
    font-size: clamp(20px, 4.8vw, 26px) !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    letter-spacing: 0.04em;
  }
  body.user-jerry .appt-number {
    font-size: clamp(20px, 4.5vw, 26px) !important;
  }
  body.user-jerry .appt-top {
    gap: 12px !important;
  }
  body.user-jerry .appt-time {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    column-gap: 14px !important;
    row-gap: 8px !important;
    font-size: clamp(22px, 5.4vw, 30px) !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
  }
  body.user-jerry .appt-time .time-window-badge {
    font-size: clamp(17px, 4.2vw, 22px) !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    margin-left: 0 !important;
    line-height: 1.2 !important;
  }
  body.user-jerry .appt-card.violation .appt-time .time-window-badge {
    font-size: clamp(16px, 4vw, 21px) !important;
  }
  body.user-jerry .appt-address {
    font-size: clamp(26px, 6.8vw, 42px) !important;
    line-height: 1.22 !important;
    font-weight: 700 !important;
  }
  body.user-jerry .appt-name {
    font-size: clamp(20px, 5vw, 30px) !important;
    line-height: 1.35 !important;
  }
  body.user-jerry .appt-desc {
    font-size: clamp(17px, 4.2vw, 24px) !important;
    line-height: 1.5 !important;
  }
  body.user-jerry .appt-phone {
    font-size: clamp(18px, 4.2vw, 24px) !important;
  }
  body.user-jerry .tag {
    font-size: 15px !important;
    padding: 8px 14px !important;
    border-radius: 10px;
  }
  body.user-jerry .appt-price {
    font-size: clamp(22px, 5.2vw, 32px) !important;
  }
  body.user-jerry .total-label {
    font-size: 16px !important;
  }
  body.user-jerry .total-amount {
    font-size: clamp(28px, 6vw, 38px) !important;
  }
  body.user-jerry .meta-label {
    font-size: 12px !important;
  }
  body.user-jerry .meta-value {
    font-size: 16px !important;
  }
  body.user-jerry .appt-meta .meta-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 14px 10px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }
  body.user-jerry .appt-meta .meta-pill-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    color: var(--ink-soft) !important;
  }
  body.user-jerry .appt-meta .meta-pill-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
  }
  body.user-jerry .appt-wm-pill--moneybird,
  body.user-jerry a.appt-wm-pill--moneybird {
    font-size: 12px !important;
    padding: 5px 12px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--ink) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
  }
  body.user-jerry a.appt-wm-pill--moneybird:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.09) !important;
  }
  body.user-jerry .appt-notes {
    font-size: clamp(16px, 4vw, 22px) !important;
    padding: 10px 12px !important;
  }
  body.user-jerry .planner-week-day {
    font-size: 14px !important;
    padding: 12px 10px 14px !important;
    min-width: 64px !important;
  }
  body.user-jerry .planner-week-day .planner-week-day-num {
    font-size: clamp(22px, 5.2vw, 30px) !important;
  }
  body.user-jerry .date-label {
    font-size: 14px !important;
  }
  body.user-jerry .appt-inner {
    padding: 20px 18px 20px 44px !important;
  }
  body.user-jerry .appt-card {
    margin-bottom: 18px !important;
  }
  body.user-jerry .appt-body {
    gap: 14px !important;
    margin: 10px 0 14px !important;
  }
  body.user-jerry .appt-footer {
    gap: 12px !important;
  }
  body.user-jerry .appointments,
  body.user-jerry .route-panel {
    padding: 20px !important;
    gap: 16px !important;
  }
  body.user-jerry .day-blocked-banner {
    font-size: 18px !important;
    padding: 14px 16px !important;
  }
  body.user-jerry .modal-title {
    font-size: clamp(22px, 4.5vw, 28px) !important;
  }
  body.user-jerry .complete-row,
  body.user-jerry .service-date-row,
  body.user-jerry .review-toggle {
    font-size: 17px !important;
  }
  body.user-jerry .appt-time .slot-daypart-hint {
    font-size: clamp(20px, 5vw, 28px) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }
  body.user-jerry .appt-time .ghl-cal-time-hint {
    font-size: clamp(16px, 3.9vw, 21px) !important;
    font-weight: 500 !important;
    margin-left: 0 !important;
    color: var(--ink-muted) !important;
    line-height: 1.3 !important;
  }

  body.user-jerry .btn-add,
  body.user-jerry .btn-dagopgave,
  body.user-jerry .btn-save,
  body.user-jerry .btn-cancel,
  body.user-jerry .btn-done,
  body.user-jerry .btn-prijs,
  body.user-jerry .btn-optimize,
  body.user-jerry .btn-confirm-route,
  body.user-jerry .btn-unlock-route,
  body.user-jerry .btn-maps,
  body.user-jerry .btn-morning,
  body.user-jerry .btn-logout,
  body.user-jerry .btn-confirm,
  body.user-jerry .mobile-tab {
    font-size: clamp(16px, 3.8vw, 20px) !important;
    min-height: 56px !important;
    padding: 12px 16px !important;
  }
  body.user-jerry .planner-app-icon-btn {
    min-width: 60px !important;
    min-height: 60px !important;
    width: 60px !important;
    height: 60px !important;
    font-size: 26px !important;
  }
  body.user-jerry .appointments-header-actions .appointments-header-util .btn-dagopgave,
  body.user-jerry .appointments-header-actions .appointments-header-util .planner-app-icon-btn.btn-day-block {
    width: var(--appts-header-util-size) !important;
    height: var(--appts-header-util-size) !important;
    min-width: var(--appts-header-util-size) !important;
    min-height: var(--appts-header-util-size) !important;
    font-size: 22px !important;
  }
  body.user-jerry .appointments-header-actions > .btn-add {
    min-height: var(--appts-header-cta-height) !important;
    height: var(--appts-header-cta-height) !important;
    font-size: 17px !important;
  }
  body.user-jerry .planner-desktop-search {
    display: none !important;
  }
  body.user-jerry .icon-btn {
    min-width: 56px !important;
    min-height: 56px !important;
    width: 56px !important;
    height: 56px !important;
    font-size: 20px !important;
  }
  body.user-jerry .appt-actions .icon-btn.appt-action-icon {
    width: var(--appt-action-icon-size) !important;
    min-width: var(--appt-action-icon-size) !important;
    max-width: var(--appt-action-icon-size) !important;
    height: var(--appt-action-icon-size) !important;
    min-height: unset !important;
    padding: 0 !important;
    font-size: 24px !important;
  }
  body.user-jerry .appt-footer-cta-row .btn-prijs,
  body.user-jerry .appt-footer-cta-row .btn-done {
    min-height: 52px !important;
    padding: 10px 14px !important;
    font-size: 18px !important;
  }
  body.user-jerry .icon-btn.edit-action {
    min-width: 100px !important;
    min-height: 56px !important;
    height: 56px !important;
    font-size: 15px !important;
  }
  body.user-jerry .date-nav button {
    min-width: 56px !important;
    min-height: 58px !important;
    font-size: 22px !important;
  }
  body.user-jerry .hamburger-btn {
    width: 54px !important;
    height: 54px !important;
    font-size: 24px !important;
  }

  body.user-jerry .form-label {
    font-size: 14px !important;
  }
  body.user-jerry .form-input,
  body.user-jerry .form-select,
  body.user-jerry textarea.form-input {
    font-size: 18px !important;
    padding: 14px 16px !important;
    min-height: 56px !important;
  }
  body.user-jerry textarea.form-input {
    min-height: 120px !important;
  }
  body.user-jerry .modal-actions > button,
  body.user-jerry .modal-actions > a {
    min-height: 58px !important;
    font-size: 18px !important;
  }

  /*
   * Jerry: prijs / “Bevestig klaar” paneel (= .complete-bar in de kaart, geen aparte modal-overlay).
   */
  body.user-jerry .complete-bar {
    padding: 18px 14px 18px 38px !important;
    gap: 14px !important;
  }
  body.user-jerry .complete-bar .complete-row {
    gap: 12px !important;
  }
  body.user-jerry .complete-bar .review-toggle {
    font-size: 19px !important;
    line-height: 1.35 !important;
    gap: 14px !important;
    color: var(--ink) !important;
  }
  body.user-jerry .complete-bar .toggle {
    width: 54px !important;
    height: 32px !important;
    border-radius: 16px !important;
  }
  body.user-jerry .complete-bar .toggle::after {
    width: 26px !important;
    height: 26px !important;
    top: 2px !important;
    left: 2px !important;
  }
  body.user-jerry .complete-bar .toggle.on::after {
    left: 26px !important;
  }
  /* Laatste onderhoud: groot tikvlak (native <input type="date">; iOS-picker zelf niet style-baar) */
  body.user-jerry .complete-bar .service-date-row--last-maint {
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    padding: 14px 12px !important;
    margin: 6px 0 4px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    font-size: 20px !important;
    color: var(--ink) !important;
  }
  body.user-jerry .complete-bar .complete-footer-left .service-date-row--last-maint {
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
  }
  body.user-jerry .complete-bar .complete-footer-left .service-date-row--last-maint label {
    font-size: 16px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
  body.user-jerry .complete-bar .complete-footer-left .service-date-row--last-maint input[type='date'] {
    width: auto !important;
    max-width: none !important;
    min-height: 44px !important;
    font-size: 16px !important;
    padding: 8px 10px !important;
  }
  body.user-jerry .complete-bar .service-date-row--last-maint label {
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    color: var(--ink) !important;
  }
  body.user-jerry .complete-bar .service-date-row--last-maint input[type='date'] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 64px !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.18) !important;
    background: var(--surface3) !important;
    color: var(--text) !important;
    touch-action: manipulation !important;
  }
  body.user-jerry .complete-bar .service-date-row--last-maint input[type='date']::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
    padding: 14px;
    margin: -8px -6px -8px 4px;
    transform: scale(1.35);
    transform-origin: center right;
  }
  body.user-jerry .complete-bar .price-section {
    gap: 10px !important;
    padding-top: 14px !important;
    margin-top: 8px !important;
  }
  body.user-jerry .complete-bar .price-section-label {
    font-size: 15px !important;
    letter-spacing: 0.07em !important;
    margin-bottom: 10px !important;
    line-height: 1.35 !important;
  }
  body.user-jerry .complete-bar .price-section-label span {
    font-size: 15px !important;
    font-weight: 500 !important;
  }
  body.user-jerry .complete-bar .extra-item {
    font-size: 18px !important;
    padding: 10px 0 !important;
    min-height: 54px !important;
  }
  body.user-jerry .complete-bar .extra-item > .form-input {
    font-size: 18px !important;
    min-height: 54px !important;
    padding: 12px 14px !important;
  }
  body.user-jerry .complete-bar .extra-item .price-input {
    width: 112px !important;
    min-width: 100px !important;
  }
  body.user-jerry .complete-bar .extra-item .extra-remove {
    font-size: 20px !important;
    padding: 4px 10px !important;
  }
  body.user-jerry .complete-bar .extra-item > div span {
    font-size: 17px !important;
    color: var(--ink) !important;
  }
  body.user-jerry .complete-bar .add-extra-row {
    gap: 12px !important;
    margin-top: 12px !important;
  }
  body.user-jerry .complete-bar .add-extra-row .form-input {
    height: auto !important;
    min-height: 56px !important;
    font-size: 18px !important;
    padding: 14px 16px !important;
  }
  body.user-jerry .complete-bar .add-extra-row .price-input {
    width: 108px !important;
    flex-shrink: 0 !important;
  }
  body.user-jerry .complete-bar .btn-add-extra {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    font-size: 28px !important;
    border-radius: 12px !important;
  }
  body.user-jerry .complete-bar .form-input::placeholder {
    font-size: 17px !important;
    opacity: 0.8;
  }
  body.user-jerry .complete-bar .price-total-row {
    font-size: 20px !important;
    padding-top: 14px !important;
    margin-top: 12px !important;
    gap: 12px;
  }
  body.user-jerry .complete-bar .price-total-row span:last-child {
    font-size: clamp(24px, 6vw, 36px) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
  }
  body.user-jerry .complete-bar .btn-cancel,
  body.user-jerry .complete-bar .btn-invoice-retry,
  body.user-jerry .complete-bar .btn-confirm {
    min-height: 60px !important;
    padding: 14px 22px !important;
    font-size: 20px !important;
    border-radius: 12px !important;
  }
  body.user-jerry .complete-bar .catalog-v1-results {
    max-height: 240px !important;
    border-radius: 10px !important;
  }
  body.user-jerry .complete-bar .catalog-v1-result {
    font-size: 18px !important;
    min-height: 56px !important;
    padding: 16px 14px !important;
    gap: 10px !important;
  }
  body.user-jerry .complete-bar .catalog-v1-empty {
    font-size: 17px !important;
    padding: 14px 12px !important;
  }
  body.user-jerry .complete-bar .catalog-v1-line {
    font-size: 17px !important;
    margin-top: 8px !important;
    gap: 10px !important;
  }
  body.user-jerry .complete-bar .catalog-v1-line button {
    font-size: 17px !important;
    min-height: 48px !important;
    padding: 8px 10px !important;
  }

  @media (min-width: 1180px) {
    body.user-jerry .date-label {
      font-size: 15px !important;
    }
    body.user-jerry .appt-address {
      font-size: clamp(24px, 2.2vw, 36px) !important;
    }
    body.user-jerry .appt-name {
      font-size: clamp(19px, 1.6vw, 26px) !important;
    }
    body.user-jerry .appt-time {
      font-size: clamp(20px, 1.9vw, 26px) !important;
      column-gap: 12px !important;
    }
    body.user-jerry .appt-time .time-window-badge {
      font-size: clamp(15px, 1.35vw, 19px) !important;
      padding: 5px 10px !important;
    }
    body.user-jerry .appt-time .slot-daypart-hint {
      font-size: clamp(18px, 1.75vw, 24px) !important;
    }
    body.user-jerry .appt-time .ghl-cal-time-hint {
      font-size: clamp(14px, 1.35vw, 18px) !important;
    }
    body.user-jerry .btn-add,
    body.user-jerry .btn-dagopgave,
    body.user-jerry .btn-save,
    body.user-jerry .btn-cancel,
    body.user-jerry .btn-done,
    body.user-jerry .btn-prijs,
    body.user-jerry .btn-optimize,
    body.user-jerry .btn-confirm-route,
    body.user-jerry .btn-unlock-route,
    body.user-jerry .btn-maps,
    body.user-jerry .btn-morning,
    body.user-jerry .btn-logout,
    body.user-jerry .btn-confirm {
      font-size: 16px !important;
      min-height: 50px !important;
    }
    body.user-jerry .planner-app-icon-btn {
      min-width: 54px !important;
      min-height: 54px !important;
      width: 54px !important;
      height: 54px !important;
    }
    body.user-jerry .complete-bar {
      padding: 16px 16px 16px 36px !important;
    }
    body.user-jerry .complete-bar .review-toggle {
      font-size: 17px !important;
    }
    body.user-jerry .complete-bar .btn-cancel,
    body.user-jerry .complete-bar .btn-invoice-retry,
    body.user-jerry .complete-bar .btn-confirm {
      min-height: 52px !important;
      font-size: 18px !important;
      padding: 12px 18px !important;
    }
    body.user-jerry .complete-bar .extra-item > .form-input,
    body.user-jerry .complete-bar .add-extra-row .form-input {
      font-size: 17px !important;
      min-height: 50px !important;
    }
    body.user-jerry .complete-bar .price-total-row span:last-child {
      font-size: clamp(22px, 2.4vw, 30px) !important;
    }
    body.user-jerry .complete-bar .service-date-row--last-maint {
      padding: 12px 10px !important;
    }
    body.user-jerry .complete-bar .service-date-row--last-maint label {
      font-size: 18px !important;
    }
    body.user-jerry .complete-bar .service-date-row--last-maint input[type='date'] {
      min-height: 56px !important;
      font-size: 19px !important;
      padding: 12px 14px !important;
    }
    body.user-jerry .complete-bar .complete-footer-left .service-date-row--last-maint input[type='date'] {
      width: auto !important;
      max-width: none !important;
      min-height: 44px !important;
      font-size: 16px !important;
      padding: 8px 10px !important;
    }
  }

  /* Telefoon (≤639px): onderaan zodat Jerry/ui-scale de footer-breedte niet terugzet naar `width:auto`. */
  @media (max-width: 639px) {
    .appt-card .appt-footer {
      flex-direction: column !important;
      align-items: stretch !important;
      flex-wrap: nowrap !important;
    }
    .appt-card .appt-footer-right {
      width: 100% !important;
      max-width: none !important;
      align-items: flex-end !important;
    }
    .appt-card .appt-footer-actions-touch {
      width: 100% !important;
      max-width: 260px !important;
      margin-left: auto !important;
    }
    .appt-card .appt-footer-cta-row {
      width: 100% !important;
      max-width: 260px !important;
      margin-left: auto !important;
    }
    .appt-card .appt-actions__icons {
      display: none !important;
    }
    .appt-card .appt-actions__mobile {
      display: block !important;
    }
  }

  /* Warm Minimal polish pass (visual only, no logic changes) */
  :root {
    --wm-gap-1: 8px;
    --wm-gap-2: 12px;
    --wm-gap-3: 16px;
    --wm-gap-4: 20px;
    --wm-gap-5: 28px;
    --wm-radius-sm: 8px;
    --wm-radius-md: 10px;
    --wm-radius-lg: 12px;
    --wm-radius-xl: 14px;
  }

  header {
    min-height: 58px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .planner-header-brand-row {
    gap: var(--wm-gap-2);
  }
  .planner-brand-logo {
    height: 32px;
    max-width: min(210px, 48vw);
  }
  .date-nav-wrap {
    gap: var(--wm-gap-2);
  }
  .date-nav {
    border-radius: var(--wm-radius-md);
    overflow: visible;
  }
  .date-nav button {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 16px;
  }
  .date-label {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 13px;
    letter-spacing: -0.01em;
  }
  .header-stats {
    gap: var(--wm-gap-1);
  }
  .stat {
    border-radius: var(--wm-radius-lg);
    padding: 9px 11px;
  }
  .stat-val {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
  }
  .stat-label {
    margin-top: 3px;
    font-size: 10.5px;
    letter-spacing: 0.04em;
  }

  .layout {
    gap: 0;
  }
  .appointments {
    padding: var(--wm-gap-5);
  }
  .appointments-header {
    margin-bottom: var(--wm-gap-4);
    gap: var(--wm-gap-2);
  }
  .appointments-header-actions {
    gap: var(--wm-gap-2);
  }
  .appointments-header-util {
    gap: 8px;
  }
  .appointments-header-util .btn-dagopgave,
  .appointments-header-util .planner-app-icon-btn.btn-day-block {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--wm-radius-md);
  }
  .appointments-header-actions .btn-add {
    height: 44px;
    min-height: 44px;
    border-radius: var(--wm-radius-md);
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
  }

  .planning-section {
    margin-bottom: 22px;
  }
  .planning-section-title {
    margin-bottom: 12px;
    padding-bottom: 8px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }
  #apptList .empty-hint {
    border: 1px solid var(--border);
    border-radius: var(--wm-radius-lg);
    background: #fff;
    color: #645c52;
    padding: 14px 16px;
  }

  .appt-card {
    border-radius: var(--wm-radius-xl);
    margin-bottom: var(--wm-gap-3);
  }
  .appt-inner {
    padding: 16px 16px 14px 38px;
    gap: var(--wm-gap-2);
  }
  .appt-number {
    top: 10px;
    left: 10px;
    font-size: 13px;
    letter-spacing: 0;
    font-weight: 600;
  }
  .appt-top {
    margin-bottom: 2px;
    gap: var(--wm-gap-2);
  }
  .appt-time {
    font-size: 12px;
    font-weight: 600;
  }
  .slot-daypart-hint,
  .ghl-cal-time-hint {
    font-size: 12px;
    font-weight: 500;
    color: #8e867c;
  }
  .appt-body {
    margin: 4px 0 10px;
    gap: 8px;
  }
  .appt-address {
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    font-weight: 600;
  }
  .appt-name {
    font-size: 13px;
    line-height: 1.4;
    color: #645c52;
  }
  .appt-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: #8e867c;
  }
  .appt-meta {
    margin: 8px 0 0;
    gap: 8px;
  }
  .meta-item {
    border-radius: var(--wm-radius-sm);
    border: 1px solid var(--border);
    background: #fdfbf8;
  }
  body:not(.user-jerry) .appt-meta .meta-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 5px 10px 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  }
  body:not(.user-jerry) .appt-meta .meta-pill-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8e867c;
    line-height: 1.2;
  }
  body:not(.user-jerry) .appt-meta .meta-pill-value {
    font-size: 11px;
    font-weight: 600;
    color: #645c52;
    line-height: 1.25;
  }
  .appt-notes {
    margin-top: 8px;
    border-radius: var(--wm-radius-sm);
    background: #f9f5ee;
    color: #645c52;
  }
  .appt-footer {
    margin-top: 10px;
    gap: var(--wm-gap-2);
  }
  .appt-tags {
    gap: 8px;
  }
  .tag {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .appt-price {
    font-size: 17px;
    line-height: 1.2;
  }
  .appt-footer-cta-row {
    gap: 8px;
  }
  .appt-footer-cta-row .btn-prijs,
  .appt-footer-cta-row .btn-done {
    min-height: 34px;
    border-radius: var(--wm-radius-sm);
    font-size: 11.5px;
    padding: 6px 9px;
  }
  .complete-bar {
    border-top: 1px solid var(--border);
    background: #fcfaf6;
    padding: 14px 16px 16px;
  }

  /* WM layout v2: afspraakkaart (niet-Jerry; Jerry op veld-tablets via body.ipad-field-vp) */
    body:not(.user-jerry) .appt-card--layout-v2,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 {
    border-radius: var(--wm-radius-md);
    margin-bottom: var(--wm-gap-3);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-actions-mobile,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-actions-mobile {
    position: relative;
    z-index: 4;
  }
    body:not(.user-jerry) .appt-card--layout-v2:hover,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2:hover {
    transform: none;
    border-color: rgba(142, 134, 124, 0.38);
    box-shadow: 0 6px 20px rgba(36, 32, 28, 0.06);
  }
    body:not(.user-jerry) .appt-card--layout-v2.done::after,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2.done::after {
    display: none;
  }
    body:not(.user-jerry) .appt-card--layout-v2.appt-card--todo,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2.appt-card--todo {
    border-left: 3px solid rgba(142, 134, 124, 0.35);
  }
    body:not(.user-jerry) .appt-card--layout-v2.done,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2.done {
    border-left: 3px solid rgba(16, 185, 129, 0.55);
    opacity: 1;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-inner--wm,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-inner--wm {
    padding: 16px 18px 16px 16px;
    gap: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-layout,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-layout {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-num,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-num {
    position: static;
    padding-top: 2px;
    font-size: 15px;
    font-weight: 700;
    color: rgba(100, 92, 82, 0.45);
    text-align: center;
    line-height: 1.2;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-main,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-header,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-head-text,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-head-text {
    flex: 1;
    min-width: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-address,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-address {
    font-size: clamp(14px, 1.4vw, 16px);
    font-weight: 700;
    color: #3d3833;
    line-height: 1.3;
    letter-spacing: -0.02em;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-customer,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-customer {
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 500;
    color: #8e867c;
    line-height: 1.35;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .route-pin-badge,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .route-pin-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-head-aside,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-head-aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-price,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-price {
    font-size: 17px;
    font-weight: 700;
    color: #645c52;
    letter-spacing: -0.02em;
  }
    body:not(.user-jerry) .appt-card--layout-v2.done .appt-wm-price,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2.done .appt-wm-price {
    color: rgba(100, 92, 82, 0.65);
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-desc,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-desc {
    font-size: 12.5px;
    line-height: 1.45;
    color: #8e867c;
    margin-top: 4px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-meta,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-meta {
    margin-top: 4px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-notes,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-notes {
    margin-top: 6px;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-rule,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-rule {
    height: 1px;
    background: var(--border);
    margin: 10px 0 4px;
    border: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-footer,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 0;
    border-top: none;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-footer-left,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-footer-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-footer-right,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-footer-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-cta-wrap,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-cta-wrap {
    width: auto;
    max-width: none;
    margin-left: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-cta-row,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-cta-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    width: auto;
    max-width: none;
    margin-left: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn-ic,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn-ic {
    flex-shrink: 0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn--onderweg-actie,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--onderweg-actie {
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--wm-radius-sm);
    border: 1px solid var(--border);
    background: #ffffff;
    color: #645c52;
    box-shadow: none;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn--onderweg-actie:hover,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--onderweg-actie:hover {
    color: var(--text);
    border-color: #d9d2c5;
    background: #fdfbf8;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn--klaar,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--klaar {
    min-height: 36px;
    padding: 0 12px;
    border-radius: var(--wm-radius-sm);
    border: 1px solid rgba(16, 185, 129, 0.55);
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-btn--klaar:hover,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--klaar:hover {
    background: rgba(16, 185, 129, 0.16);
  }
    body:not(.user-jerry) .appt-card--layout-v2.done .appt-wm-btn--prijs,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2.done .appt-wm-btn--prijs {
    border-color: rgba(16, 185, 129, 0.42);
    background: rgba(255, 255, 255, 0.65);
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.3;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill-ic,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill-ic {
    flex-shrink: 0;
    opacity: 0.85;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--type,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--type {
    background: rgba(142, 134, 124, 0.12);
    border: 1px solid rgba(142, 134, 124, 0.2);
    color: #645c52;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--garantie,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--garantie {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: #1d4ed8;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--eta-sent,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--eta-sent {
    background: rgba(63, 125, 74, 0.14);
    color: var(--hk-good, #3f7d4a);
    border: 1px solid rgba(63, 125, 74, 0.35);
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--slot,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--slot {
    background: rgba(160, 160, 160, 0.12);
    border: 1px solid rgba(160, 160, 160, 0.3);
    color: #b0b0b0;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--onderweg,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--onderweg {
    background: rgba(251, 191, 36, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #b45309;
  }
    /* Put last after a booking, no calculated time yet (docs/specs/nieuwe-boeking-in-route.md). */
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--no-time,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--no-time {
    background: #fff;
    border: 1px dashed rgba(245, 158, 11, 0.7);
    color: #b45309;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--klaar,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--klaar {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #047857;
  }
    /* Completed and billable, but no Moneybird invoice linked. */
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--niet-gefactureerd,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--niet-gefactureerd {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.6);
    color: #b45309;
    font-weight: 600;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--moneybird,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--moneybird,
    body:not(.user-jerry) .appt-card--layout-v2 a.appt-wm-pill--moneybird,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 a.appt-wm-pill--moneybird {
    background: rgba(142, 134, 124, 0.08);
    border: 1px solid rgba(142, 134, 124, 0.22);
    color: #8e867c;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
  }
    body:not(.user-jerry) .appt-card--layout-v2 a.appt-wm-pill--moneybird:hover,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 a.appt-wm-pill--moneybird:hover {
    border-color: rgba(142, 134, 124, 0.35);
    color: #645c52;
    background: rgba(142, 134, 124, 0.12);
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-pill--moneybird--text,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--moneybird--text {
    cursor: default;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-actions-slot,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-actions-slot {
    margin: 0;
    overflow: visible;
  }
    body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-menu-btn,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-menu-btn {
    border-radius: var(--wm-radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border);
  }
  @media (min-width: 640px) {
        body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-actions-mobile,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-actions-mobile {
      display: block !important;
    }
  }
  @media (max-width: 1179px) {
        body:not(.user-jerry) .appt-card--layout-v2,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 {
      display: block !important;
    }
        body:not(.user-jerry) .appt-card--layout-v2 > .complete-bar,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 > .complete-bar {
      grid-column: auto !important;
      grid-row: auto !important;
    }
  }
  @media (max-width: 639px) {
        body:not(.user-jerry) .appt-card--layout-v2 .appt-footer-actions-touch,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-footer-actions-touch,
        body:not(.user-jerry) .appt-card--layout-v2 .appt-footer-cta-row,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-footer-cta-row {
      max-width: none !important;
      width: 100% !important;
      margin-left: 0 !important;
    }
        body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-footer,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-footer {
      flex-direction: column;
      align-items: stretch;
    }
        body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-footer-right,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-footer-right {
      margin-left: 0;
      width: 100%;
    }
        body:not(.user-jerry) .appt-card--layout-v2 .appt-wm-cta-row,
        body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-cta-row {
      justify-content: flex-end;
      flex-wrap: wrap;
    }
  }

  .planner-week-nav {
    border-radius: var(--wm-radius-lg);
    margin-top: 6px;
  }
  .planner-week-nav-row {
    gap: 8px;
  }
  .planner-week-strip {
    padding: 6px;
    gap: 6px;
  }
  .planner-week-day {
    border-radius: var(--wm-radius-md);
    min-width: 54px;
    padding: 9px 8px 10px;
    font-size: 11px;
  }
  .planner-week-day .planner-week-day-num {
    font-size: 13px;
    margin-top: 2px;
  }
  .planner-week-day.is-active {
    box-shadow: none;
  }
  .planner-week-edge,
  .planner-week-icon-btn {
    border-radius: var(--wm-radius-md);
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .route-panel {
    padding: var(--wm-gap-4);
  }
  .route-status-card,
  .route-toolbar--card,
  .route-panel-footer {
    border-radius: var(--wm-radius-lg);
  }
  .route-status-card {
    padding: 14px 14px 12px;
  }
  .route-status-kicker {
    color: #8e867c;
  }
  .route-status-text {
    color: #645c52;
  }
  .route-list {
    gap: 10px;
  }
  .route-item {
    border-radius: var(--wm-radius-md);
    border: 1px solid var(--border);
    background: #fff;
  }

  .mobile-menu-panel {
    background: #fdfbf8;
    border-radius: 0 12px 12px 0;
    border: 1px solid var(--border);
    border-left: none;
    box-shadow: 4px 0 28px rgba(26, 21, 18, 0.07);
  }
  .mobile-menu-panel .section-title,
  .mobile-menu-title {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8e867c;
    margin-bottom: 6px;
  }
  .mobile-tab {
    border-radius: var(--wm-radius-md);
  }

  @media (max-width: 1179px) {
    .appointments {
      padding: 18px 14px 20px;
    }
    .appt-inner {
      padding: 14px 12px 12px 34px;
    }
    .route-panel {
      padding: 14px 12px 18px;
    }
  }

  @media (max-width: 639px) {
    header {
      min-height: 52px;
      padding-top: 6px;
      padding-bottom: 6px;
    }
    .planner-brand-logo {
      height: 28px;
      max-width: 46vw;
    }
    .header-stats {
      gap: 6px;
    }
    .stat {
      min-width: 72px;
      padding: 7px 8px;
    }
    .stat-val {
      font-size: 13px;
    }
    .stat-label {
      font-size: 9px;
    }
    .appointments {
      padding: 14px 10px 16px;
    }
    .appointments-header {
      margin-bottom: 12px;
    }
    .appointments-header-actions .btn-add {
      height: 40px;
      min-height: 40px;
      font-size: 12px;
    }
    .appt-card {
      margin-bottom: 12px;
      border-radius: 12px;
    }
    .appt-inner {
      padding: 12px 10px 10px 30px;
    }
    .appt-address {
      font-size: 14px;
    }
    .appt-desc {
      font-size: 12px;
    }
    .planner-week-day {
      min-width: 50px;
      padding: 8px 6px 9px;
    }
  }

  /* Warm Minimal theme override */
  :root {
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bg: #faf8f4;
    --surface: #ffffff;
    --surface2: #ffffff;
    --surface3: #f5f1ea;
    --border: #eae5dc;
    --accent: #dc4a1a;
    --accent2: #0f7a4b;
    --blue: #645c52;
    --text: #1a1512;
    --muted: #8e867c;
    --yellow: #a66a00;
    --reparatie: #a02f08;
    --onderhoud: #0f7a4b;
    --installatie: #a66a00;
    --herafspraak: #5b21b6;
    --klaar-bg: #e5f4ec;
    --klaar-border: #cde8d8;
    --appt-action-icon-bg: #ffffff;
    --appt-action-icon-bg-hover: #f8f4ed;
    --appt-action-icon-bg-active: #f0ebe2;
    --appt-action-icon-border: #eae5dc;
    --appt-action-icon-border-hover: #d9d2c5;
    --appt-action-icon-fg: #645c52;
    --appt-action-icon-fg-hover: #1a1512;
  }

  body {
    background: var(--bg);
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.55;
  }
  header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
  }
  .layout {
    background: transparent;
  }
  .appointments {
    background: transparent;
    padding: 28px;
    border-bottom: none;
  }
  #apptList {
    display: block;
    min-height: 24px;
    visibility: visible;
    opacity: 1;
  }
  .planning-section {
    display: block;
    margin-bottom: 24px;
  }
  .planning-section-title {
    color: #645c52;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    padding-bottom: 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
  }
  .route-panel {
    background: #ffffff;
    border-left: 1px solid var(--border);
  }
  .section-title,
  .stat-label,
  .route-status-kicker {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
  }
  .route-status-title {
    font-size: 21px;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--text);
  }
  .date-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
  }
  .date-nav,
  .planner-week-nav {
    background: #ffffff;
    border: 1px solid var(--border);
  }
  .date-nav button,
  .planner-week-edge,
  .planner-week-icon-btn {
    color: var(--ink-soft, #645c52);
  }
  .date-nav button:hover,
  .planner-week-edge:hover,
  .planner-week-icon-btn:hover {
    color: var(--text);
  }
  .stat {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 86px;
  }
  .stat-val {
    color: var(--text);
    letter-spacing: -0.01em;
  }
  .stat-val.green,
  .stat-val.orange {
    color: var(--text);
  }
  .btn-logout,
  .icon-btn,
  .btn-prijs,
  .btn-done,
  .btn-cancel,
  .planner-app-icon-btn,
  .btn-dagopgave {
    background: #ffffff;
    border: 1px solid var(--border);
    color: #645c52;
    box-shadow: none;
  }
  .btn-add,
  .btn-confirm,
  .btn-save,
  .btn-confirm-route {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: #fff;
    box-shadow: none;
  }
  .btn-add:hover,
  .btn-confirm:hover,
  .btn-save:hover,
  .btn-confirm-route:hover {
    opacity: 0.92;
  }
  .appointments-header-actions .btn-add .btn-add-accent {
    color: #fff;
  }
  .appt-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
    padding: 0;
    display: block;
    position: relative;
    overflow: hidden;
    visibility: visible;
    opacity: 1;
  }
  .appt-card:hover {
    border-color: #d9d2c5;
    transform: none;
  }
  .appt-inner {
    display: block;
    padding: 16px 16px 16px 36px;
  }
  .appt-top,
  .appt-body,
  .appt-meta,
  .appt-notes,
  .appt-footer,
  .appt-footer-left,
  .appt-footer-right,
  .appt-tags {
    opacity: 1;
    visibility: visible;
  }
  .appt-number {
    color: #8e867c;
  }
  .appt-address,
  .appt-name,
  .appt-desc,
  .appt-time,
  .appt-price,
  .appt-phone {
    color: var(--text);
  }
  .appt-desc,
  .ghl-cal-time-hint,
  .meta-label,
  .meta-value,
  .empty-hint,
  .slot-daypart-hint {
    color: #645c52;
  }
  .appt-actions .icon-btn.appt-action-icon,
  .appt-actions a.icon-btn.appt-action-icon,
  .btn-prijs,
  .btn-done {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .appt-price {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .tag.reparatie {
    background: #fbe9dd;
    color: #a02f08;
    border: 1px solid #f3d7c4;
  }
  .tag.onderhoud {
    background: #e5f4ec;
    color: #0f7a4b;
    border: 1px solid #cde8d8;
  }
  .tag.installatie {
    background: #fbf0d4;
    color: #a66a00;
    border: 1px solid #f0dfb1;
  }
  .tag.herafspraak {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
  }
  .planner-week-day {
    background: #ffffff;
    border: 1px solid var(--border);
    color: #645c52;
  }
  .planner-week-day.is-active {
    background: #1a1512;
    border-color: #1a1512;
    color: #ffffff;
  }
  .planner-week-day.is-active .planner-week-day-num {
    color: #ffffff;
  }
  .mobile-tab.active {
    background: #fbe9dd;
    color: #a02f08;
    border-color: #f3d7c4;
    font-weight: 600;
  }
  .route-status-card,
  .route-toolbar--card,
  .route-panel-footer,
  .total-bar {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: none;
  }
  /* Reference-match refinement (foto 1) */
  .planner-sidebar {
    display: none;
  }
  .planner-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 14px;
    border-bottom: 1px solid var(--border);
  }
  .planner-sidebar-caption {
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }
  .planner-sidebar-nav {
    display: grid;
    gap: 2px;
    padding: 14px 10px;
  }
  .planner-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 7px;
    color: var(--ink-soft);
    text-decoration: none;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
  }
  .planner-sidebar-item:hover {
    background: var(--bg-page);
    border-color: var(--border);
  }
  .planner-sidebar-item.is-active {
    background: var(--accent-soft);
    color: var(--accent-ink);
    border-color: var(--accent-soft);
    font-weight: 600;
  }
  .planner-sidebar-item-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  .planner-sidebar-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ink-muted);
    flex-shrink: 0;
  }
  .planner-sidebar-item.is-active .planner-sidebar-dot {
    background: var(--accent);
  }
  @media (max-width: 1024px) {
    .planner-sidebar-item[data-sidebar-view="analytics"],
    .planner-sidebar-item[data-sidebar-view="prices"],
    .planner-sidebar-item[data-products-category] {
      display: none !important;
    }
  }
  .planner-sidebar-count {
    font-size: 11px;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }
  .planner-sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .planner-sidebar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--ink-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
  }
  .planner-sidebar-user {
    color: var(--ink);
    font-size: 12.5px;
    font-weight: 500;
  }
  .appointments {
    padding: 0;
    background: var(--bg-page);
    overflow-y: auto;
  }
  .today-page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .today-page-heading h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
  }
  .today-page-heading p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--ink-muted);
  }
  .today-btn {
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--ink-soft);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 500;
  }
  .today-btn--primary {
    background: var(--ink);
    color: var(--bg-card);
    border-color: var(--ink);
  }
  .today-btn--dark {
    background: var(--ink);
    color: var(--bg-card);
    border-color: var(--ink);
  }
  .planner-desktop-search {
    display: none;
    width: clamp(220px, 22vw, 320px);
    min-width: 0;
  }
  .today-week-strip-wrap {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .planner-week-strip {
    flex: 1;
    padding: 0;
    gap: 4px;
    background: transparent;
    border: none;
  }
  .planner-week-edge {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--ink-soft);
  }
  .planner-week-day {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    color: var(--ink);
    font-size: 10.5px;
    cursor: pointer;
  }
  .planner-week-day .planner-week-day-num {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
  }
  .planner-week-day.is-active {
    background: var(--ink);
    color: var(--bg-card);
    box-shadow: none;
  }
  .today-kpi-grid {
    padding: 16px 28px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .today-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .today-kpi-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
  }
  .today-kpi-value {
    margin-top: 4px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .today-kpi-sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--ink-soft);
  }
  #apptList {
    padding: 6px 28px 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .planning-section-title {
    margin: 0;
    padding: 12px 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .planning-section + .planning-section .planning-section-title {
    padding-top: 18px;
  }
  .appt-card {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
  }
  .planner-desktop-search-banner {
    font-size: 12px;
    color: var(--ink-muted);
    margin-bottom: 10px;
    line-height: 1.45;
  }
  @media (max-width: 1179px) {
    .planner-desktop-remote-results {
      display: none !important;
    }
  }
  body.user-jerry .planner-desktop-remote-results {
    display: none !important;
  }
  .planner-desktop-remote-results-inner {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
  }
  .planner-desktop-remote-hit-list {
    max-height: min(280px, 38vh);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .planner-desktop-remote-hit {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
  }
  .planner-desktop-remote-hit:hover {
    border-color: rgba(255, 107, 53, 0.45);
  }
  .planner-desktop-remote-hit__date {
    flex: 0 0 118px;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    line-height: 1.35;
  }
  .planner-desktop-remote-hit__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .planner-desktop-remote-hit__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
  }
  .planner-desktop-remote-hit__addr {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.35;
    word-break: break-word;
  }
  .planner-desktop-remote-hit__sub {
    font-size: 11px;
    color: var(--ink-muted);
    line-height: 1.35;
  }
  .planner-desktop-remote-hit__hint {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent);
    align-self: center;
  }
  .planning-section .appt-card:last-child {
    margin-bottom: 0;
  }
  .appt-inner {
    padding: 18px 22px;
    display: block;
  }
  .appt-number {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .appt-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }
  .appt-top .appt-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .slot-daypart-hint,
  .ghl-cal-time-hint {
    font-size: 10.5px;
    color: var(--ink-muted);
  }
  .appt-address {
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .appt-name, .appt-phone {
    font-size: 13.5px;
    color: var(--ink-soft);
  }
  .appt-desc, .appt-notes {
    font-size: 13px;
    color: var(--ink-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .appt-phone {
    font-size: 12.5px;
    color: var(--ink-muted);
  }
  .appt-actions {
    gap: 6px;
  }
  .appt-actions .icon-btn.appt-action-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--ink-soft);
    padding: 0;
  }
  .appt-actions .icon-btn.appt-action-icon .appt-action-svg {
    width: 16px;
    height: 16px;
  }
  .appt-actions .icon-btn.appt-action-icon .appt-action-svg path,
  .appt-actions .icon-btn.appt-action-icon .appt-action-svg circle {
    stroke-width: 1.6;
  }
  .appt-actions .icon-btn.appt-action-icon:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-ink);
  }
  .tag {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    padding: 2px 8px;
  }
  .tag.onderhoud { background: var(--green-soft); color: var(--green); }
  .tag.reparatie { background: var(--accent-soft); color: var(--accent-ink); }
  .tag.installatie { background: var(--yellow-soft); color: var(--yellow); }
  .tag.herafspraak { background: #ede9fe; color: #5b21b6; }
  .tag.garantie { background: var(--bg-page); color: var(--ink-soft); }
  .appt-price {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .appt-action-text-btn {
    min-width: 0;
    width: auto;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--ink-soft);
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 500;
  }
  .total-bar {
    display: none;
  }
  .route-demo-panel {
    padding: 0;
    background: var(--bg-page);
    gap: 0;
  }
  .routes-content-grid {
    padding: 18px 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
  }
  .routes-stops-card,
  .routes-map-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
  }
  .routes-stops-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  .routes-stops-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
  }
  .routes-stops-sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--ink-muted);
  }
  .routes-sticky-row {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--accent-soft);
  }
  .routes-stop-row {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
  }
  .routes-stop-row:hover {
    background: var(--bg-page);
  }
  .routes-stop-row.is-dragging {
    opacity: 0.7;
  }
  .routes-stop-handle {
    color: var(--ink-muted);
    font-size: 14px;
    cursor: grab;
    user-select: none;
  }
  .routes-stop-order {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--bg-page);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .routes-stop-time {
    width: 50px;
    font-size: 11.5px;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
  }
  .routes-stop-main {
    min-width: 0;
    flex: 1;
  }
  .routes-stop-name {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .routes-stop-address {
    font-size: 12px;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .routes-stop-chevron {
    font-size: 14px;
    color: var(--ink-muted);
    flex-shrink: 0;
  }
  .routes-daypart-divider {
    padding: 8px 16px;
    font-size: 11.5px;
    color: var(--ink-muted);
    font-style: italic;
  }
  .routes-map-card {
    overflow: hidden;
  }
  .routes-map-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    font-weight: 700;
  }
  #routeMap {
    height: 480px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin: 14px 16px;
  }
  .routes-summary {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
  }
  .routes-summary-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 6px;
  }
  .routes-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
  }
  .routes-summary-row:last-child {
    border-bottom: none;
  }
  .routes-summary-row span {
    font-size: 12.5px;
    color: var(--ink-soft);
  }
  .routes-summary-row strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .routes-actions-stack {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .routes-actions-stack .today-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    border-radius: 9px;
    font-weight: 600;
  }
  .routes-actions-stack .today-btn--ghost {
    background: var(--bg-card);
    color: var(--ink);
    border: 1px solid var(--border);
    font-weight: 500;
    padding: 11px;
  }
  .routes-actions-stack .today-btn--dark {
    background: var(--ink);
    color: var(--bg-card);
    border-color: var(--ink);
  }
  .routes-actions-stack .today-btn--primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
  }
  .routes-actions-stack .btn-maps,
  .routes-morning-auto {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    line-height: 1.35;
  }
  .routes-morning-auto__label {
    flex: 1;
    color: var(--text);
  }
  .routes-morning-auto__hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    cursor: help;
    flex-shrink: 0;
  }
  .routes-morning-sent-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--accent2);
    white-space: nowrap;
  }
  .routes-actions-stack .btn-morning,
  .routes-actions-stack .route-reset-link {
    width: 100%;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--ink);
    padding: 11px;
  }
  .panel-page {
    background: var(--bg-page);
    min-height: 100%;
  }
  .panel-page .today-page-header {
    border-bottom: 1px solid var(--border);
  }
  .panel-page-content {
    padding: 16px 28px 28px;
    display: grid;
    gap: 12px;
  }
  .panel-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 14px 16px;
  }
  .buslijst-week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 28px 4px;
    border-bottom: 1px solid var(--border);
  }
  .buslijst-week-label {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 0;
    text-align: center;
  }
  #panelBuslijst .panel-page-content {
    gap: 20px;
  }
  .buslijst-day {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 14px 16px 16px;
  }
  .buslijst-day-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
  }
  .buslijst-day-empty {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
  }
  .buslijst-group + .buslijst-group {
    margin-top: 12px;
  }
  .buslijst-group-title {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .buslijst-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 4px;
  }
  .buslijst-line {
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--surface2, #f8f9fb);
  }
  .buslijst-status {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
  }
  .buslijst-status--error {
    color: var(--reparatie, #a02f08);
  }
  /* ─── Klanten-pagina (Merge 2) ─────────────────────────────────────────── */
  #panelCustomers { position: relative; overflow: hidden; }
  .hk-customers-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    min-height: 50vh;
  }
  .hk-customers-status {
    margin: 8px 2px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.45;
  }
  .hk-customers-status--error { color: var(--reparatie); }
  .hk-customer-card {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 14px 16px;
    color: var(--text);
    transition: border-color .15s ease, background .15s ease;
  }
  .hk-customer-card:hover { border-color: var(--accent); background: var(--surface2); }
  .hk-customer-card-name { font-size: 16px; font-weight: 600; color: var(--text); }
  .hk-customer-card-address { font-size: 13px; color: var(--muted); margin-top: 2px; }
  .hk-customer-card-contact {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
  }
  .hk-customer-card-mb { color: var(--accent2); font-weight: 600; }
  .hk-customer-card-last { font-size: 12px; margin-top: 8px; color: var(--text); }
  .hk-customer-card-last--none { color: var(--muted); font-style: italic; }
  .hk-customer-card-last--legacy { color: var(--muted); }
  .hk-customer-card-legacy-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .3px;
    text-transform: uppercase;
    background: var(--surface3);
    color: var(--muted);
    border: 1px solid var(--border);
  }
  .hk-customer-detail {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 92%);
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -18px 0 40px rgba(0, 0, 0, .36);
    transform: translateX(102%);
    transition: transform .24s ease;
    display: flex;
    flex-direction: column;
    z-index: 6;
    overflow-y: auto;
    visibility: hidden;
  }
  .hk-customer-detail.is-open { transform: translateX(0); visibility: visible; }
  .hk-customer-detail-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
  }
  .hk-customer-detail-back {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 0;
  }
  .hk-customer-detail-back:hover { color: var(--text); }
  .hk-customer-detail-body { padding: 16px; }
  .hk-detail-section { margin-bottom: 18px; }
  .hk-detail-name { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
  .hk-detail-line { font-size: 13px; color: var(--muted); line-height: 1.5; }
  .hk-detail-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin: 0 0 10px;
  }
  .hk-detail-new-appt {
    width: 100%;
    margin: 4px 0 20px;
    padding: 10px 14px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
  }
  .hk-detail-new-appt:hover { filter: brightness(1.06); }
  .hk-appt {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--surface);
  }
  .hk-appt--legacy { background: var(--surface2); }
  .hk-appt--planned { border-color: var(--blue); }
  .hk-appt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .hk-appt-status { font-size: 14px; line-height: 1; }
  .hk-appt-date { font-weight: 600; color: var(--text); font-size: 13px; }
  .hk-appt-type { font-size: 12px; color: var(--muted); text-transform: capitalize; }
  .hk-appt--planned .hk-appt-type { color: var(--blue); }
  .hk-appt-total { margin-left: auto; font-weight: 600; color: var(--text); font-size: 13px; }
  .hk-appt-total--provisional { color: var(--muted); font-weight: 500; font-style: italic; }
  .hk-appt-body-inner { padding-top: 8px; }
  .hk-appt-desc { margin: 0 0 8px; font-size: 12px; color: var(--text); line-height: 1.4; }
  .hk-appt-desc--empty { color: var(--muted); font-style: italic; }
  .hk-appt-provisional-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); font-style: italic; }
  .hk-appt-body--provisional .hk-appt-body-inner {
    background: var(--surface2); border-radius: 8px; padding: 10px;
  }
  .hk-appt-body--provisional .hk-appt-lines li { font-style: italic; }
  .hk-appt-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .hk-appt-actions:empty { display: none; }
  .hk-appt-action-btn { font-size: 12px; padding: 6px 12px; }
  @media (max-width: 1179px) {
    .hk-appt-actions { flex-direction: column; }
    .hk-appt-action-btn { width: 100%; }
  }
  .hk-appt-lines {
    list-style: none;
    margin: 8px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .hk-appt-lines li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
  }
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .analytics-kpi-stack {
    display: grid;
    gap: 16px;
  }
  .analytics-kpi-block {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface, #fff);
    padding: 14px 16px 16px;
  }
  .analytics-kpi-block--marketing {
    background: var(--surface3, #f5f1ea);
  }
  .analytics-section-heading {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #1a1512);
    letter-spacing: -0.02em;
  }
  .analytics-section-lead {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--ink-muted);
    line-height: 1.35;
  }
  .kpi-grid--planning {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .kpi-grid--marketing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
  }
  .analytics-chart-card {
    min-height: 220px;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .analytics-chart-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .analytics-chart-meta {
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.35;
    min-height: 16px;
  }
  .analytics-chart-wrap {
    position: relative;
    height: 145px;
    min-height: 120px;
    max-height: 160px;
    width: 100%;
    margin-top: auto;
  }
  .analytics-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
  }
  .appointment-margin-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }
  .margin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e6ded3;
    border-radius: 999px;
    background: #faf6f1;
    color: var(--ink-soft);
    padding: 4px 10px;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
  }
  .margin-chip-label {
    color: var(--ink-muted);
  }
  .margin-chip strong {
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
  }
  .margin-chip-profit {
    background: #f7f2ea;
    border-color: #ddd3c4;
  }
  .margin-chip-percent {
    background: #f2ece2;
    border-color: #d4c7b3;
  }
  @media (max-width: 720px) {
    .kpi-grid--planning {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .kpi-grid--marketing {
      grid-template-columns: 1fr;
    }
    .analytics-charts-grid {
      grid-template-columns: 1fr;
    }
    .appointment-margin-summary {
      justify-content: flex-start;
      margin-top: 6px;
    }
  }
  @media (max-width: 960px) and (min-width: 721px) {
    .kpi-grid--planning {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .analytics-charts-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  .kpi-title { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
  .kpi-value { font-size: 20px; font-weight: 700; margin-top: 4px; }
  .kpi-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
  .toolbar-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .chip-btn {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--ink-soft);
    font-size: 12px;
    padding: 6px 10px;
  }
  .chip-btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
  #panelAnalytics .chip-btn {
    font-size: 11px;
    padding: 4px 9px;
    min-height: 28px;
    line-height: 1.2;
    border-radius: 6px;
    font-weight: 500;
  }
  .table-clean { width: 100%; border-collapse: collapse; font-size: 13px; }
  .table-clean th, .table-clean td { border-bottom: 1px solid var(--border); padding: 8px 6px; text-align: left; }
  .table-clean th { color: var(--ink-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
  .table-clean tr:last-child td { border-bottom: none; }
  .bar-chart { display: grid; gap: 8px; }
  .bar-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 8px; align-items: center; }
  .bar-track { height: 10px; border-radius: 999px; background: var(--bg-page); overflow: hidden; }
  .bar-fill { height: 100%; background: var(--accent); border-radius: 999px; }
  .field-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--ink);
    padding: 8px 10px;
    font-size: 13px;
    width: 100%;
  }
  input[type="number"]::-webkit-outer-spin-button,
  input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
  }
  .status-pill { font-size: 11px; border-radius: 999px; padding: 2px 8px; border: 1px solid var(--border); }
  .status-pill.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
  .status-pill.low { background: var(--yellow-soft); color: #7a4e00; border-color: transparent; }
  .status-pill.out { background: #f9e4df; color: #a02f08; border-color: transparent; }
  .route-panel {
    padding: 16px 14px;
  }

  @media (min-width: 1180px) {
    body:not(.user-jerry) header {
      background: transparent;
      border-bottom: none;
      box-shadow: none;
    }
    header {
      display: grid;
      grid-template-columns: 240px minmax(0, 1fr) auto;
      grid-template-rows: auto;
      align-items: center;
      column-gap: 16px;
      row-gap: 0;
      padding: 10px 24px;
    }
    .planner-header-brand-row {
      grid-column: 1;
      grid-row: 1;
      justify-content: flex-start;
    }
    .planner-app-tools {
      grid-column: 3;
      grid-row: 1;
      justify-self: end;
    }
    .date-nav-wrap,
    .header-stats,
    .planner-week-icon-btn {
      display: none;
    }
    .date-nav {
      border: none;
      background: transparent;
      padding: 0;
      gap: 8px;
      align-items: center;
    }
    .date-nav button {
      border: 1px solid var(--border);
      border-radius: 8px;
      background: #fff;
      min-width: 34px;
      min-height: 34px;
      padding: 0;
      color: #645c52;
      font-size: 18px;
    }
    .date-label {
      border: none;
      background: transparent;
      padding: 0;
      font-size: 21px;
      line-height: 1.2;
      letter-spacing: -0.02em;
      color: #1a1512;
      font-weight: 700;
      text-align: left;
      min-width: 260px;
    }
    .layout {
      display: grid;
      grid-template-columns: 240px minmax(0, 1fr);
      min-height: calc(100dvh - 74px);
    }
    .planner-sidebar {
      display: flex;
      flex-direction: column;
      width: 240px;
      min-width: 240px;
      min-height: calc(100dvh - 74px);
      background: var(--bg-card);
      border-right: 1px solid var(--border);
      padding: 0;
      gap: 0;
    }
    .appointments {
      padding: 24px;
      border-right: none;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions {
      gap: 6px;
      align-items: center;
      flex-wrap: nowrap;
      padding-top: 2px;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions .planner-desktop-search {
      display: block;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions .today-btn {
      min-height: 38px;
      padding: 6px 10px;
      font-size: 12px;
      border-radius: 10px;
    }
    body:not(.user-jerry) .route-num {
      width: 28px;
      height: 28px;
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
      border-color: rgba(0, 0, 0, 0.16);
      background: #fff;
    }
    body:not(.user-jerry) .route-num.depot {
      font-size: 12px;
    }
    body:not(.user-jerry) header {
      padding: 6px 16px 8px;
    }
    body:not(.user-jerry) .layout {
      min-height: calc(100dvh - 56px);
    }
    body:not(.user-jerry) .planner-sidebar {
      min-height: calc(100dvh - 56px);
    }
    body:not(.user-jerry) .planner-header-brand-row {
      gap: 8px;
      align-items: center;
    }
    body:not(.user-jerry) .planner-brand-logo {
      height: 34px;
      max-width: min(200px, 40vw);
    }

    /* ── Desktop compact density (Daan): na warm-minimal defaults; niet Jerry / niet <1180 ── */
    body:not(.user-jerry) {
      --appts-header-util-size: 40px;
      --appts-header-cta-height: 32px;
      --appts-header-actions-gap: 8px;
      --appts-header-util-gap: 5px;
      --appt-action-icon-size: 38px;
      --appt-action-icon-radius: 12px;
    }
    body:not(.user-jerry) .date-label {
      font-size: 17px;
      min-width: 0;
      letter-spacing: -0.03em;
    }
    body:not(.user-jerry) header {
      padding: 8px 18px 8px;
    }
    body:not(.user-jerry) .today-page-header {
      padding: 12px 20px;
      gap: 10px;
    }
    body:not(.user-jerry) .today-page-heading h1 {
      font-size: 18px;
    }
    body:not(.user-jerry) .today-page-heading p {
      font-size: 11px;
    }
    body:not(.user-jerry) .today-week-strip-wrap {
      padding: 10px 20px;
    }
    body:not(.user-jerry) .planner-week-edge {
      width: 28px;
      height: 28px;
      min-width: 28px;
      min-height: 28px;
    }
    body:not(.user-jerry) .planner-week-day {
      font-size: 10px;
      padding: 6px 0;
    }
    body:not(.user-jerry) .planner-week-day .planner-week-day-num {
      font-size: 13px;
    }
    body:not(.user-jerry) .today-kpi-grid {
      padding: 12px 20px;
      gap: 10px;
    }
    body:not(.user-jerry) .today-kpi-card {
      padding: 10px 12px;
    }
    body:not(.user-jerry) .today-kpi-label {
      font-size: 10px;
    }
    body:not(.user-jerry) .today-kpi-value {
      font-size: 17px;
      margin-top: 2px;
    }
    body:not(.user-jerry) .today-kpi-sub {
      font-size: 10.5px;
    }
    body:not(.user-jerry) .planning-section-title {
      font-size: 10px;
      padding: 10px 0 6px;
    }
    body:not(.user-jerry) #apptList {
      padding: 4px 20px 22px;
      gap: 11px;
    }
    body:not(.user-jerry) .appt-card {
      margin-bottom: 11px;
    }
    body:not(.user-jerry) .appt-inner {
      padding: 11px 11px 11px 28px;
    }
    body:not(.user-jerry) .appt-number {
      font-size: clamp(13px, 1.5vw, 15px);
    }
    body:not(.user-jerry) .appt-address {
      font-size: clamp(14px, 1.65vw, 16px);
    }
    body:not(.user-jerry) .appt-name {
      font-size: 12px;
    }
    body:not(.user-jerry) .appt-time {
      font-size: 11px;
    }
    body:not(.user-jerry) .appt-desc {
      font-size: 11px;
    }
    body:not(.user-jerry) .appt-body {
      gap: 8px;
      margin: 6px 0 10px;
    }
    body:not(.user-jerry) .appointments-header-actions .btn-add {
      font-size: 11.5px;
      padding: 0 10px;
      border-radius: 8px;
      min-height: 32px;
      height: 32px;
    }
    body:not(.user-jerry) .appointments-header-util .btn-dagopgave,
    body:not(.user-jerry) .appointments-header-util .planner-app-icon-btn.btn-day-block {
      width: 34px;
      height: 34px;
      min-width: 34px;
      min-height: 34px;
      border-radius: 8px;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions .today-btn {
      min-height: 32px;
      padding: 5px 10px;
      font-size: 11.5px;
      border-radius: 9px;
    }
    body:not(.user-jerry) .appointments-header-util .btn-dagopgave {
      font-size: 14px;
    }
    body:not(.user-jerry) .appointments-header-util .planner-app-icon-btn.btn-day-block .btn-day-block-ic {
      font-size: 14px;
    }
    body:not(.user-jerry) .planner-desktop-search {
      width: clamp(200px, 19vw, 280px);
      font-size: 12px;
      padding: 6px 10px;
      min-height: 34px;
    }
    body:not(.user-jerry) .route-name {
      font-size: 11px;
    }
    body:not(.user-jerry) .route-addr {
      font-size: 9px;
    }
    body:not(.user-jerry) .route-time {
      font-size: 9px;
    }
    body:not(.user-jerry) .route-num {
      width: 26px;
      height: 26px;
      font-size: 11px;
    }
    body:not(.user-jerry) .planner-sidebar-caption {
      font-size: 11px;
    }
    body:not(.user-jerry) .planner-sidebar-brand {
      padding: 14px 14px 12px;
    }
    body:not(.user-jerry) .planner-sidebar-item {
      font-size: 12px;
      min-height: 34px;
      padding: 7px 10px;
    }
    body:not(.user-jerry) .planner-sidebar-nav {
      padding: 12px 8px;
    }

    .route-panel {
      display: flex !important;
      flex-direction: column;
      gap: 12px;
      border-left: none;
      padding: 16px 14px;
    }
    .route-demo-panel {
      padding: 0 !important;
      gap: 0;
    }
  }

  @media (max-width: 1179px) {
    .planner-sidebar {
      display: none !important;
    }
    .layout {
      grid-template-columns: 1fr !important;
    }
    .date-label {
      font-size: 16px;
      min-width: 0;
    }
    .stat {
      min-width: 92px;
    }
    .today-page-header,
    .today-week-strip-wrap,
    .today-kpi-grid,
    #apptList {
      padding-left: 14px;
      padding-right: 14px;
    }
    .today-kpi-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .routes-content-grid {
      grid-template-columns: 1fr;
      padding: 14px;
    }
    .appt-actions .icon-btn.appt-action-icon::after {
      display: none;
    }
    .appt-actions .icon-btn.appt-action-icon {
      min-width: 38px;
      width: 38px;
      height: 38px;
      padding: 0;
    }
  }

  /*
   * Desktop #panelAfspraken — **onderaan** deze <style> zodat dit wint op het warm-minimal blok
   * (±L5060: .appointments padding 0 + .today-page-header 18px) en op eerdere @media(1180)-regels.
   * Alleen niet-Jerry; id-selector + !important alleen op verticale padding van dit paneel.
   */
  @media (min-width: 1180px) {
    body:not(.user-jerry) #panelAfspraken.appointments {
      padding: 0 18px 16px !important;
    }
    body:not(.user-jerry) #panelAfspraken > .today-page-header {
      padding: 4px 18px !important;
      align-items: flex-start;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-heading h1 {
      font-size: 23px;
      line-height: 1.18;
      letter-spacing: -0.03em;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-heading p {
      margin-top: 4px;
      font-size: 13px;
      line-height: 1.35;
      color: var(--ink-soft);
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions {
      align-items: center;
      gap: 8px;
    }
    body:not(.user-jerry) #panelAfspraken .today-page-header .appointments-header-actions .today-btn {
      min-height: 34px;
      padding: 6px 10px;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 600;
      line-height: 1.2;
    }
    body:not(.user-jerry) #panelAfspraken > .today-week-strip-wrap {
      padding: 6px 18px !important;
    }
    body:not(.user-jerry) #panelAfspraken .planner-week-day {
      min-height: 46px;
      padding: 9px 8px 10px;
      font-size: 12px;
      font-weight: 600;
      border-radius: 12px;
    }
    body:not(.user-jerry) #panelAfspraken .planner-week-day .planner-week-day-num {
      font-size: 18px;
      line-height: 1.05;
      margin-top: 3px;
      font-weight: 700;
    }
    body:not(.user-jerry) #panelAfspraken > .today-kpi-grid {
      padding: 10px 18px !important;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-head-aside,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-head-aside {
      gap: 8px;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons {
      display: flex;
      justify-content: flex-end;
      gap: 6px;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-actions-slot,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-actions-slot {
      display: none;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon {
      --appt-action-icon-size: 34px;
      --appt-action-icon-radius: 8px;
      width: var(--appt-action-icon-size);
      height: var(--appt-action-icon-size);
      min-width: var(--appt-action-icon-size);
      min-height: var(--appt-action-icon-size);
      padding: 0;
      border-radius: var(--appt-action-icon-radius);
      background: var(--appt-action-icon-bg);
      border-color: var(--appt-action-icon-border);
      color: var(--appt-action-icon-fg);
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon .appt-action-svg,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon .appt-action-svg {
      width: 16px;
      height: 16px;
      stroke: currentColor;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon:hover,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon:hover {
      background: var(--appt-action-icon-bg-hover);
      border-color: var(--appt-action-icon-border-hover);
      color: var(--appt-action-icon-fg-hover);
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-cta-row,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-cta-row {
      gap: 8px;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--prijs,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--prijs,
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--onderweg-actie,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--onderweg-actie,
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--klaar,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-btn--klaar {
      min-height: 38px;
      padding: 0 14px;
      border-radius: 10px;
      font-size: 12.5px;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type {
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      text-transform: lowercase;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-onderhoud,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-onderhoud {
      background: #e5f4ec;
      color: #0f7a4b;
      border-color: #cde8d8;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-installatie,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-installatie {
      background: #fbf0d4;
      color: #a66a00;
      border-color: #f0dfb1;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-reparatie,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-reparatie {
      background: #fbe9dd;
      color: #a02f08;
      border-color: #f3d7c4;
    }
        body:not(.user-jerry) #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-herafspraak,
        body.user-jerry.ipad-field-vp #panelAfspraken .appt-card--layout-v2 .appt-wm-pill--type-herafspraak {
      background: #ede9fe;
      color: #5b21b6;
      border-color: #ddd6fe;
    }
  }

  /* Jerry veld-tablets: iPad Mini 6 + iPad 9 (excl. iPhone, desktop, iPad Air/Pro) */
  @media only screen and (min-width: 720px) and (max-width: 820px) and (min-height: 1050px) and (max-height: 1179px),
    only screen and (min-width: 1050px) and (max-width: 1160px) and (max-height: 820px) {
    body.user-jerry {
      font-size: 23px;
    }
    body.user-jerry .stat-val {
      font-size: clamp(32px, 5vw, 42px) !important;
    }
    body.user-jerry .stat-label {
      font-size: 13px !important;
    }
    body.user-jerry .planning-section-title {
      font-size: clamp(22px, 3vw, 26px) !important;
    }
    body.user-jerry .section-title {
      font-size: 14px !important;
    }
    body.user-jerry .mobile-tab {
      font-size: 12px !important;
      min-height: 52px !important;
      letter-spacing: 0.05em;
    }
    body.user-jerry .mobile-bottom-nav {
      background: #f3efe8 !important;
      border-top: 1px solid #e0d9ce !important;
      backdrop-filter: none !important;
      box-shadow: 0 -1px 0 rgba(61, 56, 51, 0.06);
    }
    body.user-jerry .mobile-bottom-nav .mobile-tab {
      color: #4a443c !important;
    }
    body.user-jerry .mobile-bottom-nav .mobile-tab.active {
      background: rgba(220, 74, 26, 0.12) !important;
      color: #a02f08 !important;
    }
    /* Prijs-popup (touch overlay): buiten .complete-bar → eigen total-regels */
    body.user-jerry.ipad-field-vp .touch-price-overlay .price-total-row,
    body.user-jerry.ipad-field-vp .complete-bar .price-total-row {
      font-size: 18px !important;
      padding-top: 16px !important;
      margin-top: 14px !important;
      gap: 16px;
    }
    body.user-jerry.ipad-field-vp .touch-price-overlay .price-total-row > span:first-child,
    body.user-jerry.ipad-field-vp .complete-bar .price-total-row > span:first-child {
      font-size: 18px !important;
      font-weight: 600 !important;
      letter-spacing: 0.02em;
    }
    body.user-jerry.ipad-field-vp .touch-price-overlay .price-total-row span:last-child,
    body.user-jerry.ipad-field-vp .complete-bar .price-total-row span:last-child {
      font-size: clamp(28px, 6.5vw, 40px) !important;
      font-weight: 700 !important;
      letter-spacing: -0.02em;
      line-height: 1.1;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 {
      display: block !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-inner--wm {
      padding: 16px 18px 16px 16px !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-address {
      font-size: clamp(18px, 2.4vw, 22px) !important;
      line-height: 1.32 !important;
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: unset !important;
      word-break: break-word;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-customer {
      font-size: clamp(17px, 2.2vw, 20px) !important;
      line-height: 1.4 !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-desc,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-notes {
      font-size: clamp(17px, 2.1vw, 19px) !important;
      line-height: 1.45 !important;
      white-space: normal !important;
      overflow: visible !important;
      text-overflow: unset !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-num {
      font-size: 18px !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill {
      font-size: 13px !important;
      padding: 5px 12px !important;
    }
    /* Werktype-kleuren (desktop staat in min-width 1180px; veld-tablets missen die band) */
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--type-onderhoud {
      background: #e5f4ec !important;
      color: #0f7a4b !important;
      border-color: #cde8d8 !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--type-installatie {
      background: #fbf0d4 !important;
      color: #a66a00 !important;
      border-color: #f0dfb1 !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--type-reparatie {
      background: #fbe9dd !important;
      color: #a02f08 !important;
      border-color: #f3d7c4 !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-pill--type-herafspraak {
      background: #ede9fe !important;
      color: #5b21b6 !important;
      border-color: #ddd6fe !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-actions-mobile,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-actions-slot {
      display: none !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-cta-row {
      width: auto !important;
      max-width: none !important;
      flex-wrap: nowrap !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--prijs,
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-btn--onderweg-actie {
      min-height: 48px !important;
      padding: 0 16px !important;
      font-size: 17px !important;
      min-width: 5.5em;
      white-space: nowrap;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon {
      --appt-action-icon-size: 40px;
      --appt-action-icon-radius: 11px;
      width: 40px !important;
      min-width: 40px !important;
      max-width: 40px !important;
      height: 40px !important;
      min-height: 40px !important;
      padding: 0 !important;
    }
    body.user-jerry.ipad-field-vp .appt-card--layout-v2 .appt-wm-jerry-icons .icon-btn.appt-action-icon .appt-action-svg {
      width: 17px !important;
      height: 17px !important;
    }
  }

  /* v2: wrap long address/description (overrides warm-minimal .appt-desc nowrap/ellipsis) */
  .appt-card--layout-v2 {
    overflow: visible;
    height: auto;
    min-height: 0;
  }
  .appt-card--layout-v2 .appt-inner--wm,
  .appt-card--layout-v2 .appt-wm-layout,
  .appt-card--layout-v2 .appt-wm-main,
  .appt-card--layout-v2 .appt-wm-head-text {
    overflow: visible;
    min-width: 0;
  }
  .appt-card--layout-v2 .appt-wm-address,
  .appt-card--layout-v2 .appt-wm-customer,
  .appt-card--layout-v2 .appt-wm-desc,
  .appt-card--layout-v2 .appt-wm-notes {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: break-word;
    word-break: break-word;
    max-height: none;
    height: auto;
  }


  /* ─── Multiple monteurs (docs/specs/meerdere-monteurs.md) ─── */
  .monteur-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
  }
  .monteur-tab {
    border: 1px solid var(--border-strong, #d9d2c5);
    background: var(--bg-card, #fff);
    color: var(--ink, #1a1512);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 34px;
  }
  .monteur-tab.is-active {
    background: var(--ink, #1a1512);
    border-color: var(--ink, #1a1512);
    color: #fff;
  }
  .monteur-capacity-warning {
    border: 1px solid #e8c37a;
    background: var(--yellow-soft, #fbf0d4);
    color: var(--yellow, #a66a00);
    border-radius: 10px;
    padding: 10px 14px;
    margin: 0 0 14px;
    font-size: 13px;
    font-weight: 600;
  }
  .monteur-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #1a1512);
  }
  .monteur-afwezig-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    background: var(--accent-soft, #fbe9dd);
    color: var(--accent-ink, #a02f08);
  }
  .monteur-select {
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-strong, #d9d2c5);
    border-radius: 999px;
    background: var(--bg-card, #fff);
    color: var(--ink, #1a1512);
    padding: 3px 8px;
    max-width: 160px;
  }
  .klussoort-select,
  .details-section--indeling .monteur-select {
    font: inherit;
    font-size: 14px;
    border: 1px solid var(--border-strong, #d9d2c5);
    border-radius: 8px;
    background: var(--bg-card, #fff);
    color: var(--ink, #1a1512);
    padding: 6px 10px;
    max-width: none;
    min-width: 200px;
  }
  .details-indeling-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0;
  }

  /* Route panel: one column per monteur, side by side; they stack on narrow screens. */
  .routes-content-grid:has(.route-columns--n2),
  .routes-content-grid:has(.route-columns--n3),
  .routes-content-grid:has(.route-columns--n4),
  .routes-content-grid:has(.route-columns--n5) {
    grid-template-columns: minmax(0, 1fr);
  }
  .route-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    align-items: start;
  }
  .route-column {
    border: 1px solid var(--border, #eae5dc);
    border-radius: 12px;
    background: var(--bg-card, #fff);
    min-width: 0;
    transition: box-shadow 0.12s ease, border-color 0.12s ease;
  }
  .route-column--drop {
    border-color: var(--accent, #dc4a1a);
    box-shadow: 0 0 0 2px var(--accent-soft, #fbe9dd);
  }
  .route-column__head {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #eae5dc);
    display: grid;
    gap: 4px;
  }
  .route-column__title {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .route-column__name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink, #1a1512);
  }
  .route-column__meta,
  .route-column__status {
    font-size: 12px;
    color: var(--ink-soft, #645c52);
  }
  .route-column__over {
    color: var(--accent-ink, #a02f08);
    font-weight: 700;
  }
  .route-column__optimize {
    justify-self: start;
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
  }
  .route-column__list {
    padding: 6px;
  }

  /* Monteurs screen (beheerders). */
  .monteurs-beheer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
  }
  .monteurs-card {
    padding: 14px 16px;
    display: grid;
    gap: 10px;
  }
  .monteurs-card--absence,
  .monteurs-card--rules,
  .monteurs-kalender-slot {
    grid-column: 1 / -1;
  }
  /* Month calendar per monteur (docs/specs/monteur-kalender.md). */
  .mk-tabs,
  .mk-nav,
  .mk-legenda,
  .mk-keuze__knoppen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .mk-nav strong {
    min-width: 150px;
    text-align: center;
    text-transform: capitalize;
  }
  .mk-raster {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    max-width: 520px;
  }
  .mk-kop {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: var(--ink-muted, #8e867c);
  }
  .mk-dag {
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border, #eae5dc);
    background: #fff;
    color: var(--ink, #2b2620);
    font: inherit;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 2px;
  }
  .mk-dag small {
    font-size: 10px;
    line-height: 1;
  }
  .mk-dag--leeg {
    border: 0;
    background: transparent;
    cursor: default;
  }
  .mk-dag--hele_dag {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.45);
  }
  .mk-dag--ochtend,
  .mk-dag--middag {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 50%, #fff 50%);
    border-color: rgba(16, 185, 129, 0.45);
  }
  .mk-dag--afwijking {
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.85);
  }
  .mk-dag--vast {
    opacity: 0.55;
    cursor: default;
  }
  .mk-dag--vandaag span {
    font-weight: 700;
    text-decoration: underline;
  }
  .mk-dag--gekozen {
    outline: 2px solid var(--ink, #2b2620);
    outline-offset: 1px;
  }
  .mk-keuze {
    display: grid;
    gap: 6px;
    border-top: 1px solid var(--border, #eae5dc);
    padding-top: 8px;
    font-size: 14px;
  }
  .mk-keuze__dag {
    font-weight: 600;
  }
  .mk-legenda {
    font-size: 12px;
    color: var(--ink-muted, #8e867c);
    gap: 12px;
  }
  .mk-stip {
    display: inline-block;
    width: 12px;
    height: 12px;
    min-height: 0;
    border-radius: 3px;
    border: 1px solid var(--border, #eae5dc);
    margin-right: 4px;
    vertical-align: middle;
    padding: 0;
  }
  .monteurs-row--extra {
    flex-direction: column;
    align-items: stretch;
  }
  .monteurs-extra {
    width: 100%;
    resize: vertical;
    font: inherit;
  }
  .monteurs-rules {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    font-size: 14px;
    line-height: 1.45;
  }
  .monteurs-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }
  .monteurs-card__head h3 {
    margin: 0;
    font-size: 16px;
  }
  .monteurs-card__login {
    font-size: 12px;
    color: var(--ink-muted, #8e867c);
  }
  .monteurs-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
  }
  .monteurs-row--cap label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .monteurs-cap {
    width: 64px;
  }
  .monteurs-row__label {
    font-weight: 600;
    margin-right: 4px;
  }
  .monteurs-day {
    display: inline-flex;
    align-items: center;
    gap: 3px;
  }
  .monteurs-absence-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
  }
  .monteurs-absence {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--border, #eae5dc);
    padding-top: 6px;
    font-size: 14px;
  }
  .monteurs-absence--empty {
    color: var(--ink-muted, #8e867c);
  }
  [data-sidebar-view="monteurs"][hidden] {
    display: none !important;
  }

/* ─── Role monteur (spec docs/specs/meerdere-monteurs.md, "Rollen") ───────────
   A monteur sees only Planning and Routes with his own route; everything he may not use is hidden here, and the
   server refuses it anyway. Completing a job and "volgende klant laten weten" stay. */
body.hk-rol-monteur [data-sidebar-view]:not([data-sidebar-view="today"]):not([data-sidebar-view="routes"]),
body.hk-rol-monteur [onclick*="openModal()"],
body.hk-rol-monteur [onclick*="optimizeRoute("],
body.hk-rol-monteur [onclick*="sendMorningMessages("],
body.hk-rol-monteur [onclick*="openAppointmentEditModal("],
body.hk-rol-monteur [onclick*="deleteAppt("],
body.hk-rol-monteur [onclick*="DayBlock"],
body.hk-rol-monteur [onclick*="onBlockDayButtonClick("],
body.hk-rol-monteur [onclick*="blockCalendarDay"],
body.hk-rol-monteur [onclick*="unblockCalendarDay"],
body.hk-rol-monteur [onclick*="setCustomerDayFull"],
body.hk-rol-monteur .monteur-select,
body.hk-rol-monteur .klussoort-select,
body.hk-rol-monteur .appt-monteur-pick,
body.hk-rol-monteur .planner-desktop-remote-hit {
  display: none !important;
}

/* ─── Role indeler (spec docs/specs/jerry-mag-indelen.md) ───────────
   A monteur who may assign jobs: like a monteur only Planning and Routes, but he keeps the monteur choice, the route
   tabs, dragging and "Heroptimaliseer route". The rest stays hidden, and the server refuses it anyway. */
body.hk-rol-indeler [data-sidebar-view]:not([data-sidebar-view="today"]):not([data-sidebar-view="routes"]),
body.hk-rol-indeler [onclick*="openModal()"],
body.hk-rol-indeler [onclick*="sendMorningMessages("],
body.hk-rol-indeler [onclick*="openAppointmentEditModal("],
body.hk-rol-indeler [onclick*="deleteAppt("],
body.hk-rol-indeler [onclick*="DayBlock"],
body.hk-rol-indeler [onclick*="onBlockDayButtonClick("],
body.hk-rol-indeler [onclick*="blockCalendarDay"],
body.hk-rol-indeler [onclick*="unblockCalendarDay"],
body.hk-rol-indeler [onclick*="setCustomerDayFull"],
body.hk-rol-indeler .planner-desktop-remote-hit {
  display: none !important;
}

/* ─── Supabase preview (spec docs/specs/planner-supabase-lezen.md, "Proefweergave") ───────────
   Look-only: the banner says so; public/app/planner-proef.js refuses every request that could change something. */
.hk-proef-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 8px 16px;
  background: #fff4d6;
  color: #6b4e00;
  border-bottom: 1px solid #e8c766;
  font-weight: 600;
  text-align: center;
}
body.hk-proef [draggable="true"] {
  cursor: default;
}

/* Inbox, step 1a (docs/specs/inbox-whatsapp-lezen.md): list | WhatsApp-Web-style conversation | customer column. */
.inbox { display: flex; flex-wrap: wrap; min-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-card); }
.inbox-list { flex: 1 1 300px; max-width: 360px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); }
.inbox-search { display: block; padding: 12px 12px 6px; }
.inbox-search input { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-page); font: inherit; color: var(--ink); }
.inbox-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.inbox-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 12px 10px; }
.inbox-filter { min-height: 32px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--ink-soft); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.inbox-filter.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.inbox-filter:disabled { opacity: 0.45; cursor: default; }
/* Spec inbox-weergave: WhatsApp · Mail · Alles above the filters, as one segmented control. */
.inbox-kanalen { display: flex; margin: 4px 12px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.inbox-kanaal { flex: 1 1 0; min-height: 32px; padding: 6px 8px; border: 0; border-right: 1px solid var(--border); background: var(--bg-card); color: var(--ink-soft); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.inbox-kanaal:last-child { border-right: 0; }
.inbox-kanaal.is-on { background: #d9fdd3; color: #111b21; }
.inbox-kanaal:disabled { opacity: 0.45; cursor: default; }
.inbox-items { flex: 1 1 auto; overflow-y: auto; max-height: calc(100vh - 330px); }
.inbox-item { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 11px 14px; border: 0; border-top: 1px solid var(--border); background: var(--bg-card); text-align: left; font: inherit; cursor: pointer; }
.inbox-item.is-on { background: var(--accent-soft); }
.inbox-item-top, .inbox-item-bottom { display: flex; gap: 8px; align-items: center; min-width: 0; }
.inbox-item-name { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item-time { margin-left: auto; font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.inbox-item-preview { font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-item-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #25d366; color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.inbox-more, .inbox-older { display: block; margin: 10px auto; }
.inbox-note { padding: 16px 14px; color: var(--ink-muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inbox-note--error { color: var(--accent-ink); }
.inbox-chat { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; }
.inbox-chat-head { display: flex; flex-direction: column; padding: 12px 18px; border-bottom: 1px solid var(--border); background: #f0f2f5; }
.inbox-chat-name { font-weight: 600; font-size: 15px; }
.inbox-chat-sub { font-size: 12px; color: #54656f; }
/* WhatsApp Web look: beige wallpaper, white incoming bubbles left, light-green outgoing bubbles right. */
.inbox-wa { flex: 1 1 auto; min-height: 360px; max-height: calc(100vh - 340px); overflow-y: auto; background: #efeae2; padding: 16px 24px; display: flex; flex-direction: column; gap: 4px; }
.inbox-day { align-self: center; margin: 8px 0 4px; }
.inbox-day span { display: inline-block; padding: 4px 10px; border-radius: 8px; background: #fff; color: #54656f; font-size: 12px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); }
.inbox-bubble { max-width: 70%; padding: 6px 9px 5px; border-radius: 8px; box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13); display: flex; flex-direction: column; gap: 3px; color: #111b21; }
.inbox-bubble--in { align-self: flex-start; background: #fff; border-top-left-radius: 0; }
.inbox-bubble--out { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 0; }
.inbox-bubble-text { font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-bubble-time { align-self: flex-end; font-size: 11px; color: #667781; }
.inbox-attach { font-size: 13px; font-weight: 600; color: #027eb5; text-decoration: underline; }
.inbox-empty { margin: auto; padding: 40px; color: var(--ink-muted); }
.inbox-side { flex: 1 1 260px; max-width: 340px; min-width: 0; padding: 14px; background: var(--bg-page); border-left: 1px solid var(--border); }
.inbox-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.inbox-card-name { font-weight: 700; font-size: 16px; }
.inbox-card-line { font-size: 13px; color: var(--ink-soft); }
.inbox-card-note { font-size: 12px; color: var(--ink-muted); }
.inbox-forbidden { padding: 40px 16px; font-size: 16px; font-weight: 600; color: var(--accent-ink); }
@media (max-width: 760px) {
  .inbox-list, .inbox-side { max-width: none; flex-basis: 100%; border-right: 0; }
  .inbox-bubble { max-width: 88%; }
  .inbox-wa { padding: 12px; }
}
/* Inbox, step 1b (docs/specs/inbox-klantkaart.md): the customer card. */
.inbox-card-section { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-weight: 700; font-size: 13px; }
.inbox-card-note--error { color: var(--accent-ink); }
.inbox-visit { font-size: 13px; padding: 4px 0; }
.inbox-tijdvoorstel { margin-top: 10px; align-self: flex-start; }
/* Inbox step A: "Gevonden in het gesprek" on the customer card */
.inbox-found-label { font-weight: 600; color: var(--ink); }
/* Inbox step B (docs/specs/inbox-fotos.md): photo thumbnails on the customer card, three per row. */
.inbox-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.inbox-photo { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-sm, 6px); border: 1px solid var(--border); background: var(--bg-page); color: var(--ink-muted); font-size: 12px; text-decoration: none; }
.inbox-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Inbox step D (docs/specs/inbox-concept.md): the AI reply draft under the conversation. */
.inbox-concept { padding: 10px 18px; border-top: 1px solid var(--border); background: #f0f2f5; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.inbox-concept-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.inbox-concept-warning { font-size: 12px; color: var(--accent-ink); font-weight: 600; }
.inbox-concept-text { width: 100%; box-sizing: border-box; min-height: 96px; resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; line-height: 1.4; color: #111b21; }
.inbox-concept-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Inbox step E (docs/specs/inbox-gmail-lezen.md): mail threads in the list and the Gmail-style thread. */
.inbox-mailnote:empty { display: none; }
.inbox-mailnote-text { padding: 0 12px 8px; font-size: 12px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inbox-item-mail { display: inline-flex; vertical-align: -2px; margin-right: 6px; color: #c5221f; }
.inbox-item--mail .inbox-item-badge { background: #c5221f; }
.inbox-mail-gmail { align-self: flex-start; margin-top: 4px; font-size: 12px; font-weight: 600; color: #0b57d0; }
.inbox-mail { flex: 1 1 auto; min-height: 360px; max-height: calc(100vh - 340px); overflow-y: auto; background: #fff; padding: 8px 0; display: flex; flex-direction: column; }
.inbox-mail-msg { display: block; width: 100%; box-sizing: border-box; padding: 12px 20px; border: 0; border-bottom: 1px solid #e0e3e7; background: #fff; text-align: left; font: inherit; color: #1f1f1f; }
.inbox-mail-msg.is-closed { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; cursor: pointer; background: #f8f9fa; }
.inbox-mail-msg.is-closed:hover { background: #f2f6fc; }
.inbox-mail-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.inbox-mail-from { font-weight: 700; font-size: 14px; }
.inbox-mail-addr, .inbox-mail-to { font-size: 12px; color: #5e5e5e; }
.inbox-mail-time { margin-left: auto; font-size: 12px; color: #5e5e5e; white-space: nowrap; }
.inbox-mail-start { grid-column: 1 / -1; font-size: 13px; color: #5e5e5e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-mail-text { margin-top: 10px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-mail-quote { margin-top: 8px; font-size: 13px; color: #5e5e5e; }
.inbox-mail-quote summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.inbox-mail-files { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.inbox-mail-files li { padding: 6px 10px; border: 1px solid #e0e3e7; border-radius: 8px; font-size: 12px; color: #444; background: #f8f9fa; }

/* Inbox step F (docs/specs/inbox-versturen.md): the send box under the conversation. */
.inbox-send { padding: 10px 18px; border-top: 1px solid var(--border); background: #f0f2f5; display: flex; flex-direction: column; gap: 6px; }
.inbox-send-text { width: 100%; box-sizing: border-box; min-height: 64px; resize: vertical; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: inherit; font-size: 14px; line-height: 1.4; color: #111b21; }
.inbox-send-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Inbox step B: a photo shown large inside the inbox, like WhatsApp; the dark backdrop closes it. */
.inbox-viewer { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(11, 20, 26, 0.96); }
.inbox-viewer-img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; background: #111; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.inbox-viewer-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 16px; color: #e9edef; font-size: 14px; }
.inbox-viewer-count { margin-right: auto; }
.inbox-viewer-tab { color: #e9edef; text-decoration: underline; }
.inbox-viewer-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.inbox-viewer-btn:hover { background: rgba(255, 255, 255, 0.24); }
.inbox-viewer-prev, .inbox-viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.inbox-viewer-prev { left: 16px; }
.inbox-viewer-next { right: 16px; }
@media (max-width: 640px) {
  .inbox-viewer-img { max-width: calc(100vw - 32px); }
  .inbox-viewer-prev { left: 4px; }
  .inbox-viewer-next { right: 4px; }
}

/* Spec inbox-weergave: no title bar and no margins; the inbox fills the space next to the menu, each column scrolls on
   its own. The list and the customer card keep the width they had at 1440 px; the conversation takes the rest. */
#panelInbox { padding: 0; }
#panelInbox .panel-page-content { padding: 0; display: block; }
#panelInbox .inbox { border: 0; border-radius: 0; }
/* From 1180 px, where the planner switches to its desktop layout (side menu, 64 px top bar), the three columns sit
   side by side with a fixed list and card; narrower screens wrap as before. */
@media (min-width: 1180px) {
  /* 64px: the planner's top bar (logo and menu button), measured in dev:local; the inbox ends at the screen's bottom. */
  #panelInbox .inbox { flex-wrap: nowrap; height: calc(100vh - 64px); min-height: 0; }
  #panelInbox .inbox-list { flex: 0 0 300px; max-width: none; min-height: 0; }
  #panelInbox .inbox-items { max-height: none; min-height: 0; }
  #panelInbox .inbox-search, #panelInbox .inbox-kanalen, #panelInbox .inbox-filters, #panelInbox .inbox-mailnote { flex: 0 0 auto; }
  #panelInbox .inbox-chat { flex: 1 1 auto; min-height: 0; }
  #panelInbox .inbox-wa { max-height: none; min-height: 0; }
  #panelInbox .inbox-side { flex: 0 0 260px; max-width: none; overflow-y: auto; }
}
/* Spec inbox-versturen-snel: the quick-reply list above the reply box. */
.inbox-quick { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; border-radius: 8px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); }
.inbox-quick:empty { display: none; }
.inbox-quick-item { display: block; width: 100%; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--border); background: #fff; color: #111b21; font: inherit; font-size: 13px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.inbox-quick-item:last-child { border-bottom: 0; }
.inbox-quick-item span { color: #667781; }
.inbox-quick-item.is-on, .inbox-quick-item:hover { background: #f0f2f5; }
/* Spec planning-fotos: the photo viewer over Planning reuses the inbox viewer; a photo the browser cannot show. */
#hkPhotoViewer .inbox-viewer-img { touch-action: pan-y; }
.pv-broken { color: #e9edef; font-size: 15px; text-align: center; padding: 24px; }
.pv-broken a { color: #e9edef; text-decoration: underline; }
/*
 * Styling report PR C, "Jerry's grote letters, snelle fix": one big-text floor for the big mode (every monteur, and anyone
 * who turns "Grote letters" on), whatever the window size. `html body…` outranks the older layered rules until the
 * big-text clean-up replaces them with one rem-based scale.
 */
html body.user-jerry .appt-address { font-size: clamp(24px, 3.2vw, 28px) !important; }
html body.user-jerry .appt-name { font-size: clamp(19px, 2.6vw, 22px) !important; color: var(--ink) !important; }
html body.ui-scale-large .route-name { font-size: 17px !important; }
html body.ui-scale-large .route-addr { font-size: 15px !important; }
html body.ui-scale-large .route-eta { font-size: 16px !important; }
html body.ui-scale-large .route-num { font-size: 15px !important; }
html body.ui-scale-large .route-phase__label,
html body.ui-scale-large .route-phase__window,
html body.ui-scale-large .route-transition__title,
html body.ui-scale-large .route-transition__meta,
html body.ui-scale-large .route-summary,
html body.ui-scale-large .route-status-text { font-size: 15px !important; }
html body.ui-scale-large .route-job-pill,
html body.ui-scale-large .route-day-pill,
html body.ui-scale-large .route-status-kicker { font-size: 14px !important; }
html body.ui-scale-large .touch-price-overlay { font-size: 16px; }
html body.ui-scale-large .touch-price-overlay-sub { font-size: 16px !important; }
html body.ui-scale-large .price-section-label { font-size: 14px !important; }
html body.ui-scale-large .extra-item { font-size: 17px !important; }
html body.ui-scale-large .mobile-bottom-nav .mobile-tab { font-size: 15px !important; }
html body.ui-scale-large .mobile-menu-item { font-size: 18px !important; }
html body.ui-scale-large .mobile-menu-subtitle { font-size: 14px !important; }
html body.ui-scale-large .today-kpi-label,
html body.ui-scale-large .today-kpi-sub { font-size: 14px !important; }
/* A monteur does not need the money tiles. */
html body.user-jerry .today-kpi-card:has(#totalOmzet),
html body.user-jerry .today-kpi-card:has(#totalTeFactureren) { display: none !important; }
/* With the two money tiles hidden, the two left share the row instead of leaving a gap on wide screens. */
html body.user-jerry .today-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The "Grote letters" toggle: a monteur always has big letters. */
html body.user-jerry .mobile-menu-item--ui-scale { display: none !important; }

/* Monteurs read the whole job description on the card, in a readable colour: never cut to one line with an ellipsis
   (the compact card rule above does that below 1180px), never the old pale lavender. */
html body.user-jerry .appt-desc {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  color: var(--ink-soft) !important;
}
