/* ═══════════════════════════════════════════════════════════════
   Design system - overgenomen uit _docs/ui-template.html.
   App-specifieke componenten staan onderaan, na de scheidingslijn.
   ═══════════════════════════════════════════════════════════════ */

    /* ═══════════════════════════════════════════════════════════════
       DESIGN SYSTEM - Jingleplayer Manager
       Copy this entire <style> block into new admin pages,
       or link style.css and add page-specific overrides.
       ═══════════════════════════════════════════════════════════════ */

    :root {
      --bg: #1e1e1f;
      --panel: #2a2b2e;
      --panel-hi: #34363a;
      --muted: #6a6d75;
      --accent: #ff9f1a;
      --accent-hi: #ffb347;
      --danger: #d04040;
      --ok: #2f9e44;
      --tile: #3a3c41;
      --tile-hi: #4a4d54;
      --text: #e8e8ea;
      --text-dim: #b8bbc2;
    }

    * { box-sizing: border-box; }
    /* Zonder deze regel winnen component-displays (bijv. inline-flex) van het
       hidden-attribuut, en zie je vóór het laden van app.js beide klok-standen. */
    [hidden] { display: none !important; }
    html, body { height: 100%; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font: 16px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    }

    /* ── App Bar ─────────────────────────────────────────────────── */
    .appbar {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      background: linear-gradient(#1d1d1e, #151516);
      border-bottom: 1px solid #0007;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .appbar a.brand {
      display: flex;
      align-items: center;
      height: 54px;
      margin-top: -14px;
      margin-bottom: -14px;
    }

    .appbar-nav { display: contents; }

    .appbar-hamburger {
      display: none;
      background: none;
      border: none;
      color: var(--text);
      font-size: 22px;
      cursor: pointer;
      padding: 6px 8px;
      border-radius: 8px;
      line-height: 1;
    }
    .appbar-hamburger:hover { background: var(--panel-hi); }

    .appbar-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      background: #ff4444;
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      min-width: 18px;
      height: 18px;
      line-height: 18px;
      text-align: center;
      border-radius: 9px;
      padding: 0 4px;
      pointer-events: none;
    }

    /* ── Buttons ──────────────────────────────────────────────────── */
    .btn {
      background: #3b3d42;
      border: 0;
      color: var(--text);
      padding: 8px 12px;
      border-radius: 10px;
      cursor: pointer;
      transition: .2s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font: inherit;
      font-size: 14px;
      line-height: 1.2;
      margin: 0;
      text-decoration: none;
    }
    .btn:hover { background: #4a4d54; }
    .btn.accent { background: var(--accent); color: #1f1400; font-weight: 700; }
    .btn.accent:hover { background: var(--accent-hi); }
    .btn.danger, .btn.red { background: #6a2b2b; }
    .btn.danger:hover { background: #8b3a3a; }
    .btn.small { padding: 6px 8px; border-radius: 8px; font-size: 13px; }
    .btn:disabled, .btn.accent:disabled, .btn.danger:disabled {
      background: #3b3d42 !important;
      color: #8f939b !important;
      cursor: not-allowed;
      opacity: .8;
      filter: grayscale(.2);
    }
    a.btn { text-decoration: none; }

    .btn.loading { position: relative; color: transparent; }
    .btn.loading::after {
      content: '';
      position: absolute;
      width: 12px;
      height: 12px;
      border: 2px solid var(--accent);
      border-radius: 50%;
      border-top-color: transparent;
      animation: spin 0.8s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Page Wrapper (centered content) ─────────────────────────── */
    .page-wrap {
      max-width: 1100px;
      margin: 0 auto;
      padding: 20px 14px 40px;
    }
    .page-wrap.narrow { max-width: 620px; }
    .page-wrap.medium { max-width: 860px; }
    .page-wrap.wide { max-width: 1400px; }
    /* Paginakop met een actie rechts. */
    .page-head { display: flex; align-items: flex-start; gap: 8px 16px; flex-wrap: wrap; }
    .page-head > .grow { flex-basis: 260px; }

    .page-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
    .page-subtitle { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }

    /* ── Section Title ───────────────────────────────────────────── */
    .section-title, .form-section-title {
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--muted);
      margin: 0 0 10px;
    }

    /* ── Cards ────────────────────────────────────────────────────── */
    .card {
      background: var(--panel);
      border: 1px solid #0007;
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
    }
    .card + .card { margin-top: 16px; }

    .card h2 { margin: 0 0 8px; font-size: 18px; }
    .card p { margin: 0; color: var(--text-dim); font-size: 14px; }
    .card .btn { margin-top: 10px; }

    /* Card grid */
    .card-grid {
      display: grid;
      gap: 16px;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    .card-grid .card + .card { margin-top: 0; }

    /* ── Panels (compact card with header) ────────────────────────── */
    .panel {
      background: var(--panel);
      border: 1px solid #0007;
      border-radius: 16px;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      min-height: 0;
    }
    /* Een sectiekop voor panel, bordkolom en projectsectie. */
    .panel > h3,
    .board-col > h3 {
      margin: 0;
      padding: 11px 14px;
      background: var(--panel-hi);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--text-dim);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .panel-body { padding: 14px; }

    /* ── Hero Banner ──────────────────────────────────────────────── */
    .hero {
      background: linear-gradient(135deg, #34363a 0%, #2a2b2f 44%, #2a2130 100%);
      border: 1px solid #0007;
      border-radius: 16px;
      padding: 20px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
      margin-bottom: 16px;
    }
    .hero h1 {
      margin: 0 0 8px;
      font-size: clamp(24px, 3vw, 34px);
      line-height: 1.1;
    }
    .hero p { margin: 0; color: #c6c9d1; max-width: 75ch; }

    /* ── Landing Grid (dashboard layout) ─────────────────────────── */
    .landing-grid {
      width: min(1400px, 100%);
      margin: 0 auto;
      display: grid;
      gap: 16px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      grid-template-areas:
        "hero hero hero hero"
        "cards cards sidebar sidebar"
        "info info info info";
    }
    .landing-grid .hero { grid-area: hero; }
    .landing-main { grid-area: cards; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
    .landing-sidebar { grid-area: sidebar; display: grid; gap: 16px; align-content: start; }
    .landing-info { grid-area: info; background: var(--panel); border: 1px solid #0007; border-radius: 16px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }

    /* ── Dashboard Stats ──────────────────────────────────────────── */
    .dash-stats {
      background: var(--panel);
      border: 1px solid #0007;
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
    }
    .dash-stats-title {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--accent);
      font-weight: 700;
      margin: 0 0 12px;
    }
    .dash-stats-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }
    .dash-stat {
      background: #232529;
      border-radius: 10px;
      padding: 10px 12px;
      border: 1px solid #0005;
    }
    .dash-stat.wide { grid-column: 1 / -1; }
    .dash-stat-value {
      font-size: 22px;
      font-weight: 800;
      line-height: 1.1;
      color: #f5f5f5;
      letter-spacing: -0.5px;
    }
    .dash-stat-value.accent { color: var(--accent); }
    .dash-stat-value.danger { color: #ff8f8f; }
    .dash-stat-value.ok { color: #8ef0b4; }
    .dash-stat-label {
      font-size: 11px;
      color: #888;
      margin-top: 2px;
      line-height: 1.3;
    }

    /* Bar charts */
    .dash-bar-row { display: flex; align-items: flex-end; gap: 3px; height: 28px; margin-top: 6px; }
    .dash-bar { flex: 1; border-radius: 3px 3px 0 0; min-height: 2px; transition: height .3s; }

    /* Progress bars */
    .dash-progress { height: 6px; border-radius: 3px; background: #1a1b1e; margin-top: 8px; overflow: hidden; }
    .dash-progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }

    /* Funnel */
    .dash-funnel { display: grid; gap: 5px; }
    .dash-funnel-step { display: flex; align-items: center; gap: 10px; }
    .dash-funnel-bar-wrap { flex: 1; min-width: 0; height: 18px; background: #1a1b1e; border-radius: 4px; overflow: hidden; }
    .dash-funnel-bar { height: 100%; border-radius: 4px; min-width: 6%; transition: width .4s ease; }
    .dash-funnel-info { flex: 0 0 auto; display: flex; align-items: baseline; gap: 6px; min-width: 130px; }
    .dash-funnel-count { font-size: 15px; font-weight: 800; color: #f5f5f5; min-width: 22px; text-align: right; }
    .dash-funnel-label { font-size: 11px; color: #888; white-space: nowrap; }

    /* ── Tables ───────────────────────────────────────────────────── */
    .data-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }
    .data-table thead th {
      position: sticky;
      top: 0;
      background: var(--panel-hi);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: .06em;
      color: var(--text-dim);
      padding: 10px 14px;
      text-align: left;
      border-bottom: 1px solid #0005;
    }
    .data-table tbody td {
      padding: 10px 14px;
      border-bottom: 1px solid #0003;
      vertical-align: middle;
    }
    .data-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
    .data-table tbody tr:last-child td { border-bottom: none; }
    .data-table thead th.num { text-align: right; }
    .data-table tfoot td { padding: 10px 14px; border-top: 1px solid #0005; font-weight: 800; }
    .data-table tfoot td.num { color: var(--accent); }
    .data-table strong { font-weight: 600; }
    .data-table .num form { display: inline-block; }
    .data-table .task-open { font-weight: 600; color: var(--text); text-decoration: none; }
    .data-table .task-open:hover { color: var(--accent); }

    /* ── Forms ────────────────────────────────────────────────────── */
    .form-grid {
      display: grid;
      grid-template-columns: repeat(12, 1fr);
      gap: 12px;
      padding: 10px 0;
    }
    .col-12 { grid-column: span 12; }
    .col-6 { grid-column: span 6; }
    .col-4 { grid-column: span 4; }
    .col-3 { grid-column: span 3; }

    label {
      display: block;
      margin: 4px 0;
      color: var(--text-dim);
      font-size: 13px;
    }
    input[type=text],
    input[type=password],
    input[type=email],
    input[type=number],
    input[type=date],
    textarea,
    select {
      width: 100%;
      padding: 9px 12px;
      border-radius: 8px;
      border: 1px solid #3a3c41;
      background: var(--bg);
      color: var(--text);
      font: inherit;
      font-size: 14px;
      transition: border-color .2s;
    }
    input:focus, textarea:focus, select:focus {
      outline: none;
      border-color: var(--accent);
    }
    textarea { resize: vertical; min-height: 80px; }
    input[type=checkbox] { cursor: pointer; accent-color: var(--accent); }

    .form-section-title { margin: 16px 0 8px; }

    /* ── Toggle Switch ───────────────────────────────────────────── */
    .toggle-switch {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
    }
    .toggle-switch input { display: none; }
    .toggle-switch .track {
      position: relative;
      width: 38px;
      height: 22px;
      background: #555;
      border-radius: 11px;
      transition: background .2s;
    }
    .toggle-switch .track::after {
      content: '';
      position: absolute;
      top: 3px;
      left: 3px;
      width: 16px;
      height: 16px;
      background: #fff;
      border-radius: 50%;
      transition: transform .2s;
    }
    .toggle-switch input:checked + .track {
      background: var(--accent);
    }
    .toggle-switch input:checked + .track::after {
      transform: translateX(16px);
    }
    .toggle-switch .label {
      font-size: 14px;
      color: var(--text);
    }

    /* ── Modal / Dialog ──────────────────────────────────────────── */
    .modal {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, .6);
      backdrop-filter: blur(4px);
      /* Boven het taakdetail-zijpaneel (400/401), onder de toasts (500), zodat
         een modal die je vanuit dat paneel opent niet achter de blur valt. */
      z-index: 450;
    }
    .modal.open { display: flex; }

    .dialog {
      width: min(520px, 92vw);
      background: var(--panel);
      border: 1px solid #0006;
      border-radius: 16px;
      padding: 18px;
    }
    .dialog.wide { width: min(780px, 95vw); }

    .dialog-titlebar {
      margin: -18px -18px 14px;
      min-height: 52px;
      padding: 12px 18px;
      border-radius: 16px 16px 0 0;
      background: linear-gradient(180deg, #7a216d 0%, #66155b 55%, #4d0f45 100%);
      border-bottom: 1px solid rgba(0, 0, 0, .28);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .dialog-titlebar h4 {
      margin: 0;
      color: #fff;
      font-size: 15px;
      font-weight: 800;
      letter-spacing: .03em;
      text-shadow: 0 1px 1px rgba(0, 0, 0, .28);
    }

    .dialog h4 { margin: 0 0 10px; }
    .dialog > p { font-size: 14px; }
    .dialog .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

    /* ── Flash Messages / Alerts ──────────────────────────────────── */
    .flash {
      padding: 12px 14px;
      border-radius: 10px;
      font-size: 13px;
      margin-bottom: 12px;
    }
    .flash.ok {
      background: rgba(47, 158, 68, .15);
      border-left: 4px solid var(--ok);
      color: #c6f0d0;
    }
    .flash.err {
      background: rgba(208, 64, 64, .15);
      border-left: 4px solid var(--danger);
      color: #ffc8c8;
    }
    .flash.warn {
      background: #3a2c1b;
      border-left: 4px solid #c96a27;
      color: #f0c9a6;
    }
    .flash.info {
      background: rgba(110, 168, 215, .12);
      border-left: 4px solid #6ea8d7;
      color: #b8d8f0;
    }

    /* ── Cart Notice (inline alert) ──────────────────────────────── */
    .cart-notice {
      margin: 10px 14px 0;
      padding: 10px 12px;
      border-radius: 10px;
      border-left: 4px solid var(--accent);
      background: #3b3321;
      color: var(--text);
      font-size: 13px;
    }

    /* ── Pills / Badges ──────────────────────────────────────────── */
    .pill {
      display: inline-block;
      padding: 2px 10px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 600;
      border: 1px solid #0006;
      background: #0003;
      color: var(--text-dim);
    }
    .pill.ok { background: rgba(47, 158, 68, .2); color: #8ef0b4; border-color: rgba(47, 158, 68, .3); }
    .pill.fail { background: rgba(208, 64, 64, .2); color: #ff8f8f; border-color: rgba(208, 64, 64, .3); }
    .pill.accent { background: rgba(255, 159, 26, .2); color: var(--accent); border-color: rgba(255, 159, 26, .3); }

    /* Teller in een sectiekop (h3, h4). */
    .count {
      display: inline-block; padding: 1px 8px; border-radius: 999px;
      background: #0004; color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: 0;
    }

    /* ── Toolbar ──────────────────────────────────────────────────── */
    .toolbar {
      display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
      background: var(--panel); border: 1px solid #0007; border-radius: 12px;
      padding: 12px 14px; margin-bottom: 16px;
    }
    .spacer { flex: 1; }
    .toolbar input[type=text],
    .toolbar input[type=date],
    .toolbar select { max-width: 220px; }
    .toolbar input[type=date] { width: auto; }
    .toolbar label { margin: 0; }
    .toolbar label:not(.toggle-switch) { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
    .toolbar .muted { font-size: 13px; }
    .toolbar strong { font-size: 14px; font-weight: 600; }

    /* ── Sidebar + Content Layout ────────────────────────────────── */
    .layout-sidebar {
      display: flex;
      height: calc(100vh - 56px);
      overflow: hidden;
    }
    .layout-sidebar .sidebar {
      width: 320px;
      flex-shrink: 0;
      background: var(--panel);
      border-right: 1px solid #0005;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .layout-sidebar .sidebar-header {
      padding: 14px;
      border-bottom: 1px solid #0005;
    }
    .layout-sidebar .sidebar-list {
      flex: 1;
      overflow-y: auto;
      padding: 8px;
    }
    .layout-sidebar .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    /* Sidebar list items */
    .sidebar-item {
      padding: 10px 12px;
      border-radius: 10px;
      cursor: pointer;
      transition: background .15s;
      margin-bottom: 4px;
    }
    .sidebar-item:hover { background: var(--panel-hi); }
    .sidebar-item.active { background: var(--panel-hi); border-left: 3px solid var(--accent); }
    .sidebar-item-title { font-weight: 600; font-size: 14px; }
    .sidebar-item-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

    /* ── Chat Bubbles (support-style) ────────────────────────────── */
    .chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
    .msg-row { display: flex; }
    .msg-row.from-admin { justify-content: flex-end; }
    .msg-bubble {
      max-width: 65%;
      padding: 10px 14px;
      border-radius: 16px;
      font-size: 14px;
      line-height: 1.4;
      background: var(--panel-hi);
      color: var(--text);
    }
    .msg-row.from-admin .msg-bubble {
      background: var(--accent);
      color: #1f1400;
      border-bottom-right-radius: 4px;
    }
    .msg-row:not(.from-admin) .msg-bubble {
      border-bottom-left-radius: 4px;
    }
    .msg-time { font-size: 10px; color: var(--muted); margin-top: 4px; }

    .chat-input-area {
      padding: 12px 14px;
      border-top: 1px solid #0005;
      display: flex;
      gap: 8px;
      align-items: flex-end;
    }
    .chat-input-area textarea {
      flex: 1;
      min-height: 40px;
      max-height: 120px;
      resize: none;
    }

    /* ── Date Separator ──────────────────────────────────────────── */
    .date-separator {
      text-align: center;
      font-size: 11px;
      color: var(--muted);
      padding: 8px 0;
      position: relative;
    }
    .date-separator::before,
    .date-separator::after {
      content: '';
      position: absolute;
      top: 50%;
      width: 35%;
      height: 1px;
      background: #0005;
    }
    .date-separator::before { left: 0; }
    .date-separator::after { right: 0; }

    /* ── Progress Bar (uploads etc.) ─────────────────────────────── */
    .progress-bar {
      background: #0006;
      border-radius: 6px;
      height: 8px;
      overflow: hidden;
    }
    .progress-fill {
      background: var(--accent);
      height: 100%;
      width: 0%;
      transition: width .2s;
    }
    .progress-fill.ok { background: var(--ok); }
    .progress-fill.danger { background: var(--danger); }

    /* ── Storage Bar ─────────────────────────────────────────────── */
    .storage-bar-wrap {
      background: #1a1b1e;
      border-radius: 6px;
      height: 10px;
      overflow: hidden;
      margin-top: 6px;
    }
    .storage-bar {
      height: 100%;
      border-radius: 6px;
      transition: width .3s;
    }

    /* ── Profile Avatar ──────────────────────────────────────────── */
    .avatar {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: var(--accent);
      color: #1f1400;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      font-weight: 800;
      flex-shrink: 0;
    }
    .avatar.small { width: 32px; height: 32px; font-size: 14px; }
    .avatar.large { width: 64px; height: 64px; font-size: 28px; }

    /* ── Tabs ─────────────────────────────────────────────────────── */
    .tabs {
      display: flex;
      gap: 4px;
      border-bottom: 1px solid #0005;
      margin-bottom: 16px;
    }
    .tab {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 600;
      color: var(--text-dim);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: color .2s, border-color .2s;
      background: none;
      border-top: none;
      border-left: none;
      border-right: none;
    }
    .tab:hover { color: var(--text); }
    .tab.active { color: var(--accent); border-bottom-color: var(--accent); }

    /* ── News Card ────────────────────────────────────────────────── */
    .news-card {
      background: var(--panel);
      border: 1px solid #0007;
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .news-card-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
    .news-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
    .news-card-date { font-size: 11px; color: #999; flex-shrink: 0; }
    .news-card-title { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 700; }
    .news-card-body { font-size: 13px; line-height: 1.6; color: #c6c9d1; }
    .news-card-body p { margin: 0 0 8px; }
    .news-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 6px; border-top: 1px solid #0005; font-size: 12px; }

    /* ── Empty State ──────────────────────────────────────────────── */
    .empty-state {
      text-align: center;
      padding: 40px 20px;
      color: var(--muted);
    }
    .empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
    .empty-state p { margin: 0; font-size: 14px; }
    /* Compacte variant voor een kolom, zijpaneel of secundaire tabel; zonder icoon. */
    .empty-state.compact { padding: 18px 8px; }
    .empty-state.compact p { font-size: 13px; }

    /* ── Utilities ────────────────────────────────────────────────── */
    .muted { color: var(--text-dim); }
    .text-accent { color: var(--accent); }
    .text-ok { color: #8ef0b4; }
    .text-danger { color: #ff8f8f; }
    .flex { display: flex; }
    .flex-1 { flex: 1; }
    .gap-8 { gap: 8px; }
    .gap-16 { gap: 16px; }
    .items-center { align-items: center; }
    .justify-between { justify-content: space-between; }
    .mt-0 { margin-top: 0; }
    .mt-16 { margin-top: 16px; }
    .mb-16 { margin-bottom: 16px; }
    .mt-8 { margin-top: 8px; }
    .flex-wrap { flex-wrap: wrap; }
    .grow { flex: 1; min-width: 0; }
    .task-open { cursor: pointer; }
    /* Uitleg onder een veld of formulier. p.form-hint wint van .card p. */
    .form-hint, p.form-hint { color: var(--text-dim); font-size: 12px; line-height: 1.4; margin: 6px 0 0; }
    /* Tweede regel onder een itemtitel of naam. */
    .meta { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
    .attach-tile .meta, .note-file .meta { font-size: 11px; margin-top: 0; }

    /* ── Code / Endpoint block ────────────────────────────────────── */
    .code-block {
      background: #1a1b1e;
      border: 1px solid #0005;
      border-radius: 8px;
      padding: 10px 14px;
      font-family: 'SF Mono', Consolas, monospace;
      font-size: 13px;
      color: var(--accent);
      overflow-x: auto;
      word-break: break-all;
    }

    /* ── Responsive ──────────────────────────────────────────────── */
    @media (max-width: 1100px) {
      .landing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "hero hero" "cards cards" "sidebar sidebar" "info info";
      }
    }

    @media (max-width: 768px) {
      .appbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
      .appbar-hamburger { display: block; }
      .appbar-nav {
        display: none;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        order: 10;
        padding-top: 8px;
        border-top: 1px solid #0004;
      }
      .appbar-nav.open { display: flex; }
      .appbar-nav .btn { width: 100%; justify-content: center; }

      .form-grid { gap: 8px; }
      .col-6, .col-4, .col-3 { grid-column: span 12; }

      .dialog { width: 96vw !important; max-height: 90vh; overflow-y: auto; }

      .btn { min-height: 42px; padding: 10px 14px; font-size: 14px; }
      .btn.small { min-height: 36px; }

      .layout-sidebar { flex-direction: column; height: auto; }
      .layout-sidebar .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #0005; max-height: 40vh; }

      .card-grid { grid-template-columns: 1fr; }
      .landing-grid { grid-template-columns: 1fr; grid-template-areas: "hero" "cards" "sidebar" "info"; }
      .landing-main { grid-template-columns: 1fr; }
      .dash-stats-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 480px) {
      .appbar b { font-size: 14px; }
      .dialog { padding: 12px; }
      .page-wrap { padding: 14px 10px 30px; }
      .hero h1 { font-size: 20px; }
    }

/* ═══════════════════════════════════════════════════════════════
   APP-SPECIFIEK - Taken & Tijdregistratie
   Alles hieronder bouwt voort op de variabelen en componenten
   hierboven; geen nieuwe kleuren buiten het palet.
   ═══════════════════════════════════════════════════════════════ */

/* ── Appbar-extra's: merk, klokwidget, avatarmenu ─────────────── */
.appbar .brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: .02em;
}
/* Het hoofdlogo is een fijn ornament; onder ~50px loopt het dicht.
   Het logo-slot blijft 54px hoog (a.brand, met negatieve marges zodat de balk
   er niet hoger van wordt); het logo zelf is 50px met 2px lucht boven en onder. */
.appbar .brand .logo { height: 50px; margin: 2px 0; width: auto; display: block; }
.appbar-nav .btn.nav-active { background: var(--panel-hi); box-shadow: inset 0px -2px 0 var(--accent); }

/* Klokwidget (§4.6) */
.clockwidget { position: relative; }
.clockwidget .clock-run {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(47,158,68,.16); border: 1px solid rgba(47,158,68,.35);
  border-radius: 10px; padding: 5px 8px 5px 11px; max-width: 340px;
  cursor: pointer; transition: background .12s, border-color .12s;
}
.clockwidget .clock-run:hover, .clockwidget .clock-run:focus-visible {
  background: rgba(47,158,68,.28); border-color: rgba(47,158,68,.6); outline: none;
}
.clockwidget .clock-task {
  font-size: 13px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
.clockwidget .clock-elapsed {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 14px; color: #8ef0b4;
}
.clock-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(47,158,68,.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(47,158,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,158,68,0); }
}

.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 300;
  width: 320px; background: var(--panel); border: 1px solid #0007;
  border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  padding: 10px; display: none;
}
.dropdown.open { display: block; }
.dropdown .dd-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 8px 4px 4px;
}
.dropdown .dd-item {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px;
  background: none; border: 0; color: var(--text); width: 100%; text-align: left;
  font: inherit; font-size: 13px;
}
.dropdown .dd-item:hover { background: var(--panel-hi); }
.dropdown .dd-item .sub { font-size: 11px; color: var(--muted); }
.dropdown .dd-empty { padding: 10px; font-size: 13px; color: var(--muted); }
.dropdown input[type=text] { margin-bottom: 6px; }

/* Profielfoto's gebruiken dezelfde maten als de initialen-bolletjes, zodat
   een gebruiker mét en zonder foto even groot in beeld staat. */
img.avatar {
  object-fit: cover;
  background: var(--tile);
  display: block;
}
.avatar.xl { width: 88px; height: 88px; font-size: 34px; }

.avatar-menu { position: relative; }
.avatar-menu .avatar { cursor: pointer; }
.avatar-menu #avatarBtn { display: block; cursor: pointer; }
.avatar-menu .dropdown { width: 220px; }
.avatar-menu .dd-item { display: block; text-decoration: none; }
.avatar-menu .dd-item.active { color: var(--accent); }

/* ── Kopkaart ─────────────────────────────────────────────────── */
/* Kopkaart: welkomstkaart (Mijn bord) en hero op detailpagina's. */
.welcome-card, .user-hero {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid #0007; border-radius: 16px;
  padding: 16px 18px; margin-bottom: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
}
.welcome-card .page-subtitle, .user-hero .page-subtitle { margin: 0; }
.user-hero .md-body { margin-top: 8px; max-width: 720px; }

/* ── Kanban ───────────────────────────────────────────────────── */
/* Tekstlinks in intro's en kruimels: accentkleur, geen onderstreping. */
.page-subtitle a, .user-hero a:not(.btn), .user-stats a, .empty-state a:not(.btn) { color: var(--accent); text-decoration: none; }
.page-subtitle a:hover, .user-hero a:not(.btn):hover, .empty-state a:not(.btn):hover { text-decoration: underline; }
.project-list .proj-link { font-weight: 600; color: var(--text); text-decoration: none; }
.project-list .proj-link:hover { color: var(--accent); }
.proj-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.proj-section { margin-bottom: 16px; }
.proj-section .body { padding: 10px 12px; }
.proj-task { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.proj-task:hover { background: rgba(255,255,255,.03); }
.proj-task .t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-task .who { font-size: 12px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
.proj-task .dur { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); width: 60px; text-align: right; }
.proj-user { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; }
.proj-user .bar { flex: 1; height: 6px; background: #0004; border-radius: 3px; overflow: hidden; }
.proj-user .bar > span { display: block; height: 100%; background: var(--accent); }
.proj-user .name { width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1000px) { .proj-cols { grid-template-columns: 1fr; } }
.check-list { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; background: #0003; border: 1px solid #0005; border-radius: 10px; max-height: 180px; overflow-y: auto; }
.check-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0; cursor: pointer; }
.check-list input { width: auto; margin: 0; }
/* Menubalk-keuze op Mijn profiel: alle pagina's passen zonder scrollen. */
.nav-check-list { max-height: none; }
.task-assignee { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); margin-right: auto; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.board.client-board .task-card { cursor: pointer; }
.board-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.side-notes { padding: 10px; }
.side-notes .note-row { align-items: flex-start; }
.side-notes .note-row-title { white-space: normal; }
.side-notes .note-row-meta .side-task,
.side-notes .note-row-meta a.side-task:visited { color: var(--accent); cursor: pointer; text-decoration: none; }
.side-notes .note-row-meta .side-task:hover { text-decoration: underline; }
.side-notes .note-row-thumb { width: 40px; height: 40px; }
.board {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.board-col {
  background: var(--panel); border: 1px solid #0007; border-radius: 16px;
  display: flex; flex-direction: column; min-height: 180px; overflow: hidden;
}
.board-col .col-body { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 90px; }
.board-col.drop-hover { outline: 2px dashed var(--accent); outline-offset: -3px; }
.board-col.over-wip > h3 .count { background: rgba(208,64,64,.3); color: #ff8f8f; }

/* Taakkaart */
.task-card {
  background: var(--tile); border: 1px solid #0005; border-left: 3px solid var(--muted);
  border-radius: 12px; padding: 10px 11px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.task-card:hover { background: var(--tile-hi); }
.task-card.dragging { opacity: .45; transform: scale(.98); }
/* De linkerrand is de kleur van de gebruiker die bij de klant hoort (inline
   style op de kaart); zonder zo'n gebruiker blijft hij neutraal. Prioriteit
   staat op de pill, een lopende klok in de rand eromheen. */
.task-card.running { box-shadow: 0 0 0 1px rgba(47,158,68,.45); }

.task-title {
  font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  line-clamp: 2; overflow: hidden;
}
.task-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px;
  font-size: 11px; color: var(--muted);
}
.task-client { color: var(--muted); font-size: 11px; }
.task-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 9px; padding-top: 8px; border-top: 1px solid #0004;
}
.task-time { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-dim); }
.task-time.live { color: #8ef0b4; font-weight: 700; }

/* Prioriteit- en estimate-badges */
.pill.prio-normal { background: rgba(74,144,226,.2); color: #9ec8f5; border-color: rgba(74,144,226,.3); }
.pill.prio-high   { background: rgba(217,131,36,.22); color: #f0c184; border-color: rgba(217,131,36,.35); }
.pill.prio-urgent, .pill.deadline-past { background: rgba(208,64,64,.25); color: #ff9f9f; border-color: rgba(208,64,64,.4); }
.pill.est  { background: #0004; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pill.tiny { padding: 1px 7px; font-size: 10px; }
.pill.meeting { background: rgba(181,101,216,.22); color: #dcb3f0; border-color: rgba(181,101,216,.4); }
.clockwidget .clock-run.meeting { background: rgba(181,101,216,.16); border-color: rgba(181,101,216,.4); }
.clockwidget .clock-run.meeting .clock-dot { background: #b565d8; box-shadow: 0 0 0 0 rgba(181,101,216,.6); }
.clockwidget .clock-run.meeting .clock-elapsed { color: #dcb3f0; }

/* Terugleg-dropzone (§4.2) */
.release-zone {
  margin-top: 16px; border: 2px dashed #4a4d54; border-radius: 14px;
  padding: 18px; text-align: center; color: var(--muted); font-size: 14px;
  display: none;
}
body.dragging-task .release-zone { display: block; }
.release-zone.drop-hover { border-color: var(--accent); color: var(--accent); background: #3b332133; }

/* ── Teamborden ───────────────────────────────────────────────── */
.team-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.team-board { background: var(--panel); border: 1px solid #0007; border-radius: 16px; overflow: hidden; }
.team-board-head {
  padding: 12px 14px; background: var(--panel-hi); display: flex; align-items: center; gap: 10px;
}
.team-board-head .who { flex: 1; min-width: 0; }
.team-board-head .name { font-weight: 700; font-size: 14px; }
.team-board-head .sub {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  /* Eén regel: een lange taaknaam mag de kop niet uit elkaar duwen. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-board-head .sub.live { color: #8ef0b4; }
.team-mini-col { padding: 8px 10px; }
.team-mini-col h4 {
  margin: 6px 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700;
}
.team-mini-col .task-card { padding: 8px 9px; }
.team-mini-col .task-title { font-size: 13px; margin-bottom: 4px; }

/* ── Te doen / backlog ────────────────────────────────────────── */
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.panel-body.todo-list { padding: 10px; }
.todo-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--tile); border: 1px solid #0005; border-radius: 12px; padding: 10px 12px;
}
.todo-row .task-meta { margin-top: 4px; }
.todo-row .t { font-weight: 600; font-size: 14px; }

.collapse-bar {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: var(--panel-hi); border: 1px solid #0007; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; color: var(--text); font: inherit; font-size: 14px;
  font-weight: 600; text-align: left;
}
.collapse-bar:hover { background: #3d4046; }
.collapse-bar .chev { transition: transform .2s; color: var(--muted); }
.collapse-bar.open .chev { transform: rotate(90deg); }
.collapse-body { display: none; margin-top: 12px; }
.collapse-body.open { display: block; }

/* Tabbladen zijn hier links (server-side filters); geen onderstreping. */
a.tab { text-decoration: none; }
a.note-row { text-decoration: none; color: inherit; }
.tabs .btn { align-self: center; }

.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text); }
.data-table th .arrow { opacity: .5; font-size: 10px; }

/* ── Tijdoverzicht ────────────────────────────────────────────── */
.day-block { margin-bottom: 14px; }
.day-head {
  display: flex; align-items: baseline; gap: 10px; justify-content: space-between;
  padding: 8px 4px; border-bottom: 1px solid #0005; margin-bottom: 6px;
}
.day-head .d { font-weight: 700; font-size: 14px; }
.day-head .t { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 13px; }
.day-head.today .d { color: var(--accent); }
.day-head .d .muted { font-weight: 400; }
.day-head.total { border-top: 1px solid #0005; border-bottom: 0; margin-top: 8px; }
.day-head.total .t { font-weight: 800; color: var(--accent); }

.entry-row {
  display: grid; grid-template-columns: 130px 1fr 90px auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 10px; font-size: 13px;
}
.entry-row:hover { background: rgba(255,255,255,.03); }
.entry-row.incomplete { background: rgba(208,64,64,.10); border-left: 3px solid var(--danger); }
.entry-row.auto-closed { background: #3a2c1b66; border-left: 3px solid #c96a27; }
.entry-times { font-variant-numeric: tabular-nums; color: var(--text-dim); }
.entry-task { min-width: 0; }
.entry-task a { color: var(--text); text-decoration: none; font-weight: 600; }
.entry-task a:hover { color: var(--accent); }
.entry-note { color: var(--muted); font-size: 12px; }
.entry-dur { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.entry-actions { display: flex; gap: 5px; }
.quick-start { width: 74px; padding: 5px 8px !important; font-size: 13px !important; }

.source-icon { font-size: 12px; opacity: .8; cursor: help; }

/* ── Rapportage ───────────────────────────────────────────────── */
.report-row { cursor: pointer; }
.report-row td:first-child { font-weight: 600; }
.report-child { background: rgba(0,0,0,.16); }
.report-child td { font-size: 12px; }
.indent-1 { padding-left: 28px !important; }
.indent-2 { padding-left: 48px !important; }
.indent-3 { padding-left: 68px !important; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Toasts ───────────────────────────────────────────────────── */
#toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  background: var(--panel-hi); border: 1px solid #0007; border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 11px 14px; font-size: 13px; color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,.45); max-width: 340px;
  animation: toast-in .22s ease-out;
}
.toast.ok  { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.leaving { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in  { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(6px); } }

/* ── Taakdetail-zijpaneel (§4.5) ──────────────────────────────── */
.sidepanel-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px);
  z-index: 400; display: none;
}
.sidepanel-backdrop.open { display: block; }
.sidepanel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw);
  background: var(--bg); border-left: 1px solid #0007; z-index: 401;
  transform: translateX(100%); transition: transform .22s ease;
  display: flex; flex-direction: column; overflow: hidden;
}
.sidepanel.open { transform: translateX(0); }
/* Notitie-leespaneel: boven het taakdetail (400/401), onder de modals (450). */
.note-panel-backdrop { z-index: 410; }
.note-panel { z-index: 411; width: min(560px, 100vw); }
.note-view { padding: 0; }
.note-view .note-editor { padding: 0; min-height: 0; border: 0; }
.note-view-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Links naar taak of vergadering in de kop van het leespaneel en op Bijlagen: zoals de taaklink. */
.note-view-meta a, .note-view-meta .task-open, .attach-group-head a, .attach-group-head .task-open { color: var(--accent); text-decoration: none; cursor: pointer; }
.note-view-meta a:hover, .note-view-meta .task-open:hover, .attach-group-head a:hover, .attach-group-head .task-open:hover { text-decoration: underline; }
.note-view-files { margin-top: 18px; }
.sidepanel-head {
  padding: 14px 16px; background: linear-gradient(#2a2b2f, #232427);
  border-bottom: 1px solid #0006; display: flex; align-items: flex-start; gap: 10px;
}
.sidepanel-body { flex: 1; overflow-y: auto; padding: 16px; }

/* Inline bewerkbare velden */
.inline-field { margin-bottom: 12px; }
.inline-field > label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inline-value {
  padding: 7px 10px; border-radius: 8px; border: 1px solid transparent; cursor: text;
  font-size: 14px; min-height: 36px;
}
.inline-value:hover { border-color: #3a3c41; background: #00000022; }
.inline-value.empty { color: var(--muted); font-style: italic; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.md-body { font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.md-body h3, .md-body h4, .md-body h5 { color: var(--text); margin: 12px 0 6px; }
.md-body p { margin: 0 0 8px; }
.md-body code { background: #1a1b1e; padding: 1px 5px; border-radius: 4px; color: var(--accent); }
.md-body a { color: var(--accent); }

.logline { display: flex; gap: 10px; font-size: 12px; padding: 5px 0; border-bottom: 1px solid #0003; }
.logline .when { color: var(--muted); white-space: nowrap; flex-shrink: 0; width: 92px; }

.inline-field > label .hint { text-transform: none; letter-spacing: 0; font-size: 11px; opacity: .8; }
.inline-value.locked { cursor: not-allowed; color: var(--text-dim); }
.inline-value.locked:hover { border-color: transparent; background: transparent; }
.inline-value.readonly { cursor: default; }
.inline-value.readonly:hover { border-color: transparent; background: transparent; }
.sidepanel-head > .btn { flex-shrink: 0; margin-top: 2px; }

/* ── Notities in het taakdetail ───────────────────────────────── */
.note-list { display: flex; flex-direction: column; gap: 6px; }
.note-row {
  display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid #0004; cursor: pointer; transition: background .12s;
}
.note-row:hover { background: var(--panel-hi); }
.note-row-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-row-preview {
  font-size: 12.5px; color: var(--text-dim); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note-row-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.note-row-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #0004; }

/* ── Notitie-editor ───────────────────────────────────────────── */
.note-dialog {
  width: min(900px, 96vw); height: min(86vh, 900px); display: flex; flex-direction: column; padding: 0;
  overflow: hidden;
}
.note-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px 6px;
  background: linear-gradient(#2a2b2f, #232427); border-bottom: 1px solid #0006;
}
.note-title {
  flex: 1; min-width: 0; font-size: 20px; font-weight: 700; background: transparent; border: 0;
  padding: 4px 6px; margin: 0; color: var(--text); outline: none;
}
.note-title::placeholder { color: var(--muted); font-weight: 600; }
.note-status { font-size: 12px; white-space: nowrap; min-width: 70px; text-align: right; }
.note-meta { font-size: 12px; padding: 4px 20px 6px; background: #232427; cursor: pointer; }
.note-meta:hover { color: var(--text-dim); }
.note-move { position: absolute; left: 20px; top: 74px; width: min(420px, 90vw); z-index: 5; }
.note-dialog { position: relative; }
.panel.meeting, .attach-group { margin-bottom: 16px; }
.meeting-head, .attach-group-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.attach-group-head { border-bottom: 1px solid #0006; }
.meeting-head .t, .attach-group-head .t { font-weight: 700; font-size: 15px; }
.meeting-notes { padding: 0 12px 12px; }
.meeting-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 16px 12px; font-size: 12px; }
.link-chip { cursor: pointer; text-decoration: none; }
.link-chip:hover { background: var(--tile-hi); }
/* Kiezer voor taken/projecten bij een vergadering */
.link-picker { background: #0003; border: 1px solid #0005; border-radius: 10px; padding: 8px; }
.link-picker .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.link-picker .chips:empty { display: none; }
.link-picker .chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--tile); border: 1px solid #0005; font-size: 12px; }
.link-picker .chip button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1; }
.link-picker .chip button:hover { color: var(--danger); }
.link-picker input[type=text] { margin: 0; }
.link-picker .dropdown, .dropdown.inline { position: relative; width: 100%; top: 4px; }
.note-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 6px 12px;
  border-bottom: 1px solid #0006; background: var(--panel);
}
.note-toolbar select { width: auto; margin: 0; padding: 4px 8px; font-size: 12px; }
.note-toolbar button {
  background: transparent; border: 1px solid transparent; color: var(--text-dim); border-radius: 6px;
  padding: 4px 8px; font-size: 12.5px; cursor: pointer; line-height: 1.3;
}
.note-toolbar button:hover { background: var(--panel-hi); color: var(--text); }
.note-toolbar button.on { background: var(--tile-hi); color: var(--accent); border-color: #0004; }
.note-toolbar .sep { width: 1px; height: 18px; background: #0006; margin: 0 4px; }
.note-editor {
  flex: 1; overflow-y: auto; padding: 16px 20px; outline: none; color: var(--text);
  font-size: 15px; line-height: 1.6; min-height: 160px; border: 2px dashed transparent;
}
.note-editor.drop-hover { border-color: var(--accent); background: rgba(255,159,26,.06); }
.note-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.note-editor h1 { font-size: 24px; margin: 14px 0 8px; color: var(--text); }
.note-editor h2 { font-size: 19px; margin: 12px 0 6px; color: var(--text); }
.note-editor h3 { font-size: 16px; margin: 10px 0 4px; color: var(--text); }
.note-editor p, .note-editor div { margin: 0 0 6px; }
.note-editor ul, .note-editor ol { margin: 4px 0 8px; padding-left: 26px; }
.note-editor blockquote {
  margin: 8px 0; padding: 4px 14px; border-left: 3px solid var(--accent); color: var(--text-dim);
  background: #0003; border-radius: 0 8px 8px 0;
}
.note-editor pre {
  background: #1a1b1e; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
}
.note-editor hr { border: 0; border-top: 1px solid #0008; margin: 12px 0; }
.note-editor img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 6px 0; }
.note-editor a { color: var(--accent); }
.note-editor ul.checklist { list-style: none; padding-left: 4px; }
.note-editor ul.checklist li { position: relative; padding-left: 28px; cursor: default; }
.note-editor ul.checklist li::before {
  content: ''; position: absolute; left: 2px; top: .3em; width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--muted); cursor: pointer; box-sizing: border-box; transition: background .1s, border-color .1s;
}
.note-editor ul.checklist li:hover::before { border-color: var(--accent); }
.note-editor ul.checklist ul.checklist { margin: 2px 0 2px 0; padding-left: 4px; }
.note-editor ul.checklist li[data-checked="1"]::before {
  background: var(--accent); border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-6' fill='none' stroke='%231e1e1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.note-editor ul.checklist li[data-checked="1"] { color: var(--muted); text-decoration: line-through; }
.note-attachment, .note-body .note-attachment {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--tile); border: 1px solid #0005; color: var(--text) !important; text-decoration: none;
  font-size: 13px; margin: 2px 2px; vertical-align: middle; user-select: none;
}
.note-attachment:hover { background: var(--tile-hi); }
.note-foot { border-top: 1px solid #0006; padding: 8px 14px; background: var(--panel); display: flex; justify-content: flex-end; }
.note-foot .btn { color: var(--muted); }
.note-foot .btn:hover { color: var(--danger); }
/* De bevestiging moet bóven de notitie-editor komen (beide zijn een .modal). */
#confirmModal { z-index: 470; }
.note-files { border-top: 1px solid #0006; padding: 8px 14px 10px; max-height: 180px; overflow-y: auto; background: var(--panel); }
.note-files-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.note-file { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.note-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-file .thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #0004; }
.note-file .thumb.icon {
  display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700;
  color: var(--text-dim); background: var(--tile); letter-spacing: .04em;
}

/* ── Bijlagen-overzicht ───────────────────────────────────────── */
.attach-group-head .note-open { cursor: pointer; }
.attach-group-head .note-open:hover { color: var(--accent); }
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 14px 16px; }
.attach-tile {
  display: block; text-decoration: none; color: var(--text); background: var(--tile); border-radius: 10px;
  padding: 8px; border: 1px solid #0004; transition: background .12s;
}
.attach-tile:hover { background: var(--tile-hi); }
.attach-tile .thumb {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: #0005; display: block;
}
.attach-tile .thumb.icon {
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px;
  color: var(--text-dim); letter-spacing: .06em;
}
.attach-tile .name { font-size: 13px; font-weight: 600; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Infobalk onderaan elke pagina (Info Bar uit de UI-template) ── */
/* De pagina vult minstens het venster, zodat de balk ook bij weinig inhoud onderaan staat. */
body:not(.login-page) { min-height: 100%; display: flex; flex-direction: column; }
body:not(.login-page) > main.page-wrap { flex: 1 0 auto; width: 100%; box-sizing: border-box; padding-bottom: 16px; }
.app-footer { flex-shrink: 0; width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 14px 16px; }
.app-footer .landing-info { padding: 10px 14px; }
.pill.ver { color: var(--muted); border-color: #0004; font-variant-numeric: tabular-nums; }
body.login-page .app-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; max-width: none; padding: 0 14px 12px; text-align: center;
}

/* ── Login (achtergrondanimatie uit background.html) ──────────── */
body.login-page {
  background: #000; overflow: hidden; height: 100%;
}
.login-stage { position: fixed; inset: 0; overflow: hidden; }
.login-stage .stage-bg {
  position: absolute; inset: 0; background: #000; opacity: 0;
  transition: opacity 10s linear; z-index: 0;
}
.login-stage.bg-active .stage-bg { opacity: 1; }
#bg-canvas {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}
.login-wrap {
  position: relative; z-index: 3; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  width: min(400px, 100%);
  background: rgba(36,37,41,.82); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.09); border-radius: 20px; padding: 26px 24px;
  box-shadow: 0 26px 70px rgba(0,0,0,.6);
}
/* Hoofdlogo boven de inlogkaart: hier is ruimte, dus mag het ornament
   op ware grootte spreken. */
.login-logo {
  display: block; width: 120px; height: auto; margin: 0 auto 20px;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .55));
}
.login-card .page-title, .login-card .page-subtitle { text-align: center; }
.login-card input + label { margin-top: 12px; }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-foot { text-align: center; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* ── Meekijken als een andere gebruiker (§4.10) ───────────────── */
.impersonate-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 16px;
  background: linear-gradient(#7a216d, #66155b);
  border-bottom: 1px solid #0007;
  font-size: 13px; color: #f4e6f1;
}
.impersonate-bar strong { color: #fff; }
.impersonate-bar .btn { margin-left: auto; }

/* ── Beheer: gebruikersdetail ─────────────────────────────────── */
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim); margin-bottom: 12px;
}
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover, .crumbs .task-open:hover { color: var(--accent); }

.user-hero { flex-wrap: wrap; }
.user-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.user-stats div { display: flex; flex-direction: column; }
.user-stats strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.user-stats span { font-size: 12px; color: var(--text-dim); }

/* Naamkolom in het gebruikersoverzicht. */
.user-table .user-link { font-weight: 600; color: var(--text); text-decoration: none; }
.user-table .user-link:hover { color: var(--accent); }

.danger-zone .rule { border: none; border-top: 1px solid #0006; margin: 16px 0 12px; }
.danger-zone select { margin-bottom: 4px; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .board-layout { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .board { grid-template-columns: 1fr; }
  .panel { overflow-x: auto; }
  /* Tabbalk met veel tabs (Beheer): scrollen in plaats van de pagina te verbreden. */
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tabs .tab { flex-shrink: 0; }
  .entry-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .entry-row .entry-task { grid-column: 1 / -1; }
  .clockwidget .clock-task { max-width: 110px; }
  .appbar .brand .logo { height: 40px; margin: 2px 0; }
  .login-logo { width: 92px; margin-bottom: 16px; }
  .sidepanel { width: 100vw; }
  .user-hero { gap: 12px; }
  .user-stats { gap: 16px; width: 100%; }
}
