/* prive.tweqxt.nl - enige stylesheet van het project */

@font-face { font-family: 'Newsreader'; src: url('../fonts/newsreader-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
    --ground: #F3F1EC;
    --surface: #FFFFFF;
    --surface-soft: #FBFAF7;
    --line: #E2DED6;
    --line-soft: #EFECE6;
    --input-line: #CFCAC0;
    --ink: #1A1D21;
    --muted: #555B62;
    --accent: #1E5B4F;
    --accent-dark: #123B33;
    --accent-soft: #E4EFEB;
    --info: #2C5C8F;
    --info-soft: #E3EBF4;
    --error: #A1271B;
    --error-soft: #FBE9E7;
    --error-line: #E3B2AB;
    --neutral-soft: #ECEAE5;
    --neutral: #4A4F55;
    --font-display: 'Newsreader', Georgia, serif;
    --font-body: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
    --radius: 8px;
    --radius-card: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2 { font-family: var(--font-display); font-weight: 500; margin: 0; line-height: 1.15; }
h1 { font-size: 36px; }
h2 { font-size: 24px; }

.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.icon { flex-shrink: 0; }

.lead { margin: 0; color: var(--muted); max-width: 70ch; }
.hint { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Eenvoudige schermen (installatie, inloggen) ---------- */

body.simple { align-items: center; justify-content: center; padding: 32px 16px; }

.simple-wrap { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--accent); font-family: var(--font-mono); font-size: 15px; }

.security-note { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.security-note .icon { margin-top: 2px; }

.step-count { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Ingelogde schermen ---------- */

.topbar {
    min-height: 64px;
    padding: 8px 40px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-left { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }

.wordmark { font-family: var(--font-mono); font-size: 15px; text-decoration: none; }

.mainnav { display: flex; gap: 6px; }
.mainnav a,
.tabs a {
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.mainnav a:hover,
.tabs a:hover { color: var(--ink); background: var(--neutral-soft); }
.mainnav a.active,
.tabs a.active { color: var(--accent); background: var(--accent-soft); }

.logout { margin: 0; }

.page { width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px; display: flex; flex-direction: column; gap: 24px; flex-grow: 1; }

.page-head { display: flex; flex-direction: column; gap: 6px; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 12px; flex-wrap: wrap; }

.footer { padding: 16px 40px 24px; font-size: 12px; color: var(--muted); text-align: right; }

/* ---------- Kaarten ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-narrow { padding: 36px; }
.card-highlight { border-color: var(--accent); }

.card-links { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; }

.empty-state { align-items: flex-start; }
.empty-state p { margin: 0; color: var(--muted); }

/* ---------- Formulieren ---------- */

.form { display: flex; flex-direction: column; gap: 18px; }
.form-narrow { max-width: 420px; }
.form-inline { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
.form-inline .field { min-width: 260px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }

input[type="text"], input[type="email"], input[type="password"], input:not([type]) {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    width: 100%;
}
input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

.code-input { height: 58px; font-family: var(--font-mono); font-size: 26px; letter-spacing: 0.35em; text-align: center; }
.code-input-small { height: 46px; font-size: 18px; max-width: 200px; }

.button {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius);
    background: var(--accent);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--accent-dark); color: #FFFFFF; }

.button-secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); align-self: flex-start; }
.button-secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }

.link-button { background: none; border: 0; padding: 8px 0; color: var(--accent); font-family: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; }
.link-button:hover { color: var(--accent-dark); }

/* ---------- Meldingen en labels ---------- */

.notice { padding: 14px 18px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.notice-ok { background: var(--accent-soft); color: var(--accent-dark); }
.notice-info { background: var(--info-soft); color: #1F4468; }
.notice-fout { background: var(--error-soft); color: var(--error); border: 1px solid var(--error-line); }

.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.badge-uitgevoerd { background: var(--accent-soft); color: var(--accent); }
.badge-openstaand { background: var(--info-soft); color: var(--info); }
.badge-gewijzigd { background: var(--error-soft); color: var(--error); }

/* ---------- Tabellen ---------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }

/* ---------- Authenticator en herstelcodes ---------- */

.qr-block { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { width: 180px; height: 180px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #FFFFFF; flex-shrink: 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-manual { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
.secret { margin: 0; font-size: 15px; word-break: break-all; color: var(--ink); }

.codes { list-style: none; margin: 0; padding: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; font-size: 16px; }

/* ---------- Mobiel ---------- */

@media (max-width: 720px) {
    .topbar { padding: 12px 16px; }
    .topbar-left { gap: 12px; }
    .page { padding: 24px 16px; }
    .card, .card-narrow { padding: 24px; }
    h1 { font-size: 30px; }
    .form-inline { flex-direction: column; align-items: stretch; }
    .form-inline .field { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ================= Fase 2: uploaden, controle, mutaties ================= */

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.stack { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }

.page-head-row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.h-small { font-size: 18px; }
.card-small { padding: 22px; gap: 12px; }
.card-flush { padding: 0; gap: 0; overflow: hidden; }
.card-head { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.card-foot { padding: 18px 24px; display: flex; justify-content: flex-end; gap: 12px; background: var(--surface-soft); border-top: 1px solid var(--line); flex-wrap: wrap; }
.card-foot-reverse { flex-direction: row-reverse; justify-content: flex-start; }
.card-foot-reverse .button:first-child { margin-left: auto; }

.accent { color: var(--accent); }
.num { text-align: right; }
.clip { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plain-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); }

/* Uploadvak */
.dropzone { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.dropzone-area {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px;
    border: 2px dashed #B9B3A7;
    border-radius: var(--radius-card);
    background: var(--surface-soft);
    color: var(--accent);
    cursor: pointer;
}
.dropzone-area:hover, .dropzone-area:focus-within { border-color: var(--accent); background: #F7FAF8; }
.dropzone-text { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-files:empty { display: none; }

/* Herkende bestanden */
.file-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); }
.file-meta { display: flex; flex-direction: column; gap: 2px; }
.file-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.file-name { margin: 0; overflow-wrap: anywhere; }
.account-row { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: center; }
.account-row .badge { justify-self: start; }

.field-compact { gap: 4px; }
.field-compact label { font-size: 12px; color: var(--muted); }
.field-compact input, .field-compact select { height: 40px; font-size: 14px; }
.field-grow { flex-grow: 1; }

select {
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
}

.button-small { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Labels */
.badge-ok { background: var(--accent-soft); color: var(--accent); }
.badge-start { background: var(--info-soft); color: var(--info); }
.badge-fout { background: var(--error-soft); color: var(--error); }
.badge-neutraal { background: var(--neutral-soft); color: var(--neutral); }

.text-ok { color: var(--accent); }
.text-start { color: var(--info); }
.text-fout { color: var(--error); }
.text-neutraal { color: var(--neutral); }

/* Kerncijfers */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.2; }

/* Controletabel */
.table-check td { vertical-align: middle; }
.row-fout td { background: #FFFCFB; }
.row-detail td { border-top: 0; padding-top: 0; }
.row-info td { padding: 0 12px 12px; }
.problem { background: #FDF6F5; border: 1px solid #F1D5D1; border-radius: 10px; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.problem p { margin: 0; }
.problem ol { margin: 0; padding-left: 20px; }

.actions-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.button-row form { margin: 0; }

/* Filters mutaties */
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .button { min-height: 40px; }

.inline-edit { display: flex; gap: 8px; align-items: center; }
.inline-edit input { height: 40px; font-size: 14px; }

@media (max-width: 960px) {
    .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .file-row { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
    .account-row { grid-template-columns: minmax(0, 1fr); }
    .stats, .stats-3 { grid-template-columns: minmax(0, 1fr); }
    .dropzone-area { padding: 20px; }
}

.badge { white-space: nowrap; }
.table td .hint { overflow-wrap: anywhere; }

/* ================= Fase 3: beoordelen, regels ================= */

.review-head,
.review-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 300px 100px 130px;
    gap: 16px;
    align-items: center;
    padding: 14px 24px;
}
.review-head { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.review-row { border-bottom: 1px solid var(--line-soft); margin: 0; }
.review-row:last-child { border-bottom: 0; }
.review-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.review-actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.ai-label { color: var(--info); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--muted); }
.pager a.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }

.rule-form { display: flex; flex-direction: column; gap: 14px; }
.rule-grid { display: grid; grid-template-columns: 180px 160px minmax(0, 1fr) 140px 200px; gap: 12px; align-items: end; }
.rule-grid-bottom { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.rule-grid .button { min-height: 40px; }

.preview { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.preview p { margin: 0; }

.code-chip { font-family: var(--font-mono); font-size: 13px; background: var(--ground); padding: 2px 6px; border-radius: 4px; }
.icon-button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 14px; }
.icon-button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.icon-button:disabled { opacity: 0.35; cursor: default; }
.order-buttons { display: flex; gap: 4px; margin: 0; }
.inline-form { display: inline; margin: 0 0 0 12px; }
.card-body { padding: 18px 24px; margin: 0; }

.row-link { color: var(--ink); text-decoration: none; font-weight: 500; }
.row-link:hover { color: var(--accent); text-decoration: underline; }
.row-sub td:first-child { padding-left: 40px; }
.row-top td { background: var(--surface-soft); }

.details { margin: 0; display: grid; grid-template-columns: 1fr; gap: 4px; font-size: 14px; }
.details dt { font-size: 12px; color: var(--muted); margin-top: 8px; }
.details dd { margin: 0; overflow-wrap: anywhere; }

.stat-link { text-decoration: none; color: inherit; }
.stat-link:hover { border-color: var(--accent); }

.is-busy { opacity: 0.6; pointer-events: none; }

@media (max-width: 960px) {
    .review-head { display: none; }
    .review-row { grid-template-columns: minmax(0, 1fr) auto; }
    .review-row .field, .review-row .review-actions { grid-column: 1 / -1; }
    .rule-grid, .rule-grid-bottom { grid-template-columns: minmax(0, 1fr); }
}

.rule-grid .button { align-self: end; }

/* ================= Fase 4: overzicht, vaste lasten, winkels ================= */

.tiles-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tiles-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile-accent { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.tile-accent .tile-label { color: rgba(255, 255, 255, 0.85); }
.tile-label { font-size: 13px; color: var(--muted); }
a.tile-label { color: var(--accent); }
.tile-amount { font-family: var(--font-display); font-size: 36px; line-height: 1.15; }
.tile-amount-small { font-size: 28px; }
.tile-account { padding: 20px; gap: 14px; }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile-name { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.tile-warn { font-size: 12px; color: #7A4B00; }
.tile-foot { border-top: 1px solid var(--line-soft); padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: auto; }
.bank-chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.bank-abn { background: var(--info-soft); color: var(--info); }
.bank-ing { background: #FDEBDD; color: #9A4A0B; }
.bank-knab { background: var(--accent-soft); color: var(--accent); }
.notice-warn { background: #FDF3E2; color: #7A4B00; }
.text-ink { color: var(--ink); }
.block { display: block; }
.h-medium { font-size: 22px; }

.layout-split { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bar-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) 120px; gap: 12px; align-items: center; font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: var(--line-soft); overflow: hidden; display: block; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.next-row { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--line-soft); }

.card-suggest { border-color: #C9DDD6; }
.card-suggest .card-head { background: #F2F8F5; }
.card-notice { margin: 12px 24px 0; }
.button-row-end { justify-content: flex-end; align-items: center; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.check-block { align-items: flex-start; }
.aliases { max-width: 420px; line-height: 1.6; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
    .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
    .tiles-3, .tiles-4 { grid-template-columns: minmax(0, 1fr); }
    .bar-row { grid-template-columns: 110px minmax(0, 1fr) 100px; }
}
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }

/* ================= Versie 1.4: nieuwe bovenbalk en rustiger vormgeving ================= */

body.app { background: #F6F4F0; }

.appbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 60px;
    padding: 0 32px;
    background: var(--surface);
    border-bottom: 1px solid #E6E2DA;
    display: flex;
    align-items: center;
    gap: 28px;
}
.brand-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px; }
.appnav { display: flex; align-items: center; gap: 22px; height: 100%; }
.appnav-link {
    height: 60px;
    padding: 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #4A4F55;
    text-decoration: none;
    cursor: pointer;
    list-style: none;
}
.appnav-link::-webkit-details-marker { display: none; }
.appnav-link:hover { color: var(--ink); }
.appnav-link.active { color: var(--accent-dark); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.count-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.appbar-right .button { min-height: 36px; gap: 8px; }
.button.is-current { box-shadow: 0 0 0 3px var(--accent-soft); }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: #EFECE6; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; cursor: pointer; list-style: none; }
.avatar::-webkit-details-marker { display: none; }
.avatar.active, .avatar:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* Uitklapmenu's (details/summary, werkt ook zonder JavaScript) */
.menu, .chip-menu { position: relative; }
.menu > summary, .chip-menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker, .chip-menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 250px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(26, 29, 33, 0.14);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.menu > .menu-panel { top: 54px; }
.menu-right > .menu-panel { left: auto; right: 0; top: 44px; min-width: 200px; }
.menu-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ink);
    background: none;
    border: 0;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}
.menu-item .icon { color: var(--accent); margin-top: 1px; }
.menu-item:hover, .menu-item.active { background: #F2F8F5; color: var(--ink); }
.menu-item > span { display: flex; flex-direction: column; }
.menu-title { font-weight: 500; }
.menu-desc { font-size: 12px; color: var(--muted); }
.menu-count { font-size: 12px; color: var(--accent); font-weight: 600; }
.menu-head { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.menu-panel form { margin: 0; }

.mobilenav { display: none; }

/* Filterbalk */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.search-pill { height: 36px; width: 280px; max-width: 100%; box-sizing: border-box; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid #DAD5CC; display: inline-flex; align-items: center; gap: 8px; color: #8A8F95; }
.search-pill:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-pill input { border: 0; height: 34px; padding: 0; font-size: 13px; background: transparent; width: 100%; box-shadow: none; }
.search-pill input:focus { box-shadow: none; }
.chip {
    height: 36px;
    padding: 0 10px 0 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid #DAD5CC;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    max-width: 340px;
    overflow: hidden;
}
.chip strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.chip .icon { color: #6B7178; flex-shrink: 0; }
.chip:hover { border-color: #B9B3A7; }
.chip-active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; padding-right: 36px; }
.chip-active .icon { color: rgba(255, 255, 255, 0.8); }
.chip-wrap { position: relative; display: inline-flex; }
.chip-x { position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; background: rgba(255, 255, 255, 0.18); z-index: 2; }
.chip-x:hover { background: rgba(255, 255, 255, 0.32); color: #FFFFFF; }
.chip-active + .chip-x, .chip-wrap .chip-active { }
.filter-reset { font-size: 13px; margin-left: 4px; }
.menu-panel-list { max-height: 380px; overflow-y: auto; min-width: 240px; }
.menu-panel-shops { width: 300px; }
.menu-panel select { height: 40px; font-size: 14px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.option:hover, .option.is-checked { background: #F2F8F5; }
.option input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.option-count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.option-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.option[hidden] { display: none; }
.search-box { height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--accent); display: flex; align-items: center; gap: 8px; color: #6B7178; margin-bottom: 4px; }
.search-box input { border: 0; height: 36px; padding: 0; font-size: 14px; width: 100%; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.menu-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 2px; font-size: 13px; border-top: 1px solid var(--line-soft); margin-top: 4px; }

/* Samenvatting */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.summary-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
a.summary-card:hover { border-color: var(--accent); color: var(--ink); }
.summary-card strong { font-family: var(--font-display); font-weight: 500; font-size: 26px; }

/* Rustiger tabellen */
.card { border-radius: 16px; }
.table th { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7178; background: transparent; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid #F1EEE8; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FBFAF7; }
.table-clean td { vertical-align: middle; }
.text-soft { color: #4A4F55; }
.year { opacity: 0.5; }
.shop-cell { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.shop-cell:hover .shop-name { color: var(--accent); text-decoration: underline; }
.shop-text { display: flex; flex-direction: column; min-width: 0; }
.shop-name { font-weight: 500; }
.shop-initial { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.tone-shop { background: var(--accent-soft); color: var(--accent); }
.tone-ok { background: #E7F3EC; color: #1F6B45; }
.tone-start { background: var(--info-soft); color: var(--info); }
.tone-neutraal { background: var(--neutral-soft); color: var(--neutral); }

/* Acties per regel alleen tonen bij aanwijzen (op apparaten met muis) */
@media (hover: hover) {
    .row-actions { opacity: 0; transition: opacity 0.12s; }
    tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; }
}

.button { border-radius: 9px; }
.page { gap: 20px; }

@media (max-width: 900px) {
    .appbar { padding: 0 16px; gap: 16px; }
    .appnav { display: none; }
    .appbar-right .button span { display: none; }
    .mobilenav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid #E6E2DA; }
    .mobilenav a { flex-shrink: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: #4A4F55; background: #F3F1EC; }
    .mobilenav a.active { background: var(--accent); color: #FFFFFF; }
    .search-pill { width: 100%; }
    .menu-panel-shops { width: min(300px, calc(100vw - 32px)); }
}
@media (max-width: 720px) {
    .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-card strong { font-size: 20px; }
}

/* Logo met staafjes (zoals de favicon) */
.logo { align-items: flex-end; gap: 2px; padding-bottom: 7px; box-sizing: border-box; }
.logo-bar { width: 4px; border-radius: 1px; background: #FFFFFF; display: block; }
.logo-bar-1 { height: 7px; opacity: 0.6; }
.logo-bar-2 { height: 11px; opacity: 0.8; }
.logo-bar-3 { height: 16px; }

/* Uitgaven: doorklikken van categorie naar winkel */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs strong { color: var(--ink); font-weight: 500; }
.period-switch { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid #DAD5CC; border-radius: 999px; padding: 4px; }
.period-switch .period-label { padding: 0 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.period-arrow { width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 18px; color: var(--accent); }
.period-arrow:hover { background: var(--accent-soft); }
.period-arrow.is-disabled { color: #C9C4BA; pointer-events: none; }
.period-type { height: 30px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 13px; color: #4A4F55; text-decoration: none; }
.period-type.active { background: #F3F1EC; color: var(--ink); font-weight: 500; }
.tile-accent-small { padding: 18px 20px; }
.drill { display: flex; flex-direction: column; gap: 8px; }
.drill-row {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px 140px 20px;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}
.drill-row:hover { border-color: #B9B3A7; color: var(--ink); }
.drill-row.is-open { background: #F2F8F5; border-color: #C9DDD6; }
.drill-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.drill-name { font-size: 15px; font-weight: 600; }
.drill-name .hint { font-weight: 400; }
.drill-prev { text-align: right; font-size: 12px; color: var(--muted); }
.drill-arrow { color: var(--accent); font-size: 16px; text-align: center; }
.drill-children { margin: -2px 0 6px 24px; padding-left: 16px; border-left: 2px solid #C9DDD6; display: flex; flex-direction: column; gap: 6px; }
.drill-shop {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 150px 120px;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
}
.drill-shop:hover { border-color: var(--accent); color: var(--ink); }
.bar-thin { height: 6px; }
.bar-fill-soft { background: #7FA89D; }
@media (max-width: 720px) {
    .drill-row { grid-template-columns: minmax(0, 1fr) auto; }
    .drill-prev, .drill-arrow { display: none; }
    .drill-shop { grid-template-columns: 30px minmax(0, 1fr) auto; }
    .drill-shop .drill-count { display: none; }
    .drill-children { margin-left: 8px; padding-left: 10px; }
}

.stack-tight { display: flex; flex-direction: column; gap: 6px; }
a.bar-row { text-decoration: none; color: var(--ink); border-radius: 8px; padding: 4px 6px; margin: 0 -6px; }
a.bar-row:hover { background: #F2F8F5; color: var(--ink); }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover { color: var(--accent); }
