/* kloklog dashboard v5.1 — UI/Gebruiker tokens 1:1 */

:root,
[data-bs-theme="light"] {
    /* UI/Gebruiker tokens — light (1:1) */
    --navy: #102C54;
    --ink: #102C54;
    --ink-soft: #3A4F6E;
    --muted: #6B7C93;
    --line: #E2E8F0;
    --paper: #FFFFFF;
    --page: #F8F8F8;
    --teal: #00A2A1;
    --primary: #00A2A1;
    --teal-dark: #008F8E;
    --mint: #69C5C4;
    --start: #00A2A1;
    --start-dark: #008F8E;
    --stop: #C53D3D;
    --stop-dark: #A83232;
    --warn: #F59F00;
    --pause: #F59F00;
    --pause-dark: #D97706;
    --shadow: 0 1px 3px rgba(16, 44, 84, 0.08);
    --radius: 10px;
    --sidebar: var(--paper);
    --sidebar-ink: var(--ink);
    --sidebar-active: var(--ink);
    --sidebar-active-bg: rgba(0, 162, 161, 0.12);
    --hours-bg: #F0F2F4;
    --focus: rgba(0, 162, 161, 0.22);
    --topbar-bg: rgba(248, 248, 248, 0.92);
    --status: #00A2A1;
    --status-muted: #6B7C93;
}

[data-bs-theme="dark"] {
    /* UI/Gebruiker tokens — dark (1:1) */
    --navy: #102C54;
    --ink: #FFFFFF;
    --ink-soft: #D1D5DB;
    --muted: #9CA3AF;
    --line: #3A3A44;
    --paper: #2A2A32;
    --page: #202028;
    --teal: #69C5C4;
    --primary: #69C5C4;
    --teal-dark: #7DD3D2;
    --mint: #69C5C4;
    --start: #69C5C4;
    --start-dark: #7DD3D2;
    --stop: #F07171;
    --stop-dark: #FF8A8A;
    --warn: #F59F00;
    --pause: #F59F00;
    --pause-dark: #FBBF24;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --radius: 10px;
    --sidebar: var(--paper);
    --sidebar-ink: var(--ink);
    --sidebar-active: var(--ink);
    --sidebar-active-bg: rgba(105, 197, 196, 0.14);
    --hours-bg: #26262F;
    --focus: rgba(105, 197, 196, 0.28);
    --topbar-bg: rgba(32, 32, 40, 0.92);
    --status: #69C5C4;
    --status-muted: #9CA3AF;
    --bs-body-bg: var(--page);
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: var(--hours-bg);
}

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: Inter, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--ink);
    background: var(--page);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

body.is-auth { background: var(--page); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--teal-dark); }
a.link-accent { color: var(--teal-dark); }
a.link-accent:hover { color: var(--teal); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand:hover { color: inherit; }
.brand-name { font-size: 1.05rem; }

/* Sidebar/top: official wordmark only (28–32px, max ~140px) */
.brand-wordmark {
    display: block;
    height: 30px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}
.brand-wordmark--dark { display: none; }
[data-bs-theme="dark"] .brand-wordmark--light { display: none; }
[data-bs-theme="dark"] .brand-wordmark--dark { display: block; }

/* Mark: favicon / apple-touch / collapsed(~390) topbar — no fake squircle crop */
.brand-mark-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 0;
    flex-shrink: 0;
}
.brand-mark--dark { display: none; }
[data-bs-theme="dark"] .brand-mark--light { display: none; }
[data-bs-theme="dark"] .brand-mark--dark { display: block; }

/* Compact topbar brand (sidebar hidden <768): wordmark; mark only ~390 collapsed */
.brand--compact { display: none; }
.brand--compact .brand-wordmark { height: 28px; max-width: 120px; }
.brand--compact .brand-mark--collapsed { display: none; }
@media (max-width: 767.98px) {
    .brand--compact { display: inline-flex; align-items: center; }
}
@media (max-width: 390px) {
    .brand--compact .brand-wordmark--light,
    .brand--compact .brand-wordmark--dark { display: none !important; }
    .brand--compact .brand-mark--collapsed.brand-mark--light { display: block; }
    .brand--compact .brand-mark--collapsed.brand-mark--dark { display: none; }
    [data-bs-theme="dark"] .brand--compact .brand-mark--collapsed.brand-mark--light { display: none; }
    [data-bs-theme="dark"] .brand--compact .brand-mark--collapsed.brand-mark--dark { display: block; }
}

.brand-logo {
    display: block;
    height: auto;
    width: auto;
    max-height: 96px;
    max-width: min(100%, 220px);
    object-fit: contain;
}
.brand-logo--dark { display: none; }
[data-bs-theme="dark"] .brand-logo--light { display: none; }
[data-bs-theme="dark"] .brand-logo--dark { display: block; }

.public-top { padding: 1rem 0 0.2rem; }
.public-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.public-home { padding: 1.25rem 0 3rem; }
.public-top .brand-logo { height: auto; max-height: 108px; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.lead-copy {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 36rem;
}

.feature-card {
    height: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
}
.feature-card strong { display: block; margin-bottom: 0.2rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.home-login { width: 100%; max-width: none; }

/* —— app chrome (self-contained; do not rely on Bootstrap display utils) —— */
.dash-shell {
    min-height: 100vh;
    display: flex;
    background: var(--page);
    color: var(--ink);
}

.dash-sidebar {
    display: none;
    width: 13.25rem;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem 0.65rem;
    background: var(--sidebar);
    color: var(--sidebar-ink);
    border-right: 1px solid var(--line);
}

.dash-sidebar .brand { color: var(--ink); padding: 0.2rem 0.45rem; }
.dash-sidebar .brand:hover { color: var(--ink); }
.dash-sidebar .brand-name { font-weight: 700; letter-spacing: -0.02em; }
.dash-sidebar .brand-wordmark { height: 30px; max-width: 140px; }
.dash-sidebar .brand-mark--sidebar { display: none; width: 28px; height: 28px; }

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    min-height: 2.75rem;
}
.sidebar-brand-row .brand--sidebar {
    min-width: 0;
    flex: 1 1 auto;
    padding: 0.15rem 0.25rem;
}
.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    color: var(--ink);
    background: color-mix(in srgb, var(--teal) 10%, transparent);
    outline: none;
}
.sidebar-toggle-ico {
    width: 20px;
    height: 20px;
    display: block;
}
.sidebar-toggle-ico--expand { display: none; }
html[data-sidebar="collapsed"] .sidebar-toggle-ico--collapse { display: none; }
html[data-sidebar="collapsed"] .sidebar-toggle-ico--expand { display: block; }


.dash-side-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dash-side-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.875rem;
    min-height: 44px;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    border-left: 0;
    transition: background 0.12s ease, color 0.12s ease;
}
.dash-side-nav .nav-ico {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}
.dash-side-nav .nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-side-nav a:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--teal) 8%, transparent);
}

.dash-side-nav a.active {
    color: var(--ink);
    background: var(--sidebar-active-bg);
    font-weight: 600;
    box-shadow: none;
    position: relative;
}
.dash-side-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 2px;
    border-radius: 2px;
    background: var(--teal);
}
.dash-side-nav a.active::after {
    content: "";
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--teal);
}

.dash-offcanvas {
    background: var(--paper);
    color: var(--ink);
}

.dash-offcanvas .dash-side-nav a {
    color: var(--ink);
    border-left-color: transparent;
}

.dash-offcanvas .dash-side-nav a:hover,
.dash-offcanvas .dash-side-nav a.active {
    color: var(--ink);
    background: var(--hours-bg);
}

.dash-offcanvas .dash-side-nav a.active {
    border-left-color: var(--teal);
}

.dash-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dash-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    min-height: 44px;
    height: 44px;
    gap: 0.5rem;
    padding: 0 0.9rem;
    background: var(--topbar-bg, var(--paper));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.dash-topbar .topbar-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-topbar .btn-ghost.logout-btn { display: none; }
.dash-topbar .user-chip {
    display: none;
    font-size: 0.84rem;
    color: var(--muted);
}
@media (min-width: 992px) {
    .dash-topbar .user-chip { display: inline; }
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    color: var(--ink);
}

.topbar-title {
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip { font-size: 0.84rem; color: var(--muted); }

.dash-page { padding-top: 1rem; padding-bottom: 1.25rem; }
.dash-page-home { padding-top: 1.1rem; }

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.page-header-compact {
    margin-bottom: 0.5rem;
}
.page-header-compact .page-title {
    font-size: 0.95rem;
    font-weight: 650;
}

.page-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.page-title-h2, h2.page-title {
    font-size: 0.9375rem;
}
.page-sub {
    margin: 0.1rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-card,
.card,
.auth-card,
.sheet-card,
.timer-bar,
.project-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.stat-card {
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}
.stat-card.is-live {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--start) 35%, transparent), var(--shadow);
}

.stat-label {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.stat-value {
    margin: 0.02rem 0 0;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.stat-meta { margin: 0.1rem 0 0; color: var(--muted); font-size: 0.72rem; }
.stat-card.is-live { border-color: color-mix(in srgb, var(--stop) 45%, var(--line)); }

.card-header,
.card-footer {
    background: var(--paper);
    border-color: var(--line);
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
    gap: 0.55rem;
}

.project-card {
    --client-accent: var(--line);
    --client-bg: var(--paper);
    display: flex;
    flex-direction: column;
    min-height: 9.5rem;
    height: 9.5rem;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--client-accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.project-card:hover {
    border-color: color-mix(in srgb, var(--client-accent) 40%, var(--line));
    border-left-color: var(--client-accent);
}

.project-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem 0.15rem;
    background: transparent;
    border-bottom: 0;
}

.project-card .card-body {
    padding: 0 0.65rem 0.35rem;
    flex: 1;
    background: transparent;
}

.project-card .card-footer {
    padding: 0.35rem 0.55rem 0.5rem;
    margin-top: auto;
    background: transparent;
    border-top: 0;
}

.project-card.is-running {
    background: color-mix(in srgb, var(--teal) 10%, var(--paper));
    border-color: color-mix(in srgb, var(--teal) 22%, var(--line));
    /* no red border */
}
.project-card.is-running .tile-live {
    color: var(--status, var(--teal));
}

.client-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 8%, transparent);
}

.sheet-table .client-badge { font-size: 0.7rem; }

:root,
[data-bs-theme="light"] {
    --client-0: #841515; --client-0-bg: #f5e6e6;
    --client-1: #158436; --client-1-bg: #e6f5ea;
    --client-2: #561584; --client-2-bg: #eee6f5;
    --client-3: #847615; --client-3-bg: #f5f3e6;
    --client-4: #157184; --client-4-bg: #e6f2f5;
    --client-5: #841551; --client-5-bg: #f5e6ee;
    --client-6: #318415; --client-6-bg: #e9f5e6;
    --client-7: #1a1584; --client-7-bg: #e6e6f5;
    --client-8: #843a15; --client-8-bg: #f5ebe6;
    --client-9: #15845a; --client-9-bg: #e6f5ef;
    --client-10: #7b1584; --client-10-bg: #f3e6f5;
    --client-11: #6c8415; --client-11-bg: #f2f5e6;
    --client-12: #154c84; --client-12-bg: #e6edf5;
    --client-13: #84152c; --client-13-bg: #f5e6e9;
    --client-14: #15841f; --client-14-bg: #e6f5e7;
    --client-15: #3f1584; --client-15-bg: #ebe6f5;
    --client-16: #845f15; --client-16-bg: #f5f0e6;
    --client-17: #15847f; --client-17-bg: #e6f5f4;
    --client-18: #841568; --client-18-bg: #f5e6f1;
    --client-19: #488415; --client-19-bg: #ecf5e6;
    --client-20: #152784; --client-20-bg: #e6e8f5;
    --client-21: #842315; --client-21-bg: #f5e8e6;
    --client-22: #158444; --client-22-bg: #e6f5ec;
    --client-23: #641584; --client-23-bg: #f0e6f5;
}

[data-bs-theme="dark"] {
    --client-0: #e18e8e; --client-0-bg: #341d1d;
    --client-1: #8ee1a6; --client-1-bg: #1d3424;
    --client-2: #bf8ee1; --client-2-bg: #2b1d34;
    --client-3: #e1d78e; --client-3-bg: #34311d;
    --client-4: #8ed3e1; --client-4-bg: #1d3034;
    --client-5: #e18ebb; --client-5-bg: #341d2a;
    --client-6: #a3e18e; --client-6-bg: #23341d;
    --client-7: #928ee1; --client-7-bg: #1e1d34;
    --client-8: #e1aa8e; --client-8-bg: #34251d;
    --client-9: #8ee1c2; --client-9-bg: #1d342c;
    --client-10: #da8ee1; --client-10-bg: #321d34;
    --client-11: #d0e18e; --client-11-bg: #2f341d;
    --client-12: #8eb7e1; --client-12-bg: #1d2934;
    --client-13: #e18e9f; --client-13-bg: #341d22;
    --client-14: #8ee195; --client-14-bg: #1d341f;
    --client-15: #ad8ee1; --client-15-bg: #261d34;
    --client-16: #e1c68e; --client-16-bg: #342d1d;
    --client-17: #8ee1de; --client-17-bg: #1d3433;
    --client-18: #e18ecc; --client-18-bg: #341d2e;
    --client-19: #b4e18e; --client-19-bg: #28341d;
    --client-20: #8e9ce1; --client-20-bg: #1d2134;
    --client-21: #e1998e; --client-21-bg: #34201d;
    --client-22: #8ee1b1; --client-22-bg: #1d3427;
    --client-23: #c98ee1; --client-23-bg: #2e1d34;
}

.project-card[data-tone="0"] { --client-accent: var(--client-0); --client-bg: var(--paper); }
.project-card[data-tone="1"] { --client-accent: var(--client-1); --client-bg: var(--paper); }
.project-card[data-tone="2"] { --client-accent: var(--client-2); --client-bg: var(--paper); }
.project-card[data-tone="3"] { --client-accent: var(--client-3); --client-bg: var(--paper); }
.project-card[data-tone="4"] { --client-accent: var(--client-4); --client-bg: var(--paper); }
.project-card[data-tone="5"] { --client-accent: var(--client-5); --client-bg: var(--paper); }
.project-card[data-tone="6"] { --client-accent: var(--client-6); --client-bg: var(--paper); }
.project-card[data-tone="7"] { --client-accent: var(--client-7); --client-bg: var(--paper); }
.project-card[data-tone="8"] { --client-accent: var(--client-8); --client-bg: var(--paper); }
.project-card[data-tone="9"] { --client-accent: var(--client-9); --client-bg: var(--paper); }
.project-card[data-tone="10"] { --client-accent: var(--client-10); --client-bg: var(--paper); }
.project-card[data-tone="11"] { --client-accent: var(--client-11); --client-bg: var(--paper); }
.project-card[data-tone="12"] { --client-accent: var(--client-12); --client-bg: var(--paper); }
.project-card[data-tone="13"] { --client-accent: var(--client-13); --client-bg: var(--paper); }
.project-card[data-tone="14"] { --client-accent: var(--client-14); --client-bg: var(--paper); }
.project-card[data-tone="15"] { --client-accent: var(--client-15); --client-bg: var(--paper); }
.project-card[data-tone="16"] { --client-accent: var(--client-16); --client-bg: var(--paper); }
.project-card[data-tone="17"] { --client-accent: var(--client-17); --client-bg: var(--paper); }
.project-card[data-tone="18"] { --client-accent: var(--client-18); --client-bg: var(--paper); }
.project-card[data-tone="19"] { --client-accent: var(--client-19); --client-bg: var(--paper); }
.project-card[data-tone="20"] { --client-accent: var(--client-20); --client-bg: var(--paper); }
.project-card[data-tone="21"] { --client-accent: var(--client-21); --client-bg: var(--paper); }
.project-card[data-tone="22"] { --client-accent: var(--client-22); --client-bg: var(--paper); }
.project-card[data-tone="23"] { --client-accent: var(--client-23); --client-bg: var(--paper); }
.project-card[data-tone="custom"] { --client-accent: var(--client-custom, var(--client-18)); --client-bg: var(--paper); }

.client-badge.client-tone-0 { color: var(--client-0); background: var(--client-0-bg); }
.client-badge.client-tone-1 { color: var(--client-1); background: var(--client-1-bg); }
.client-badge.client-tone-2 { color: var(--client-2); background: var(--client-2-bg); }
.client-badge.client-tone-3 { color: var(--client-3); background: var(--client-3-bg); }
.client-badge.client-tone-4 { color: var(--client-4); background: var(--client-4-bg); }
.client-badge.client-tone-5 { color: var(--client-5); background: var(--client-5-bg); }
.client-badge.client-tone-6 { color: var(--client-6); background: var(--client-6-bg); }
.client-badge.client-tone-7 { color: var(--client-7); background: var(--client-7-bg); }
.client-badge.client-tone-8 { color: var(--client-8); background: var(--client-8-bg); }
.client-badge.client-tone-9 { color: var(--client-9); background: var(--client-9-bg); }
.client-badge.client-tone-10 { color: var(--client-10); background: var(--client-10-bg); }
.client-badge.client-tone-11 { color: var(--client-11); background: var(--client-11-bg); }
.client-badge.client-tone-12 { color: var(--client-12); background: var(--client-12-bg); }
.client-badge.client-tone-13 { color: var(--client-13); background: var(--client-13-bg); }
.client-badge.client-tone-14 { color: var(--client-14); background: var(--client-14-bg); }
.client-badge.client-tone-15 { color: var(--client-15); background: var(--client-15-bg); }
.client-badge.client-tone-16 { color: var(--client-16); background: var(--client-16-bg); }
.client-badge.client-tone-17 { color: var(--client-17); background: var(--client-17-bg); }
.client-badge.client-tone-18 { color: var(--client-18); background: var(--client-18-bg); }
.client-badge.client-tone-19 { color: var(--client-19); background: var(--client-19-bg); }
.client-badge.client-tone-20 { color: var(--client-20); background: var(--client-20-bg); }
.client-badge.client-tone-21 { color: var(--client-21); background: var(--client-21-bg); }
.client-badge.client-tone-22 { color: var(--client-22); background: var(--client-22-bg); }
.client-badge.client-tone-23 { color: var(--client-23); background: var(--client-23-bg); }
.client-badge.client-tone-custom {
    color: var(--client-custom, var(--client-18));
    background: color-mix(in srgb, var(--client-custom, var(--client-18)) 22%, var(--paper));
}

/* Stronger badge fill so client stays distinct when project titles match */
.client-badge[class*="client-tone-"] {
    background-image: linear-gradient(
        color-mix(in srgb, currentColor 10%, transparent),
        color-mix(in srgb, currentColor 10%, transparent)
    );
}

.tile-live {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--status, var(--teal));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tile-live.is-idle { color: var(--status-muted, var(--muted)); }

.tile-name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--ink);
}

.tile-hours {
    margin: 0.2rem 0 0;
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    line-height: 1.15;
}

.tile-hours .label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tile-hours strong,
.timer-display,
.stat-value.is-timer {
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.tile-hours strong { font-size: 1.35rem; }

.tile-play { margin: 0; }

.tile-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.btn-tile-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--muted, var(--ink));
    flex: 0 0 auto;
}
.btn-tile-note:hover {
    border-color: color-mix(in srgb, var(--client-accent, var(--teal)) 45%, var(--line));
    color: var(--ink);
    background: color-mix(in srgb, var(--client-accent, var(--teal)) 10%, var(--paper));
}
.btn-tile-note svg {
    width: 0.95rem;
    height: 0.95rem;
}

.btn-timer-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    flex: 0 0 auto;
    box-shadow: 0 1px 2px color-mix(in srgb, #000 12%, transparent);
}
.btn-timer-round svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}
.btn-timer-round.btn-start,
.btn-timer-round.btn-start:hover {
    background: var(--start);
    border-color: var(--start);
    color: #fff;
}
.btn-timer-round.btn-start:hover { background: var(--start-dark); border-color: var(--start-dark); }
.btn-timer-round.btn-stop,
.btn-timer-round.btn-stop:hover {
    background: var(--stop);
    border-color: var(--stop);
    color: #fff;
}
.btn-timer-round.btn-stop:hover { background: var(--stop-dark); border-color: var(--stop-dark); }

.btn-timer-round.btn-pause,
.btn-timer-round.btn-pause:hover {
    background: var(--pause, #F59F00);
    border-color: var(--pause, #F59F00);
    color: #fff;
}
.btn-timer-round.btn-pause:hover { background: var(--pause-dark, #D97706); border-color: var(--pause-dark, #D97706); }

.btn-timer-round.btn-stop-muted,
.btn-timer-round.btn-stop-muted:hover {
    background: color-mix(in srgb, var(--stop) 22%, var(--paper));
    border: 1px solid color-mix(in srgb, var(--stop) 35%, var(--line));
    color: var(--stop);
    box-shadow: none;
}
.btn-timer-round.btn-stop-muted:hover {
    background: color-mix(in srgb, var(--stop) 32%, var(--paper));
}

.tile-timer-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}
.tile-stop { margin: 0; }

.project-card.is-paused {
    opacity: 0.78;
}
.project-card.is-paused .tile-live.is-paused,
.tile-live.is-paused {
    color: var(--pause, #F59F00);
}
.tile-timer-controls {
    max-width: calc(44px * 2 + 0.35rem);
}


#project-note-modal .modal-dialog {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.project-note-modal {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    box-shadow: var(--shadow);
}
.project-note-modal .modal-header,
.project-note-modal .modal-footer {
    border-color: var(--line);
    background: var(--paper);
}
.project-note-modal .modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.project-note-modal .pn-hint {
    margin-bottom: 0.65rem;
    color: var(--muted);
    font-size: 0.75rem;
}
.project-note-modal .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.project-note-modal .form-control {
    font-size: 0.95rem;
    color: var(--ink);
    background: var(--paper);
    border-color: var(--line);
}
.project-note-modal .form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem var(--focus);
}
.project-note-modal .pn-todo-fields {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--hours-bg);
}
.project-note-modal .modal-footer {
    gap: 0.35rem;
}
@media (max-width: 430px) {
    #project-note-modal .modal-dialog {
        max-width: 100%;
        margin: 0;
        min-height: 100%;
    }
    #project-note-modal .modal-content {
        min-height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    #project-note-modal .modal-body { flex: 1 1 auto; }
    #project-note-modal .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -1px 0 var(--line);
    }
}

.btn { border-radius: 8px; font-weight: 600; }

.btn-primary {
    --bs-btn-bg: var(--teal);
    --bs-btn-border-color: var(--teal);
    --bs-btn-hover-bg: var(--teal-dark);
    --bs-btn-hover-border-color: var(--teal-dark);
    --bs-btn-active-bg: var(--teal-dark);
    --bs-btn-active-border-color: var(--teal-dark);
    --bs-btn-color: #fff;
}

.btn-outline-primary {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--ink);
    --bs-btn-hover-bg: color-mix(in srgb, var(--ink) 6%, var(--paper));
    --bs-btn-hover-border-color: var(--ink);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-bg: transparent;
}
[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255,255,255,0.72);
    --bs-btn-hover-bg: rgba(255,255,255,0.08);
    --bs-btn-hover-border-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-ghost,
.btn-ghost:hover {
    background: transparent;
    border-color: transparent;
    color: inherit;
}
.btn-ghost:hover { background: var(--hours-bg); }

.btn-ghost-danger { color: var(--stop); background: transparent; border: 0; }
.btn-ghost-danger:hover { background: color-mix(in srgb, var(--stop) 10%, transparent); color: var(--stop-dark); }

.btn-theme {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--line);
    background: var(--hours-bg);
    color: var(--ink);
    padding: 0.28rem 0.55rem;
    min-height: 2rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.btn-theme svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-theme .icon-moon { fill: currentColor; stroke: none; }
.theme-toggle-label { font-size: 0.82rem; }

[data-bs-theme="light"] .icon-sun { display: none; }
[data-bs-theme="dark"] .icon-moon { display: none; }

.btn-start,
.btn-start:hover {
    background: var(--start);
    border-color: var(--start);
    color: #fff;
}
.btn-start:hover { background: var(--start-dark); border-color: var(--start-dark); }

.btn-stop,
.btn-stop:hover {
    background: var(--stop);
    border-color: var(--stop);
    color: #fff;
}
.btn-stop:hover { background: var(--stop-dark); border-color: var(--stop-dark); }

.btn-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 100%;
    min-height: 1.9rem;
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 7px;
}

.btn-timer svg { width: 0.9rem; height: 0.9rem; fill: currentColor; }

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 8px;
    color: var(--ink);
    background-color: var(--paper);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.18rem var(--focus);
    background-color: var(--paper);
    color: var(--ink);
}

.auth-card {
    width: min(100%, 26rem);
    padding: 1.4rem 1.25rem 1.3rem;
}

.form-card { max-width: 36rem; padding: 1.2rem 1.2rem 1.3rem; }
.sheet-card { overflow: hidden; }

.sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.7rem;
}

.sheet-sum { text-align: right; line-height: 1.15; }
.sheet-sum .label,
.sheet-sum .muted { display: block; color: var(--muted); font-size: 0.72rem; }
.sheet-sum strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }

.timer-bar { padding: 0.75rem 0.85rem; }
.timer-bar.is-running { border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); background: color-mix(in srgb, var(--teal) 8%, var(--paper)); }

.timer-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.65rem;
    align-items: center;
}

.timer-clock {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
    min-width: 5.8rem;
}

.timer-fields {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) minmax(8rem, 1.1fr);
    gap: 0.45rem;
}

.timer-hint { margin-top: 0.4rem; color: var(--muted); font-size: 0.8rem; }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    align-items: flex-end;
    padding: 0.75rem 0.9rem 0.7rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.filter-field { min-width: 8.5rem; }
.filter-search { min-width: 11rem; flex: 1; }
.filter-field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}
.filter-actions { display: flex; gap: 0.3rem; }
.filter-actions .export-dropdown { display: inline-flex; }
.filter-actions .export-dropdown .btn-outline-primary {
    font-weight: 600;
}
.filter-actions .export-dropdown .dropdown-menu {
    min-width: 8rem;
    font-size: 0.875rem;
}


.filter-field-month { min-width: 10rem; }
.filter-period-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.55rem;
    align-items: flex-end;
}
.filter-period-toggle { min-width: auto; }
.filter-period-label { visibility: hidden; }
.filter-period-toggle .btn-ghost {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    font-size: 0.8rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

@media (max-width: 430px) {
    .filter-field-month {
        width: 100%;
        min-width: 100%;
        flex: 1 1 100%;
    }
    .filter-field-month .form-select {
        width: 100%;
    }
    .filter-period-fields {
        width: 100%;
        flex: 1 1 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .filter-period-fields .filter-field {
        width: 100%;
        min-width: 0;
    }
    .filter-period-toggle {
        width: 100%;
    }
}

.sheet-table {
    --bs-table-bg: var(--paper);
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
    --bs-table-hover-bg: var(--hours-bg);
    --bs-table-striped-bg: var(--hours-bg);
    font-size: 0.84rem;
}

.sheet-table thead th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
    background: var(--paper);
}

.sheet-table thead a { color: inherit; }
.sheet-table tbody td { border-color: var(--line); vertical-align: middle; }
.note-cell { max-width: 18rem; color: var(--ink-soft); }
.sheet-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.25rem;
    justify-content: flex-end;
    align-items: center;
}
.sheet-actions .d-inline { display: inline-flex !important; }

.col-actions {
    /* 2×44px + gap — desktop hit targets match mobile */
    width: 6rem;
    min-width: 6rem;
    max-width: 6.25rem;
    white-space: nowrap;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
    line-height: 1;
}
.btn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
}
.btn-icon.btn-ghost {
    color: var(--muted);
    background: transparent;
    border: 0;
}
.btn-icon.btn-ghost:hover,
.btn-icon.btn-ghost:focus-visible {
    color: var(--ink);
    background: var(--hours-bg);
}
.btn-icon.btn-ghost-danger {
    color: var(--stop);
    background: transparent;
    border: 0;
}
.btn-icon.btn-ghost-danger:hover,
.btn-icon.btn-ghost-danger:focus-visible {
    color: var(--stop-dark);
    background: color-mix(in srgb, var(--stop) 10%, transparent);
}

/* Visually hidden label (thead Acties) */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ink-soft);
}
.empty-state p { max-width: 28rem; margin: 0.35rem auto 0.9rem; }
.pager { display: flex; gap: 0.25rem; padding: 0.65rem 0.9rem 0.8rem; }
.alert { border: 0; border-radius: 8px; }

@media (min-width: 768px) {
    .dash-sidebar {
        display: flex;
        width: 13.25rem;
        transition: width 0.18s ease;
    }
    .menu-toggle { display: none; }

    /* Collapsed icon rail — desktop only (≥768). Mobile keeps bottom nav. */
    html[data-sidebar="collapsed"] .dash-sidebar {
        width: 4rem;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
        align-items: stretch;
    }
    html[data-sidebar="collapsed"] .sidebar-brand-row {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 0.15rem;
    }
    html[data-sidebar="collapsed"] .sidebar-brand-row .brand--sidebar {
        flex: 0 0 auto;
        justify-content: center;
        padding: 0.2rem;
    }
    html[data-sidebar="collapsed"] .dash-sidebar .brand-wordmark {
        display: none !important;
    }
    html[data-sidebar="collapsed"] .dash-sidebar .brand-mark--sidebar.brand-mark--light {
        display: block;
    }
    html[data-sidebar="collapsed"] .dash-sidebar .brand-mark--sidebar.brand-mark--dark {
        display: none;
    }
    html[data-sidebar="collapsed"][data-bs-theme="dark"] .dash-sidebar .brand-mark--sidebar.brand-mark--light {
        display: none;
    }
    html[data-sidebar="collapsed"][data-bs-theme="dark"] .dash-sidebar .brand-mark--sidebar.brand-mark--dark {
        display: block;
    }
    html[data-sidebar="collapsed"] .dash-side-nav {
        align-items: center;
    }
    html[data-sidebar="collapsed"] .dash-side-nav a {
        justify-content: center;
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        gap: 0;
    }
    html[data-sidebar="collapsed"] .dash-side-nav .nav-label {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        margin: -1px !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    html[data-sidebar="collapsed"] .dash-side-nav a.active::before {
        left: 0;
        top: 0.55rem;
        bottom: 0.55rem;
    }
    html[data-sidebar="collapsed"] .dash-side-nav a.active::after {
        display: none;
    }
    html[data-sidebar="collapsed"] .sidebar-logout {
        padding-left: 0;
        padding-right: 0;
        display: flex;
        justify-content: center;
    }
    html[data-sidebar="collapsed"] .sidebar-logout .btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 8px;
        font-size: 0;
        gap: 0;
    }
    html[data-sidebar="collapsed"] .sidebar-logout-label {
        display: none;
    }
    html[data-sidebar="collapsed"] .sidebar-logout-ico {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .stat-row { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; }
    .sheet-sum { text-align: left; }
    .timer-form,
    .timer-fields { grid-template-columns: 1fr; }
    .tile-grid { grid-template-columns: 1fr; }
    .filter-field,
    .filter-search { min-width: 100%; }
    .user-chip { display: none; }
    .theme-toggle-label { display: none; }
}


/* Opdrachtgever color swatches */
.color-picker .color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.color-swatch {
  position: relative;
  margin: 0;
  cursor: pointer;
}
.color-swatch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.color-swatch .swatch-dot {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent);
}
.color-swatch input:checked + .swatch-dot {
  border-color: var(--ink, #0f172a);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ink, #0f172a) 25%, transparent);
}
.color-swatch input:focus-visible + .swatch-dot {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
}

/* Todos */
.todo-list { border-top: 1px solid var(--line); }
.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
}
.todo-item.is-done { opacity: 0.72; }
.todo-item.is-done .todo-title { text-decoration: line-through; color: var(--muted); }
.todo-check { margin: 0; flex-shrink: 0; }
.todo-check-btn {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--start);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
}
.todo-item.is-done .todo-check-btn {
    border-color: var(--start);
    background: color-mix(in srgb, var(--start) 18%, transparent);
}
.todo-body { flex: 1; min-width: 0; }
.todo-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
}
.todo-project { color: var(--ink); }
.todo-sep { color: var(--muted); }
.todo-title { font-weight: 500; }
.todo-note {
    margin-top: 0.25rem;
    font-size: 0.86rem;
    color: var(--ink-soft);
    white-space: pre-wrap;
}
.todo-meta { margin-top: 0.2rem; font-size: 0.75rem; }
.todo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: flex-end;
    flex-shrink: 0;
}
.note-inline-form { margin: 0; }
.note-inline-input {
    min-width: 10rem;
    max-width: 18rem;
    background: transparent;
    border-color: transparent;
}
.note-inline-input:hover,
.note-inline-input:focus {
    background: var(--hours-bg);
    border-color: var(--line);
}

@media (max-width: 767.98px) {
    .todo-item { flex-wrap: wrap; }
    .todo-actions { width: 100%; justify-content: flex-start; }
}


/* Tijdregels: dense on ~390px — keep action icons in one row */
@media (max-width: 430px) {
    .sheet-table {
        font-size: 0.78rem;
    }
    .sheet-table thead th,
    .sheet-table tbody td {
        padding: 0.35rem 0.3rem;
    }
    .col-hide-narrow {
        display: none !important;
    }
    .note-cell {
        max-width: 6.5rem;
    }
    .note-inline-input {
        min-width: 0;
        max-width: 6.5rem;
        font-size: 0.78rem;
        padding: 0.2rem 0.3rem;
    }
    .col-actions {
        /* 2×44px + 0.25rem gap — keep icons in one row at ~390 */
        width: 6rem;
        min-width: 6rem;
        max-width: 6.25rem;
    }
    .sheet-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.25rem;
    }
    .sheet-actions .btn-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    .sheet-card .table-responsive {
        margin: 0 -0.15rem;
    }
}

@media (max-width: 767.98px) {
    .col-hide-narrow {
        display: none !important;
    }
    .note-cell { max-width: 9rem; }
    .note-inline-input {
        min-width: 0;
        max-width: 9rem;
    }
    .sheet-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.25rem;
    }
    .sheet-actions .btn-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* Klokken toolbar: client filter + sort + tiles/table segment */
.overview-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    margin: 0 0 0.95rem;
}
.overview-toolbar .client-filter-bar {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
}
.overview-toolbar .client-filter-bar.is-empty {
    display: none;
}
.overview-view-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: auto;
    flex: 0 0 auto;
}
.overview-sort {
    margin: 0;
    min-width: 0;
}
.overview-sort-select {
    min-height: 44px;
    min-width: 10.5rem;
    max-width: 14rem;
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: none;
}
.overview-sort-select:focus {
    border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
    box-shadow: 0 0 0 3px var(--focus);
}
.view-segment {
    display: inline-flex;
    align-items: stretch;
    padding: 0.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 8%, var(--paper));
    gap: 0.1rem;
}
.view-segment-btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.view-segment-btn svg {
    width: 1.1rem;
    height: 1.1rem;
}
.view-segment-btn:hover {
    color: var(--ink);
}
.view-segment-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--teal) 55%, var(--ink));
    outline-offset: 2px;
}
.view-segment-btn.is-active {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 0 1px 2px color-mix(in srgb, #000 8%, transparent);
}
/* Teal/mint accent only on the active segment glyph */
.view-segment-btn.is-active svg {
    color: var(--teal);
    stroke: var(--teal);
}

/* Klokken table view — same .project-card DOM (idle-nudge / filter safe) */
.tile-grid[data-view="table"] {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.tile-grid[data-view="table"] .project-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.1rem;
    height: auto;
    min-height: 3.5rem;
    padding: 0.4rem 0.55rem;
    overflow: hidden;
}
.tile-grid[data-view="table"] .card-footer.tile-actions {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}
.tile-grid[data-view="table"] .btn-tile-note {
    display: none;
}
.tile-grid[data-view="table"] .tile-timer-controls {
    margin-left: 0;
    max-width: none;
}
.tile-grid[data-view="table"] .card-body {
    display: contents;
}
.tile-grid[data-view="table"] .tile-name {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.tile-grid[data-view="table"] .tile-hours {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}
.tile-grid[data-view="table"] .tile-hours .label {
    display: none;
}
.tile-grid[data-view="table"] .tile-hours strong {
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}
.tile-grid[data-view="table"] .card-header {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    justify-content: flex-start;
    gap: 0.4rem;
    min-width: 0;
}
.tile-grid[data-view="table"] .card-header .client-badge {
    max-width: 100%;
}
.tile-grid[data-view="table"] .tile-live {
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .tile-grid[data-view="table"] .btn-tile-note {
        display: inline-flex;
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
    .tile-grid[data-view="table"] .card-footer.tile-actions {
        flex-direction: row;
        gap: 0.35rem;
    }
}

@media (max-width: 430px) {
    .overview-toolbar {
        gap: 0.45rem;
    }
    .overview-view-controls {
        width: 100%;
        justify-content: flex-end;
    }
    .overview-sort-select {
        flex: 1 1 auto;
        max-width: none;
        min-width: 0;
    }
    .tile-grid[data-view="table"] .project-card {
        column-gap: 0.45rem;
        padding: 0.35rem 0.4rem;
    }
    .tile-grid[data-view="table"] .tile-hours strong {
        font-size: 0.85rem;
    }
}

/* Klokken client filter chips — ~40px circles, outline off / filled+ring on */
.client-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.95rem;
}

.client-filter-chip {
    --chip-color: var(--muted);
    box-sizing: border-box;
    width: 2.5rem; /* 40px */
    height: 2.5rem;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    border: 2px solid var(--chip-color);
    background: transparent;
    color: var(--chip-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
    flex: 0 0 auto;
}

.client-filter-chip .chip-swatch,
.client-filter-chip .chip-label {
    pointer-events: none;
    user-select: none;
}

.client-filter-chip.is-all {
    width: auto;
    min-width: 2.5rem;
    padding: 0 0.7rem;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    border-color: var(--line);
    color: var(--muted);
    background: var(--paper);
}

.client-filter-chip:hover {
    transform: translateY(-1px);
}

.client-filter-chip:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--chip-color) 55%, var(--ink));
    outline-offset: 2px;
}

.client-filter-chip.is-all:focus-visible {
    outline-color: var(--ink);
}

/* on = filled + ring; letters contrasting (light on fill) */
.client-filter-chip.is-active {
    background: var(--chip-color);
    color: #fff;
    border-color: var(--chip-color);
    box-shadow:
        0 0 0 2px var(--paper),
        0 0 0 4px color-mix(in srgb, var(--chip-color) 70%, var(--ink));
}

.client-filter-chip.is-all.is-active {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    box-shadow:
        0 0 0 2px var(--paper),
        0 0 0 4px color-mix(in srgb, var(--ink) 35%, transparent);
}

.client-filter-chip[data-tone="0"] { --chip-color: var(--client-0); }
.client-filter-chip[data-tone="1"] { --chip-color: var(--client-1); }
.client-filter-chip[data-tone="2"] { --chip-color: var(--client-2); }
.client-filter-chip[data-tone="3"] { --chip-color: var(--client-3); }
.client-filter-chip[data-tone="4"] { --chip-color: var(--client-4); }
.client-filter-chip[data-tone="5"] { --chip-color: var(--client-5); }
.client-filter-chip[data-tone="6"] { --chip-color: var(--client-6); }
.client-filter-chip[data-tone="7"] { --chip-color: var(--client-7); }
.client-filter-chip[data-tone="8"] { --chip-color: var(--client-8); }
.client-filter-chip[data-tone="9"] { --chip-color: var(--client-9); }
.client-filter-chip[data-tone="10"] { --chip-color: var(--client-10); }
.client-filter-chip[data-tone="11"] { --chip-color: var(--client-11); }
.client-filter-chip[data-tone="12"] { --chip-color: var(--client-12); }
.client-filter-chip[data-tone="13"] { --chip-color: var(--client-13); }
.client-filter-chip[data-tone="14"] { --chip-color: var(--client-14); }
.client-filter-chip[data-tone="15"] { --chip-color: var(--client-15); }
.client-filter-chip[data-tone="16"] { --chip-color: var(--client-16); }
.client-filter-chip[data-tone="17"] { --chip-color: var(--client-17); }
.client-filter-chip[data-tone="18"] { --chip-color: var(--client-18); }
.client-filter-chip[data-tone="19"] { --chip-color: var(--client-19); }
.client-filter-chip[data-tone="20"] { --chip-color: var(--client-20); }
.client-filter-chip[data-tone="21"] { --chip-color: var(--client-21); }
.client-filter-chip[data-tone="22"] { --chip-color: var(--client-22); }
.client-filter-chip[data-tone="23"] { --chip-color: var(--client-23); }
.client-filter-chip[data-tone="custom"] { --chip-color: var(--client-custom, var(--client-18)); }

.project-card.is-filter-hidden { display: none !important; }


/* Bottom nav — mobile / ~390px (no sidebar) */
.dash-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 0.2rem 0.35rem calc(0.2rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -1px 3px rgba(16, 44, 84, 0.06);
}
.dash-bottom-nav a {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.35rem 0.2rem;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-radius: 8px;
}
.dash-bottom-nav a.active {
    color: var(--teal-dark);
    background: color-mix(in srgb, var(--teal) 12%, transparent);
}
.dash-bottom-nav a:hover { color: var(--ink); }
.dash-bottom-nav .bn-ico {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}
.dash-sidebar .sidebar-logout {
    margin-top: auto;
    padding: 0.5rem 0.45rem 0.15rem;
}
.dash-sidebar .sidebar-logout .btn {
    width: 100%;
    justify-content: center;
}
.sidebar-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}
.sidebar-logout-ico {
    display: none;
    width: 20px;
    height: 20px;
}

/* Filter chips: ensure ≥44px taps on narrow screens */
@media (max-width: 767.98px) {
    .dash-bottom-nav { display: flex; }
    .menu-toggle { display: none !important; }
    .dash-offcanvas { display: none !important; }
    .dash-page { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
    .client-filter-chip,
    .client-filter-chip.is-all {
        min-width: 44px;
        min-height: 44px;
        width: 2.75rem;
        height: 2.75rem;
    }
    .btn-timer-round,
    .btn-tile-note {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    .page-header { margin-bottom: 1rem; }
}

@media (max-width: 430px) {
    .tile-grid { gap: 0.65rem; }
    .project-card { height: auto; min-height: 9.25rem; }
}

/* Idle nudge — soft amber, same family as pause tile */
.idle-nudge {
    grid-column: 1 / -1;
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    flex-wrap: wrap;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius, 0.75rem);
    border: 1px solid color-mix(in srgb, var(--pause, #F59F00) 38%, var(--line));
    background: color-mix(in srgb, var(--pause, #F59F00) 16%, var(--paper));
    color: var(--ink);
    box-shadow: none;
}
.idle-nudge-text {
    font-size: 0.9rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: color-mix(in srgb, var(--pause-dark, #D97706) 70%, var(--ink));
}
[data-bs-theme="dark"] .idle-nudge-text {
    color: color-mix(in srgb, var(--pause, #F59F00) 75%, var(--ink));
}
.idle-nudge-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
}
.idle-nudge-pause,
.idle-nudge-continue {
    min-height: 44px;
    min-width: 44px;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 650;
    font-size: 0.82rem;
}
.idle-nudge-pause {
    background: var(--pause, #F59F00);
    border: 1px solid var(--pause, #F59F00);
    color: #fff;
}
.idle-nudge-pause:hover {
    background: var(--pause-dark, #D97706);
    border-color: var(--pause-dark, #D97706);
    color: #fff;
}
.idle-nudge-continue {
    background: color-mix(in srgb, var(--paper) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--pause, #F59F00) 35%, var(--line));
    color: var(--ink);
}
.idle-nudge-continue:hover {
    background: color-mix(in srgb, var(--pause, #F59F00) 12%, var(--paper));
}
.idle-nudge-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}
.idle-nudge-dismiss:hover {
    color: var(--ink);
    background: color-mix(in srgb, var(--pause, #F59F00) 14%, transparent);
}

@media (max-width: 430px) {
    .idle-nudge {
        padding: 0.45rem 0.55rem;
        gap: 0.4rem;
    }
    .idle-nudge-text {
        font-size: 0.85rem;
        width: 100%;
    }
    .idle-nudge-actions {
        width: 100%;
        margin-left: 0;
        justify-content: stretch;
    }
    .idle-nudge-pause,
    .idle-nudge-continue {
        flex: 1 1 auto;
    }
}

/* —— Overzicht dashboard —— */
.dash-page-overzicht .page-title { letter-spacing: -0.02em; }
.overzicht-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.1rem;
}
.overzicht-stat {
    padding: 0.85rem 1rem;
}
.overzicht-stat-value {
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -0.04em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.overzicht-live-label { color: var(--teal-dark); }
.overzicht-stat.is-live {
    border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 18%, transparent), var(--shadow);
}
.overzicht-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.overzicht-panel {
    padding: 0.9rem 1rem 1rem;
}
.overzicht-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.overzicht-panel-meta {
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}
.overzicht-rank { display: flex; flex-direction: column; gap: 0.65rem; }
.overzicht-rank-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}
.overzicht-rank-pos {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 750;
    color: var(--ink-soft);
    background: color-mix(in srgb, var(--teal) 12%, var(--paper));
    border: 1px solid color-mix(in srgb, var(--teal) 18%, var(--line));
}
.overzicht-rank-body { flex: 1 1 auto; min-width: 0; }
.overzicht-rank-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.28rem;
}
.overzicht-rank-names {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.overzicht-project-name {
    font-weight: 650;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.overzicht-rank-hours {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.overzicht-bar {
    height: 0.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink) 6%, var(--paper));
    overflow: hidden;
}
.overzicht-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: color-mix(in srgb, var(--teal) 72%, var(--ink));
    min-width: 0.2rem;
}
.overzicht-help {
    padding: 0.95rem 1.05rem 1.05rem;
}
@media (max-width: 767.98px) {
    .dash-page-overzicht {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }
}
.overzicht-help-list {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.45;
}
.overzicht-help-list li + li { margin-top: 0.35rem; }
.overzicht-help-list strong { color: var(--ink); font-weight: 650; }
.empty-state-compact {
    padding: 0.85rem 0.25rem 0.35rem;
    text-align: left;
}
.empty-state-compact p { max-width: none; margin: 0; color: var(--muted); }

@media (max-width: 900px) {
    .overzicht-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
    .overzicht-stat-row {
        grid-template-columns: 1fr;
    }
    .overzicht-stat-value { font-size: 1.4rem; }
    .overzicht-rank-top { align-items: flex-start; }
    .overzicht-rank-hours { font-size: 0.85rem; }
}

/* Klokken mobiel compact (2026-09-27): rij-tegels, grotere actie-iconen */
.btn-timer-round svg,
.btn-tile-note svg {
    width: 1.15rem;
    height: 1.15rem;
}
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) { gap: 0.45rem; }
    .tile-grid:not([data-view="table"]) .project-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "head actions"
            "body actions";
        align-items: center;
        height: auto;
        min-height: 0;
    }
    .tile-grid:not([data-view="table"]) .project-card .card-header {
        grid-area: head;
        padding: 0.45rem 0.6rem 0.1rem;
        min-width: 0;
        justify-content: flex-start;
    }
    .tile-grid:not([data-view="table"]) .project-card .card-body {
        grid-area: body;
        padding: 0 0.6rem 0.45rem;
        min-width: 0;
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }
    .tile-grid:not([data-view="table"]) .tile-name {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.9375rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .tile-grid:not([data-view="table"]) .tile-hours {
        margin: 0;
        flex: 0 0 auto;
    }
    .tile-grid:not([data-view="table"]) .tile-hours .label { display: none; }
    .tile-grid:not([data-view="table"]) .tile-hours strong { font-size: 1rem; }
    .tile-grid:not([data-view="table"]) .project-card .card-footer.tile-actions {
        grid-area: actions;
        margin: 0;
        padding: 0.35rem 0.5rem 0.35rem 0;
        gap: 0.35rem;
        align-self: center;
    }
    .tile-grid:not([data-view="table"]) .tile-timer-controls { margin-left: 0; }
    .btn-timer-round svg,
    .btn-tile-note svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Klokken mobiel v2: lopende/gepauzeerde rij zonder potlood, tik op naam, stop los van pauze */
.tile-chevron { display: none; }
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) .project-card.is-running .btn-tile-note,
    .tile-grid:not([data-view="table"]) .project-card.is-paused .btn-tile-note { display: none; }
    .tile-grid:not([data-view="table"]) .tile-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .tile-grid:not([data-view="table"]) .card-body.tile-tap { min-height: 1.6rem; }
    .tile-grid:not([data-view="table"]) .tile-chevron {
        display: inline-block;
        margin-left: 0.3rem;
        color: var(--muted);
        font-size: 1.15rem;
        line-height: 1;
    }
    .tile-grid:not([data-view="table"]) .tile-timer-controls {
        gap: 0.5rem;
        max-width: none;
    }
    .tile-grid:not([data-view="table"]) .btn-timer-round.btn-stop-muted,
    .tile-grid:not([data-view="table"]) .btn-timer-round.btn-stop-muted:hover {
        background: var(--paper);
        border: 1.5px solid var(--ink);
        color: var(--ink);
    }
}

/* ===== Prullenbak: trash dropdown, undo toast, confirm modal (2026-09-27) ===== */
:root,
[data-bs-theme="light"] {
    --danger: #B42318;          /* filled destructive button */
    --danger-hover: #912018;
    --danger-text: #B42318;     /* destructive text */
    --menu-line: #E4E4E7;
    --toast-bg: #102C54;
    --disabled-ink: #9CA3AF;
    --reason-ink: #6B7280;
}
[data-bs-theme="dark"] {
    --danger: #D92D20;
    --danger-hover: #F04438;
    --danger-text: #F97066;
    --menu-line: #3A3A44;
    --toast-bg: #3A3A44;
    --disabled-ink: #6B6B75;
    --reason-ink: #9CA3AF;
}

/* Tabular digits for live clocks */
.timer-clock,
.tile-hours strong { font-variant-numeric: tabular-nums; }

/* Trash dropdown (anchored to the trash icon; panel is position:fixed via JS so
   .table-responsive overflow never clips it) */
.kl-menu { position: relative; display: inline-block; vertical-align: middle; }
.kl-menu-panel {
    position: fixed;
    z-index: 1080;
    min-width: 200px;
    padding: 4px 0;
    background: var(--paper);
    border: 1px solid var(--menu-line);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(16, 44, 84, 0.12), 0 1px 3px rgba(16, 44, 84, 0.08);
    text-align: left;
}
[data-bs-theme="dark"] .kl-menu-panel { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
.kl-menu-panel[hidden] { display: none; }
.kl-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-align: left;
    cursor: pointer;
}
.kl-menu-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.kl-menu-item:hover,
.kl-menu-item:focus-visible {
    background: var(--hours-bg);
    outline: none;
}
.kl-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--menu-line); }

/* Undo toast */
.kl-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1090;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(560px, calc(100vw - 32px));
    min-height: 48px;
    padding: 4px 6px 4px 16px;
    background: var(--toast-bg);
    color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    font-size: 14px;
    font-weight: 500;
    transform: translate(-50%, 12px);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.kl-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.kl-toast-msg { flex: 1 1 auto; min-width: 0; padding: 8px 0; }
.kl-toast.is-error .kl-toast-msg::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: #F97066;
    vertical-align: 1px;
}
.kl-toast form { margin: 0; flex-shrink: 0; }
.kl-toast-action {
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #69C5C4;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.kl-toast-action:hover,
.kl-toast-action:focus-visible { background: rgba(255, 255, 255, 0.1); outline: none; }
@media (max-width: 767.98px) {
    .kl-toast {
        left: 16px;
        right: 16px;
        max-width: none;
        bottom: calc(4.25rem + 16px + env(safe-area-inset-bottom, 0px));
        transform: translateY(12px);
    }
    .kl-toast.is-visible { transform: translateY(0); }
}

/* Confirm modal (Definitief verwijderen) */
.kl-confirm[hidden] { display: none; }
.kl-confirm {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.kl-confirm-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.kl-confirm-dialog {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--menu-line);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
}
.kl-confirm-title { margin: 0 0 8px; font-size: 18px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.kl-confirm-text { margin: 0 0 24px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.kl-confirm-text strong { color: var(--ink); font-weight: 600; }
.kl-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.kl-btn-cancel,
.kl-btn-danger {
    height: 44px;
    min-width: 44px;
    padding: 0 16px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.kl-btn-cancel { background: transparent; color: var(--ink); border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent); }
.kl-btn-cancel:hover { background: var(--hours-bg); }
.kl-btn-danger { background: var(--danger); color: #FFFFFF; border: 1px solid var(--danger); }
.kl-btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.kl-btn-cancel:focus-visible,
.kl-btn-danger:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
body.kl-modal-open { overflow: hidden; }

/* Prullenbak page */
.trash-section + .trash-section { border-top: 1px solid var(--line); }
.trash-heading {
    margin: 0;
    padding: 14px 16px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.trash-list { list-style: none; margin: 0; padding: 0; }
.trash-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
}
.trash-main { min-width: 0; flex: 1 1 auto; }
.trash-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.trash-duration { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 4px; }
.trash-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 10px;
    margin-top: 2px;
    font-size: 0.8rem;
    color: var(--muted);
}
.trash-note { color: var(--muted); font-style: italic; }
.trash-actions { display: flex; align-items: flex-start; gap: 8px; flex-shrink: 0; }
.trash-destroy { display: flex; flex-direction: column; align-items: flex-end; }
.btn-trash-restore {
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    color: var(--ink);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
}
.btn-trash-restore:hover,
.btn-trash-restore:focus-visible {
    color: var(--ink);
    background: var(--hours-bg);
    border-color: color-mix(in srgb, var(--ink) 45%, transparent);
}
.btn-trash-destroy {
    height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--danger-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btn-trash-destroy:hover:not([aria-disabled="true"]),
.btn-trash-destroy:focus-visible:not([aria-disabled="true"]) {
    background: color-mix(in srgb, var(--danger-text) 10%, transparent);
    outline: none;
}
.btn-trash-destroy[aria-disabled="true"],
.btn-trash-destroy:disabled {
    color: var(--disabled-ink);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 1;
}
.trash-reason {
    margin-top: -6px;
    padding: 0 12px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--reason-ink);
    white-space: nowrap;
}
@media (max-width: 767.98px) {
    .trash-row { flex-direction: column; align-items: stretch; }
    .trash-actions { justify-content: space-between; }
    .trash-destroy { align-items: flex-end; }
}

/* Prullenbak nav: bottom of sidebar + grey count badge */
.dash-sidebar .sidebar-trash { margin-top: auto; }
.dash-sidebar .sidebar-trash + .sidebar-logout { margin-top: 0; }
.nav-count {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--hours-bg);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
    html[data-sidebar="collapsed"] .sidebar-trash a { position: relative; }
    html[data-sidebar="collapsed"] .sidebar-trash .nav-count {
        position: absolute;
        top: 2px;
        right: 0;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        font-size: 10px;
        line-height: 14px;
    }
}
/* 390px: no sidebar and a full bottom nav, so Prullenbak lives in the topbar */
.topbar-trash {
    display: none;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--muted);
    border-radius: 8px;
    text-decoration: none;
}
.topbar-trash svg { width: 20px; height: 20px; }
.topbar-trash:hover,
.topbar-trash.active { color: var(--ink); background: var(--hours-bg); }
.topbar-trash .nav-count {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 14px;
}
@media (max-width: 767.98px) {
    .topbar-trash { display: inline-flex; }
}

/* Prullenbak polish: grey count badge + topbar trash (<768px, only rendered when count > 0) */
.nav-count {
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border: 0;
    border-radius: 999px;
    background: #6B7280;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
}
.topbar-trash {
    width: 44px;
    height: 44px;
    color: var(--ink);
}
.topbar-trash svg {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}
.topbar-trash:hover svg,
.topbar-trash.active svg { opacity: 0.85; }
.topbar-trash .nav-count {
    top: 4px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    line-height: 16px;
}
@media (min-width: 768px) {
    html[data-sidebar="collapsed"] .sidebar-trash .nav-count {
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        padding: 0 4px;
    }
}

/* ==========================================================================
   Multi-tenant: registration, onboarding, invite card, external projects
   All text/background pairs below ≥ 4.5:1 in light and dark (see report).
   ========================================================================== */
:root,
[data-bs-theme="light"] {
    --aa-primary-bg: #007A79;      /* white text 5.4:1 */
    --aa-primary-bg-hover: #006665;
    --aa-primary-ink: #FFFFFF;
    --outline-ink-border: #6B7C93; /* UI boundary ≥ 3:1 on paper */
    --chip-bg: #EEF2F7;            /* ink #102C54 on it: 12.4:1 */
    --chip-ink: var(--ink);
    --group-label: #6B7280;        /* on #FFF 4.8:1 */
    --notice-bg: #FEF3C7;          /* #92400E on it: 6.4:1 */
    --notice-ink: #92400E;
}
[data-bs-theme="dark"] {
    --aa-primary-bg: #69C5C4;      /* #102C54 text 6.9:1 */
    --aa-primary-bg-hover: #7DD3D2;
    --aa-primary-ink: #102C54;
    --outline-ink-border: #9CA3AF;
    --chip-bg: #3A3A44;            /* #E4E4E7 on it: 9.0:1 */
    --chip-ink: #E4E4E7;
    --group-label: #9CA3AF;        /* on #2A2A32 5.9:1 */
    --notice-bg: #422006;          /* #FDE68A on it: 12.1:1 */
    --notice-ink: #FDE68A;
}

.btn-aa {
    --bs-btn-bg: var(--aa-primary-bg);
    --bs-btn-border-color: var(--aa-primary-bg);
    --bs-btn-color: var(--aa-primary-ink);
    --bs-btn-hover-bg: var(--aa-primary-bg-hover);
    --bs-btn-hover-border-color: var(--aa-primary-bg-hover);
    --bs-btn-hover-color: var(--aa-primary-ink);
    --bs-btn-active-bg: var(--aa-primary-bg-hover);
    --bs-btn-active-border-color: var(--aa-primary-bg-hover);
    --bs-btn-active-color: var(--aa-primary-ink);
    --bs-btn-disabled-bg: var(--aa-primary-bg);
    --bs-btn-disabled-border-color: var(--aa-primary-bg);
    --bs-btn-disabled-color: var(--aa-primary-ink);
    font-weight: 600;
}
.btn-outline-ink {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--outline-ink-border);
    --bs-btn-bg: transparent;
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--hours-bg);
    --bs-btn-hover-border-color: var(--ink);
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-bg: var(--hours-bg);
    --bs-btn-active-border-color: var(--ink);
    font-weight: 600;
}
.kl-btn-44 { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.kl-link { color: var(--ink); text-decoration: underline; font-size: 0.875rem; }

.kl-narrow { max-width: 440px; }
.kl-card { max-width: 440px; }
.kl-card-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.35rem; color: var(--ink); }
.kl-card-sub { font-size: 0.875rem; color: var(--ink-soft); margin: 0 0 1.25rem; }
.kl-card-foot { font-size: 0.875rem; color: var(--ink-soft); margin: 1rem 0 0; text-align: center; }
.kl-card-foot a { color: var(--ink); font-weight: 600; }

.staging-ribbon {
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 4px 8px;
}
.staging-ribbon a { color: var(--notice-ink); text-decoration: underline; }
.staging-badge {
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
    letter-spacing: 0.04em;
}

/* Invite card (max 440px, centred) */
.invite-page {
    min-height: calc(100vh - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.invite-card {
    width: 100%;
    max-width: 440px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(16, 44, 84, 0.08);
    padding: 28px 24px 24px;
    color: var(--ink);
}
.invite-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.invite-lockup { height: 28px; width: auto; }
.invite-lockup--dark { display: none; }
[data-bs-theme="dark"] .invite-lockup--light { display: none; }
[data-bs-theme="dark"] .invite-lockup--dark { display: inline; }
.invite-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--chip-bg); color: var(--chip-ink);
    font-size: 14px; font-weight: 600; flex: none;
}
.invite-title { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 22px 0 6px; color: var(--ink); }
.invite-title strong { font-weight: 700; }
.invite-sub { font-size: 14px; color: var(--ink-soft); margin: 0 0 20px; }
.invite-notice {
    background: var(--notice-bg);
    color: var(--notice-ink);
    font-size: 14px;
    line-height: 1.45;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 16px;
}
.invite-notice a { color: var(--notice-ink); font-weight: 600; text-decoration: underline; display: inline-block; margin-top: 2px; }
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invite-actions .btn { height: 44px; }
@media (max-width: 340px) { .invite-actions { grid-template-columns: 1fr; } }

/* Onboarding */
.onboarding-page { padding: 8px 16px 48px; }
.onboarding-wrap { max-width: 560px; margin: 0 auto; }
.onboarding-title { font-size: 1.5rem; font-weight: 700; margin: 8px 0 4px; color: var(--ink); }
.onboarding-lead { color: var(--ink-soft); margin: 0 0 20px; }
.onboarding-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ob-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 18px 18px;
}
.ob-card.is-current { border-color: var(--aa-primary-bg); box-shadow: 0 0 0 3px var(--focus); }
.ob-head { display: flex; align-items: flex-start; gap: 12px; }
.ob-num {
    width: 28px; height: 28px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    background: var(--hours-bg); color: var(--ink-soft);
}
.ob-card.is-current .ob-num { background: var(--aa-primary-bg); color: var(--aa-primary-ink); }
.ob-card.is-done .ob-num { background: var(--chip-bg); color: var(--chip-ink); }
.ob-titles { min-width: 0; flex: 1; }
.ob-title { font-size: 1rem; font-weight: 600; margin: 3px 0 2px; color: var(--ink); }
.ob-hint { font-size: 0.875rem; color: var(--ink-soft); margin: 0; }
.ob-skip-form { margin: 0 0 0 auto; }
.ob-skip {
    border: 0; background: transparent; padding: 4px 2px; min-height: 32px;
    color: var(--ink-soft); font-size: 0.875rem; text-decoration: underline; cursor: pointer;
}
.ob-skip:hover { color: var(--ink); }
.ob-form { display: grid; gap: 10px; margin: 14px 0 0 40px; }
.ob-form .form-label { margin: 0; font-size: 0.875rem; font-weight: 600; }
.ob-done { margin: 6px 0 0 40px; font-size: 0.875rem; color: var(--ink-soft); }
@media (max-width: 430px) { .ob-form, .ob-done { margin-left: 0; } }

/* External-project chip on tiles: 20px, 12px icon, "via <owner>", max 120px */
.tile-client-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.ext-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    max-width: 160px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--chip-bg);
    color: var(--chip-ink);
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    flex: none;
}
.ext-chip-ico { width: 12px; height: 12px; flex: none; }
.ext-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.project-card .card-header.has-ext-chip { flex-wrap: wrap; }

/* ⋯ menu for external projects */
.btn-more { color: var(--ink); }
.btn-more svg { width: 18px; height: 18px; }
.kl-menu-item--ink, .kl-menu-item--ink:hover { color: var(--ink); }

/* Leave modal */
.leave-dialog { max-width: 420px; }
.leave-modal { border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.leave-modal .modal-body { padding: 22px 22px 8px; }
.leave-title { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
.leave-text { font-size: 14px; color: var(--ink-soft); }
.leave-actions { border-top: 0; padding: 12px 22px 20px; gap: 8px; }
.leave-actions .btn { min-height: 44px; margin: 0; }

/* Sidebar project groups */
.dash-sidebar .sidebar-projects { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -0.2rem; padding: 0 0.2rem; }
.sidebar-group { margin-top: 16px; }
.sidebar-group:first-child { margin-top: 16px; }
.sidebar-group-label, .group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--group-label);
    margin: 0 0 6px;
    padding: 0 0.55rem;
}
.group-label--page { margin: 16px 0 8px; padding: 0 1rem; }
.sidebar-group-empty { font-size: 12px; color: var(--ink-soft); padding: 0 0.55rem; margin: 0; }
.sidebar-project-list { list-style: none; margin: 0; padding: 0; }
.sidebar-project {
    display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 0;
    padding: 5px 0.55rem; border-radius: 8px;
    color: var(--sidebar-ink); text-decoration: none; font-size: 13px; min-height: 32px;
}
.sidebar-project:hover { background: var(--hours-bg); color: var(--sidebar-ink); }
.sidebar-project.active { background: var(--sidebar-active-bg); font-weight: 600; }
.sidebar-project-dot.client-badge { width: 8px; height: 8px; min-width: 8px; padding: 0; border-radius: 50%; background: currentColor !important; flex: none; }
.sidebar-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.sidebar-project-owner { flex: 0 0 100%; padding-left: 16px; font-size: 11px; line-height: 1.3; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[data-sidebar="collapsed"] .dash-sidebar .sidebar-projects { display: none; }

/* Members */
.member-list { display: grid; gap: 8px; }
.member-row { display: flex; align-items: center; gap: 10px; }
.member-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--chip-bg); color: var(--chip-ink); font-size: 12px; font-weight: 600; flex: none; }
.member-meta { display: flex; flex-direction: column; min-width: 0; }
.member-meta .small { color: var(--ink-soft) !important; }

/* Tijdregels: Gebruiker column always visible; other users' rows read-only */
.sheet-table .col-user { white-space: nowrap; }
.note-readonly { font-size: 0.85rem; color: var(--ink-soft); }

.dev-mail-body { white-space: pre-wrap; word-break: break-word; font-size: 0.85rem; background: var(--hours-bg); color: var(--ink); padding: 10px; border-radius: 8px; }
.dev-mail-body a { color: var(--ink); }
.public-top { padding: 16px 16px 0; }
.public-top-inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.dev-mail-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; background: var(--paper); }
.dev-mail-to { font-size: 0.875rem; color: var(--ink-soft); }
.staging-badge { text-decoration: none; }

/* Round 2 */
.kl-menu-owner { padding: 10px 14px 8px; font-size: 12px; line-height: 1.35; color: var(--ink-soft); border-bottom: 1px solid var(--line); max-width: 240px; }
.kl-menu-owner strong { color: var(--ink); font-weight: 600; }
.invite-notice--main { font-size: 15px; line-height: 1.5; padding: 14px 16px; margin-bottom: 20px; }
.invite-notice--main strong { font-weight: 700; word-break: break-all; }
.invite-back { text-align: center; margin: 14px 0 0; font-size: 14px; }
.invite-back a { color: var(--ink); text-decoration: underline; font-weight: 600; display: inline-block; padding: 6px 4px; }

/* Round 3 (a): op mobiel een lege ⋯-plek op eigen tegels, zodat het potlood gelijk staat met externe tegels */
.tile-menu-slot { display: none; }
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) .tile-menu-slot {
        display: inline-block;
        width: 44px;
        min-width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }
    .tile-grid:not([data-view="table"]) .project-card.is-running .tile-menu-slot,
    .tile-grid:not([data-view="table"]) .project-card.is-paused .tile-menu-slot { display: none; }
}

/* Round 3 (b): prullenbak in Projecten-lijst in inktkleur; rood pas bij hover/focus */
.btn-icon.btn-ghost-ink { color: var(--ink); background: transparent; border: 0; }
.btn-icon.btn-ghost-ink:hover,
.btn-icon.btn-ghost-ink:focus-visible {
    color: var(--stop-dark);
    background: color-mix(in srgb, var(--stop) 10%, transparent);
}

/* ==========================================================================
   Round 4 — UI review (P1/P2/P3)
   ========================================================================== */

/* P1.1 bottom nav: 5th tab "Meer" + bottom sheet */
.dash-bottom-nav .bn-more {
    flex: 1 1 0;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.35rem 0.2rem;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
}
.dash-bottom-nav .bn-more.active,
.dash-bottom-nav .bn-more[aria-expanded="true"] {
    color: var(--teal-dark);
    background: color-mix(in srgb, var(--teal) 12%, transparent);
}
.dash-bottom-nav .bn-more:hover { color: var(--ink); }
.dash-bottom-nav .bn-ico--more { width: 24px; height: 24px; margin: -0.2rem 0 -0.1rem; }
[data-bs-theme="light"] .dash-bottom-nav a:not(.active),
[data-bs-theme="light"] .dash-bottom-nav .bn-more:not(.active):not([aria-expanded="true"]) { color: #5B6B82; } /* 5.4:1 on #FFF */
[data-bs-theme="light"] .dash-bottom-nav a.active,
[data-bs-theme="light"] .dash-bottom-nav .bn-more.active,
[data-bs-theme="light"] .dash-bottom-nav .bn-more[aria-expanded="true"] { color: #007271; } /* ≥4.5:1 on the teal tint */

.kl-sheet-backdrop,
.kl-sheet { display: none; }
@media (max-width: 767.98px) {
    .kl-sheet-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(16, 20, 32, 0.45);
        opacity: 0;
        transition: opacity 0.18s ease;
    }
    .kl-sheet-backdrop.is-open { opacity: 1; }
    .kl-sheet:not([hidden]) {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1045;
        max-height: 85vh;
        overflow-y: auto;
        background: var(--paper);
        color: var(--ink);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
        padding: 0.35rem 0.5rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
        transform: translateY(100%);
        transition: transform 0.2s ease;
    }
    .kl-sheet.is-open { transform: translateY(0); }
    html.kl-sheet-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .kl-sheet-backdrop, .kl-sheet { transition: none !important; }
}
.kl-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    margin: 0.3rem auto 0.4rem;
}
.kl-sheet-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 48px;
    padding: 0 0.85rem;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
}
.kl-sheet-row svg { width: 20px; height: 20px; flex: none; }
.kl-sheet-row:hover,
.kl-sheet-row:focus-visible { background: var(--hours-bg); color: var(--ink); }
.kl-sheet-row:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: -2px; }
.kl-sheet-row.active { background: var(--sidebar-active-bg); font-weight: 600; }
.kl-sheet-count { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
.kl-sheet-divider { margin: 0.35rem 0.5rem; border: 0; border-top: 1px solid var(--line); opacity: 1; }
[data-bs-theme="light"] .kl-sheet .kl-theme-to-light,
[data-bs-theme="dark"] .kl-sheet .kl-theme-to-dark { display: none; }
.kl-sheet .icon-moon { fill: none; }

/* P1.2 tables -> cards below 640px (Tijdregels, Projecten, Opdrachtgevers, Gebruikers). Desktop unchanged.
   Columns: chip | date | spacer | duration | actions — the chip truncates first, the date never does. */
.kc-only { display: none; }
.sheet-table td.text-nowrap,
.kc-dur,
.kc-date { font-variant-numeric: tabular-nums; }
@media (max-width: 639.98px) {
    .sheet-card .table-responsive { overflow: visible; margin: 0; }
    .kl-cards,
    .kl-cards tbody { display: block; width: 100%; }
    .kl-cards thead { display: none; }
    .kl-cards tr {
        display: grid;
        grid-template-columns: minmax(0, max-content) max-content minmax(0, 1fr) auto auto;
        column-gap: 8px;
        row-gap: 0;
        align-items: center;
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }
    .kl-cards tbody tr:last-child { border-bottom: 0; }
    .kl-cards td {
        display: block;
        padding: 0 !important;
        border: 0 !important;
        min-width: 0;
        max-width: none !important;
        width: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        text-align: left;
    }
    .kl-cards .kc-hide,
    .kl-cards .col-hide-narrow { display: none !important; }
    .kl-cards .kc-only { display: inline; }
    .kl-cards .kc-name {
        grid-column: 1 / 4;
        grid-row: 1;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.3;
        color: var(--ink);
        overflow-wrap: anywhere;
    }
    .kl-cards .kc-dur {
        grid-column: 4;
        grid-row: 1;
        text-align: right;
        font-size: 15px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
    .kl-cards .kc-chip {
        grid-column: 1;
        grid-row: 2;
        font-size: 12px;
        color: var(--group-label);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .kl-cards .kc-chip .client-badge,
    .kl-cards .kc-chip .ext-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
    .kl-cards .kc-chip .tile-client-line { max-width: 100%; }
    .kl-cards .kc-chip a { color: var(--group-label); text-decoration: underline; }
    .kl-cards .kc-date {
        grid-column: 2;
        grid-row: 2;
        font-size: 12px;
        color: var(--group-label);
        white-space: nowrap;
    }
    .kl-cards tr:not(:has(.kc-date)) .kc-chip { grid-column: 1 / 5; }
    .kl-cards .kc-chip--wide { grid-column: 1 / 5; }
    .kl-cards .kc-chip--wide ~ .kc-date { grid-row: 3; grid-column: 1 / 5; }
    .kl-cards .kc-note {
        grid-column: 1 / 5;
        grid-row: 3;
        font-size: 13px;
        color: var(--ink-soft);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .kl-cards tr:has(.kc-chip--wide) .kc-note { grid-row: 4; }
    .kl-cards .kc-note--empty { display: none !important; }
    .kl-cards .kc-note .note-inline-input {
        min-width: 0;
        max-width: none;
        width: 100%;
        font-size: 13px;
        padding: 0.1rem 0.25rem;
        margin-left: -0.25rem;
        min-height: 0;
        height: auto;
        text-overflow: ellipsis;
    }
    .kl-cards .kc-act {
        grid-column: 5;
        grid-row: 1 / span 4;
        align-self: center;
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
    }
    .kl-cards .kc-act .btn-icon { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
    .kl-cards .kc-act .kc-btn { min-height: 44px; display: inline-flex; align-items: center; }
    .kl-cards tr.is-other-user .kc-name { color: var(--ink-soft); }
    .kl-cards .kc-chip, .kl-cards .kc-date, .kl-cards .kc-note { margin-top: 3px; }
}

/* P1.3 Tijdregels filters: collapse behind "Filters (n)" below 640px; Maand stays visible; auto-apply */
.tr-filter-mobilebar { display: none; }
.tr-filter-btn { gap: 0.4rem; padding: 0 0.85rem; font-size: 0.9rem; border-width: 1px; }
.tr-filter-btn svg { width: 18px; height: 18px; }
@media (max-width: 639.98px) {
    .tr-filters { align-items: center; gap: 0.5rem; }
    .tr-filter-mobilebar { display: flex; order: 0; }
    .tr-filters > .filter-field.filter-field-month { order: 1; flex: 1 1 8rem; min-width: 0; }
    .tr-filters .filter-field-month label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .tr-filters .filter-field-month .form-select {
        min-height: 44px;
        border-radius: 999px;
        border-color: var(--outline-ink-border);
        font-weight: 600;
        color: var(--ink);
        padding-left: 1rem;
    }
    .tr-filters > .filter-field,
    .tr-filters > .filter-period-fields,
    .tr-filters > .filter-actions { order: 2; }
    .tr-filters:not(.is-expanded) > .filter-field:not(.filter-field-month),
    .tr-filters:not(.is-expanded) > .filter-period-fields,
    .tr-filters:not(.is-expanded) > .filter-actions { display: none !important; }
    .tr-filters.is-expanded > .filter-field:not(.filter-field-month):not([hidden]),
    .tr-filters.is-expanded > .filter-period-fields:not([hidden]) { flex: 1 1 100%; min-width: 0; }
    .tr-filters.is-expanded .form-select,
    .tr-filters.is-expanded .form-control { min-height: 44px; }
    .tr-filters .filter-period-label { display: none; }
    .tr-filters .filter-period-toggle .btn { min-height: 44px; }
    .tr-filters .filter-actions .tr-filter-apply { display: none !important; }
    .tr-filters .filter-actions .btn { min-height: 44px; display: inline-flex; align-items: center; }
}

/* P2.7 hyphen spacing: Inter's tnum feature also swaps '-' for a wide tabular hyphen, so body text
   must not use tabular-nums (numbers opt in explicitly: durations, dates, timers). */
body { font-variant-numeric: normal; }
.tile-hours strong, .kc-dur, .kc-date, .sheet-sum strong, .timer-clock, .today-dur { font-variant-numeric: tabular-nums; }

/* P2.4 Klokken filter chips: full client name + 8px dot, single scrollable row, 36px, active navy */
.overview-toolbar { flex-wrap: nowrap; }
.overview-toolbar .client-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px;
    margin: -4px 0;
    gap: 8px;
}
.overview-toolbar .client-filter-bar::-webkit-scrollbar { display: none; }
.client-filter-chip,
.client-filter-chip.is-all {
    position: relative;
    width: auto !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 14px !important;
    gap: 8px;
    border: 1px solid var(--outline-ink-border);
    background: var(--paper);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    box-shadow: none;
}
.client-filter-chip::after { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; } /* 44px hit area */
.client-filter-chip:hover { transform: none; background: var(--hours-bg); }
.client-filter-chip .chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-color); flex: none; }
.client-filter-chip .chip-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.client-filter-chip.is-active,
.client-filter-chip.is-all.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #FFFFFF;          /* 13.9:1 on #102C54 */
    box-shadow: none;
}
.client-filter-chip.is-active .chip-dot { box-shadow: 0 0 0 1.5px #FFFFFF; }
[data-bs-theme="dark"] .client-filter-chip.is-active,
[data-bs-theme="dark"] .client-filter-chip.is-all.is-active {
    background: #DCE6F5;     /* navy text on it 11.6:1; navy on the dark page would vanish */
    border-color: #DCE6F5;
    color: var(--navy);
}
[data-bs-theme="dark"] .client-filter-chip.is-active .chip-dot { box-shadow: 0 0 0 1.5px var(--navy); }
.client-filter-chip:focus-visible { outline: 2px solid var(--teal-dark); outline-offset: 2px; }

/* P2.5 sort as icon at the end of the chip row on mobile; no grid/list toggle there */
.overview-sort { position: relative; display: inline-flex; align-items: center; }
.overview-sort-ico { display: none; }
@media (max-width: 767.98px) {
    .overview-toolbar { gap: 8px; margin-bottom: 0.75rem; }
    .overview-view-controls { width: auto !important; flex: 0 0 auto; margin-left: 0; }
    .view-segment { display: none !important; }
    .overview-sort-select {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px;
        padding: 0 !important;
        color: transparent !important;
        background-image: none !important;
        border-color: var(--outline-ink-border) !important;
        border-radius: 999px;
        cursor: pointer;
        text-indent: -999px;
    }
    .overview-sort-select option { color: var(--ink); text-indent: 0; }
    .overview-sort-ico {
        display: block;
        position: absolute;
        left: 50%;
        top: 50%;
        width: 20px;
        height: 20px;
        transform: translate(-50%, -50%);
        color: var(--ink);
        pointer-events: none;
    }
}

/* P2.6 empty duration: grey 0:00, right-aligned directly left of the buttons */
.tile-hours strong.is-zero { color: var(--group-label); font-weight: 600; }
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) .tile-hours { margin-left: auto; text-align: right; }
    .tile-grid:not([data-view="table"]) .project-card .card-footer.tile-actions { padding-left: 0.25rem; }
}

/* P2.8 note button: speech bubble (Lucide message-square) 18px; teal dot when the active entry has a note */
.btn-tile-note { position: relative; color: var(--ink); }
.btn-tile-note svg.note-ico { width: 18px !important; height: 18px !important; }
.btn-tile-note .note-dot { display: none; }
.btn-tile-note.has-note .note-dot {
    display: block;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 1.5px var(--paper);
}
/* 'via' chip always on the client-chip line; client chip truncates */
.tile-client-line { flex-wrap: nowrap !important; max-width: 100%; min-width: 0; overflow: hidden; }
.project-card .card-header.has-ext-chip { flex-wrap: nowrap; }
.tile-client-line .client-badge {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: 100%;
}
.tile-client-line .ext-chip { flex: 0 0 auto; }
/* 390: ⋯ on external tiles = 32px borderless; note + play stay 44px; own tiles reserve the same 32px */
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) .project-card .kl-menu--more .btn-more {
        width: 32px;
        min-width: 32px;
        height: 44px;
        min-height: 44px;
        border: 0;
        background: transparent;
        padding: 0;
    }
    .tile-grid:not([data-view="table"]) .tile-menu-slot { width: 32px; min-width: 32px; flex-basis: 32px; }
}

/* P3.11 list pages at 390: "Nieuwe …" = full-width AA teal button under the heading */
@media (max-width: 639.98px) {
    .sheet-head:has(.kl-new-btn) { flex-wrap: wrap; }
    .sheet-head:has(.kl-new-btn) > div:first-child { flex: 1 1 100%; }
    .page-header:has(.kl-new-btn) { align-items: stretch; text-align: left; }
    .page-header:has(.kl-new-btn) > div:last-child { width: 100%; }
    .kl-new-btn {
        order: 5;
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.95rem;
        border-radius: 10px;
    }
}

/* P3.9 /gebruikers (and other sheets) at desktop: no needless horizontal scroll */
@media (min-width: 640px) {
    .kl-cards .kc-note,
    .kl-cards .kc-chip--wide { white-space: normal; }
}

/* P3.10 Klokken desktop: compact "Vandaag" card under the tiles (last 5 entries) */
.today-card { display: none; }
@media (min-width: 768px) {
    .today-card {
        display: block;
        margin-top: 1.25rem;
        padding: 0.85rem 1rem 0.6rem;
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        max-width: 56rem;
    }
}
.today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.today-title { margin: 0; font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.today-link { font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: underline; min-height: 44px; display: inline-flex; align-items: center; }
.today-empty { margin: 0 0 0.35rem; color: var(--group-label); font-size: 0.875rem; }
.today-list { list-style: none; margin: 0; padding: 0; }
.today-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
}
.today-time { color: var(--group-label); font-variant-numeric: tabular-nums; white-space: nowrap; }
.today-main { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.today-project { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-main .client-badge { flex: none; }
.today-note { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.today-dur { font-weight: 700; color: var(--ink); white-space: nowrap; }
/* P3.9: text buttons (Verwijderen / Intrekken) size their own column instead of overflowing a 96px icon column */
@media (min-width: 640px) {
    .sheet-table .col-actions:has(.kc-btn) { width: 1% !important; min-width: 0 !important; max-width: none !important; white-space: nowrap; }
}
@media (max-width: 639.98px) {
    .kl-cards .kc-chip--wide { white-space: normal; }
}
/* contrast: filter labels were --muted (4.3:1 on paper) */
.filter-field label { color: var(--group-label); }

/* ==========================================================================
   Round 5 — UI review
   ========================================================================== */

/* R5.1 external tiles at 390: 'via <naam>' → 14px people icon + first name (12px grey)
   under the project name, on the duration line; client chip gets the full header width.
   Desktop (≥768px) keeps the header 'via' chip. */
.tile-via-inline { display: none; }
@media (max-width: 767.98px) {
    .tile-grid:not([data-view="table"]) .project-card .card-header.has-ext-chip .ext-chip { display: none; }
    .tile-grid:not([data-view="table"]) .project-card .card-body:has(.tile-via-inline) { flex-wrap: wrap; row-gap: 0.1rem; }
    .tile-grid:not([data-view="table"]) .project-card .card-body:has(.tile-via-inline) .tile-name { flex: 1 1 100%; }
    .tile-grid:not([data-view="table"]) .tile-via-inline {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        min-width: 0;
        flex: 0 1 auto;
        font-size: 12px;
        line-height: 1.2;
        color: var(--group-label);
        white-space: nowrap;
        overflow: hidden;
    }
    .tile-via-inline .tile-via-ico { width: 14px; height: 14px; flex: none; }
    .tile-via-inline .tile-via-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .tile-grid:not([data-view="table"]) .project-card .card-body:has(.tile-via-inline) .tile-hours { align-self: center; }
}

/* R5.2 Tijdregels card at 390: client chip ellipsis (was hard clip); duration fully right, on one line with the actions */
@media (max-width: 639.98px) {
    .kl-cards .kc-chip { min-width: 0; overflow: hidden; }
    .kl-cards .kc-chip .client-badge {
        display: inline-block !important;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }
    /* duration spans all rows and centres vertically, so it sits on one line with the actions, flush right */
    .kl-cards tr:has(.kc-act) .kc-dur { grid-row: 1 / span 4; align-self: center; justify-self: end; }
    .kl-cards tr:has(.kc-act):has(.kc-dur) .kc-note,
    .kl-cards tr:has(.kc-act):has(.kc-dur) .kc-chip--wide,
    .kl-cards tr:has(.kc-act):has(.kc-dur) .kc-chip--wide ~ .kc-date,
    .kl-cards tr:has(.kc-act):has(.kc-dur):not(:has(.kc-date)) .kc-chip { grid-column: 1 / 4; }
}

/* R5.3 Gebruikers at 390: client chip always on its own line */
@media (max-width: 639.98px) {
    .kl-cards .kc-chip--stack .client-badge { display: block !important; width: fit-content; max-width: 100%; margin: 0 0 0.15rem; }
}

/* R5.6 Klokken 1280: 'Vandaag' card spans the full tile row */
@media (min-width: 768px) {
    .today-card { max-width: none; width: 100%; }
}

/* R5.4 counter under the Tijdregels total ('1 regel' / 'n regels'): muted was 4.0:1 on the page background */
.sheet-sum .muted { color: var(--ink-soft); }

/* ===== Klokken v6: totalenbalk, sessietijd op lopende tegel, Vandaag met lopende regel ===== */
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.home-stat { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.7rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; min-width: 0; }
.home-stat:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--ink); }
.home-stat-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--group-label, var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-stat-value { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.home-stats.is-live .home-stat:first-child { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }

.tile-name { overflow-wrap: break-word; hyphens: auto; }
.tile-hours.is-session strong { color: var(--ink); }
.project-card.is-running .tile-hours.is-session strong { color: var(--primary); }
.tile-month { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--group-label, var(--muted)); font-variant-numeric: tabular-nums; }
.tile-month span { font-weight: 600; color: var(--ink-soft); }
.tile-grid[data-view="table"] .tile-month { display: none; }

.today-total { margin-left: 0.4rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); font-weight: 600; }
.today-row.is-running .today-time { color: var(--primary); font-weight: 600; }
.today-row.is-running .today-dur { color: var(--primary); }
.today-row.is-paused .today-time { color: var(--pause-dark); }

@media (max-width: 767.98px) {
    .home-stats { gap: 0.5rem; margin-bottom: 0.75rem; }
    .home-stat { padding: 0.5rem 0.65rem; }
    .home-stat-label { font-size: 0.64rem; }
    .home-stat-value { font-size: 1.1rem; }
    .tile-grid:not([data-view="table"]) .project-card .card-body:has(.tile-month) { flex-wrap: wrap; row-gap: 0; }
    .tile-grid:not([data-view="table"]) .tile-month { flex: 1 1 100%; order: 5; margin: 0; }
}

/* ===== Overzicht v2: week/maand, bladeren, uren per dag ===== */
.ov-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1rem; margin-bottom: 1rem; }
.ov-period { margin: 0; color: var(--ink-soft); font-weight: 600; }
.ov-controls { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ov-segment .view-segment-btn { width: auto; min-width: 0; height: 36px; min-height: 36px; padding: 0 0.95rem; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.ov-nav { display: inline-flex; align-items: center; gap: 0.35rem; }
.ov-nav-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 1.35rem; line-height: 1; text-decoration: none; }
.ov-nav-btn:hover { border-color: var(--ink); color: var(--ink); }
.ov-nav-btn.is-disabled { opacity: 0.35; }
.ov-nav-now { font-size: 0.85rem; font-weight: 600; color: var(--primary); text-decoration: none; padding: 0 0.35rem; }

.ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.ov-stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.85rem 1rem; }
.ov-stat.is-live { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.ov-stat-label { margin: 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--group-label); }
.ov-stat-value { margin: 0.1rem 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.15; }
.ov-stat-meta { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }
.ov-delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.ov-delta.is-up { color: var(--primary); }
.ov-delta.is-down { color: var(--ink-soft); }

.ov-chart-card { margin-bottom: 1rem; padding: 0.9rem 1rem 0.75rem; }
.ov-chart-link { text-decoration: none; }
.ov-chart { position: relative; height: 220px; margin: 0.75rem 0 0.25rem; padding-left: 2.1rem; }
.ov-grid { position: absolute; inset: 0 0 1.6rem 2.1rem; pointer-events: none; }
.ov-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.ov-gridline:first-child { border-top-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.ov-gridline span { position: absolute; left: -2.1rem; top: -0.55rem; width: 1.8rem; text-align: right; font-size: 0.7rem; color: var(--group-label); font-variant-numeric: tabular-nums; }
.ov-bars { position: absolute; inset: 0 0 0 2.1rem; display: flex; gap: 2px; }
.ov-col { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink-soft); }
.ov-bar-area { position: relative; flex: 1 1 auto; display: flex; align-items: flex-end; justify-content: center; }
.ov-bar { display: block; width: min(70%, 44px); background: var(--primary); border-radius: 4px 4px 0 0; transition: filter 0.12s ease; }
.ov-chart.is-maand .ov-bar { width: min(80%, 18px); }
.ov-bar-val { position: absolute; left: 0; right: 0; margin-bottom: 4px; text-align: center; font-size: 0.72rem; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ov-day { height: 1.6rem; display: flex; align-items: center; justify-content: center; gap: 0.2rem; font-size: 0.72rem; color: var(--group-label); white-space: nowrap; }
.ov-day small { font-size: inherit; opacity: 0.8; }
.ov-col.is-today .ov-day { color: var(--ink); font-weight: 700; }
.ov-col.is-future .ov-day { opacity: 0.5; }
.ov-col:hover .ov-bar { filter: brightness(1.12); }
.ov-col:hover { background: color-mix(in srgb, var(--primary) 6%, transparent); border-radius: 6px; }
.ov-col[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% - 0.5rem); left: 50%; transform: translateX(-50%);
    z-index: 3; white-space: nowrap; padding: 0.3rem 0.55rem; border-radius: 6px;
    background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 600; pointer-events: none;
}
.ov-rank-nums { display: inline-flex; align-items: baseline; gap: 0.6rem; flex: none; }
.ov-share { font-size: 0.78rem; color: var(--group-label); font-variant-numeric: tabular-nums; }

@media (max-width: 767.98px) {
    .ov-head { align-items: flex-start; }
    .ov-segment.view-segment { display: inline-flex !important; }
    .ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .ov-stat:first-child { grid-column: 1 / -1; }
    .ov-stat:first-child .ov-stat-value { font-size: 1.6rem; }
    .ov-stat { padding: 0.6rem 0.65rem; }
    .ov-stat-label { font-size: 0.62rem; }
    .ov-stat-value { font-size: 1.15rem; }
    .ov-stat-meta { font-size: 0.7rem; }
    .ov-chart { height: 180px; }
    .ov-bar-val { display: none; }
    .ov-chart.is-maand .ov-col:not(:nth-child(5n+1)) .ov-day { visibility: hidden; }
}

/* ===== Landingspagina (uitgelogd /) — lp-* ===== */
body.is-auth:has(.lp) { background: var(--page); }
.lp-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.lp-top { position: sticky; top: 0; z-index: 20; background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(8px); -webkit-backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.lp-top-inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.lp-brand { display: inline-flex; align-items: center; }
.lp-brand .brand-wordmark { height: 30px; width: auto; }
.lp-nav { display: flex; gap: 22px; margin-right: auto; }
.lp-nav a, .lp-login-link { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.lp-nav a:hover, .lp-login-link:hover { color: var(--ink); }
.lp-top-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.lp-login-link { color: var(--primary); font-weight: 600; }

.lp { color: var(--ink); }
.lp-hero { padding: 56px 0 24px; }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.lp-eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--primary); margin: 0 0 10px; }
.lp-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 18px; color: var(--ink); text-wrap: balance; }
.lp-lead { font-size: 1.125rem; line-height: 1.6; color: var(--ink-soft); max-width: 36rem; margin: 0 0 26px; }
.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.lp-btn { min-height: 46px; padding: 0.6rem 1.25rem; font-weight: 600; display: inline-flex; align-items: center; border-radius: var(--radius); }
.lp-btn-ghost { border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.lp-btn-ghost:hover { border-color: var(--primary); color: var(--ink); }
.lp-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--ink-soft); font-size: 0.92rem; }
.lp-checks li { display: inline-flex; align-items: center; gap: 7px; }
.lp-checks li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; flex: none; }

.lp-login { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(16, 44, 84, 0.08); padding: 28px; scroll-margin-top: 84px; }
.lp-login-title { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px; }
.lp-login-sub { color: var(--muted); margin: 0 0 20px; }

/* Voorbeeld van het Klokken-scherm */
.lp-preview { margin: 56px 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(16, 44, 84, 0.12); overflow: hidden; }
.lp-preview-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--page); }
.lp-preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.lp-preview-bar em { font-style: normal; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); margin-left: 10px; }
.lp-preview-body { padding: 22px; display: grid; gap: 18px; }
.lp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.lp-stats span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }
.lp-stats strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.lp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-tile { position: relative; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 4px 8px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius); padding: 12px 14px; min-height: 150px; }
.lp-tile.is-running { background: rgba(0, 162, 161, 0.07); border-color: rgba(0, 162, 161, 0.4); border-left-color: var(--c); }
.lp-chip { justify-self: start; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c); background: var(--cbg); padding: 2px 8px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lp-live { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); }
.lp-live.is-paused { color: var(--pause-dark); }
.lp-tile-name { grid-column: 1 / -1; font-size: 1rem; }
.lp-tile-time { grid-column: 1 / -1; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lp-tile-time.is-muted { color: var(--ink-soft); }
.lp-tile-sub { grid-column: 1; font-size: 0.8rem; color: var(--muted); }
.lp-btns { grid-column: 2; grid-row: 4 / span 2; align-self: end; display: flex; gap: 6px; }
.lp-b { width: 34px; height: 34px; border-radius: 9px; display: inline-block; background: var(--start) center/16px no-repeat; }
.lp-b-play { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.8v10.4L18.2 12z' fill='white'/%3E%3C/svg%3E"); }
.lp-b-pause { background-color: var(--pause); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6.5' y='6' width='3.5' height='12' rx='1' fill='white'/%3E%3Crect x='14' y='6' width='3.5' height='12' rx='1' fill='white'/%3E%3C/svg%3E"); }
.lp-b-stop { background-color: transparent; border: 1.5px solid var(--line); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='7' y='7' width='10' height='10' rx='1.5' fill='%23C53D3D'/%3E%3C/svg%3E"); }
[data-bs-theme="dark"] .lp-tile { --c: var(--mint) !important; --cbg: rgba(105, 197, 196, 0.14) !important; }
[data-bs-theme="dark"] .lp-tile.is-running { background: rgba(105, 197, 196, 0.08); }

/* Secties */
.lp-section { padding: 80px 0; }
.lp-section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lp-h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 32px; max-width: 34ch; text-wrap: balance; }
.lp-text { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.65; max-width: 40rem; }
.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.lp-steps li { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.lp-step-num { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--sidebar-active-bg); color: var(--primary); font-weight: 700; margin-bottom: 14px; }
.lp-steps h3, .lp-feature h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; }
.lp-steps p, .lp-feature p { color: var(--ink-soft); margin: 0; line-height: 1.55; font-size: 0.95rem; }
.lp-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px; }
.lp-feature svg { width: 26px; height: 26px; fill: none; stroke: var(--primary); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.lp-who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.lp-who .lp-h2 { margin-bottom: 16px; }
.lp-who-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.lp-who-list li { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 2px; }
.lp-who-list span { color: var(--ink-soft); font-size: 0.95rem; }
.lp-faq-wrap { max-width: 820px; }
.lp-faq { display: grid; gap: 10px; }
.lp-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--page); }
.lp-faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 600; position: relative; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: var(--primary); }
.lp-faq details[open] summary::after { content: "−"; }
.lp-faq summary:focus-visible { outline: 3px solid var(--focus); border-radius: 12px; }
.lp-faq details p { margin: 0; padding: 0 18px 18px; color: var(--ink-soft); line-height: 1.6; }
.lp-final { text-align: center; }
.lp-final-inner { display: flex; flex-direction: column; align-items: center; }
.lp-final .lp-h2 { margin-bottom: 10px; }
.lp-final .lp-text { margin-bottom: 24px; }
.lp-footer { border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--muted); font-size: 0.9rem; }
.lp-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.lp-footer nav { display: flex; gap: 18px; }
.lp-footer a { color: var(--ink-soft); text-decoration: none; }
.lp-footer a:hover { color: var(--ink); }

@media (max-width: 991.98px) {
    .lp-hero { padding-top: 32px; }
    .lp-hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-who { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 767.98px) {
    .lp-wrap { padding: 0 16px; }
    .lp-nav { display: none; }
    .lp-top-inner { gap: 12px; min-height: 58px; }
    .lp-brand .brand-wordmark { height: 26px; }
    .lp-section { padding: 56px 0; }
    .lp-steps { grid-template-columns: 1fr; }
    .lp-features { grid-template-columns: 1fr; gap: 22px; }
    .lp-preview { margin-top: 36px; }
    .lp-preview-body { padding: 14px; }
    .lp-stats strong { font-size: 1.15rem; }
    .lp-tiles { grid-template-columns: 1fr; }
    .lp-tile { min-height: 0; }
    .lp-tile:nth-child(3) { display: none; }
    .lp-login { padding: 22px; }
    .lp-cta-row .lp-btn { flex: 1 1 auto; justify-content: center; }
}
