/* Mijn Drive — stijl. Kleuren passen zich aan licht/donker van je apparaat aan. */
:root {
    --bg: #f4f3ef;
    --surface: #ffffff;
    --surface-2: #faf9f6;
    --hover: #efeee8;
    --border: #e2e0d8;
    --text: #1d211f;
    --muted: #6b706c;
    --accent: #2f7d5b;
    --accent-hover: #276a4d;
    --accent-soft: #e3f0e9;
    --on-accent: #ffffff;
    --danger: #b3412f;
    --danger-soft: #f8e6e2;
    --warning-soft: #fbf1d9;
    --warning-text: #7a5a10;
    --info-soft: #e8eef6;
    --folder: #c99a2e;
    --shadow: 0 1px 2px rgba(20, 24, 22, .06), 0 8px 24px rgba(20, 24, 22, .06);
    --radius: 12px;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #141716;
        --surface: #1c201e;
        --surface-2: #202523;
        --hover: #262c29;
        --border: #2f3633;
        --text: #e8ebe9;
        --muted: #9aa29d;
        --accent: #4fb588;
        --accent-hover: #63c497;
        --accent-soft: #1f3a2e;
        --on-accent: #0d1f17;
        --danger: #e07a68;
        --danger-soft: #3a211d;
        --warning-soft: #362d17;
        --warning-text: #e8c87a;
        --info-soft: #1f2833;
        --folder: #e0b44e;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; display: flex; align-items: center; gap: .5rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; }
.ic-lg { width: 32px; height: 32px; }
.ic-xl { width: 48px; height: 48px; color: var(--muted); }
.ic-folder { color: var(--folder); fill: color-mix(in srgb, var(--folder) 22%, transparent); }
.ic-image { color: #c2556b; } .ic-video { color: #8a5cc2; } .ic-audio { color: #d0782a; }
.ic-pdf { color: #c8443a; } .ic-sheet { color: #2f8a4f; } .ic-doc { color: #3a73c8; }
.ic-slides { color: #d68a1c; } .ic-archive { color: #7d6a55; } .ic-code { color: #4f7f8a; } .ic-file { color: var(--muted); }

/* ---------- Knoppen & formulieren ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .55rem 1rem; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 550;
    cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--danger); }
.btn-block { width: 100%; padding: .7rem 1rem; }
.btn-link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: .25rem; text-decoration: underline; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; margin-top: .5rem; }
.icon-btn {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    border: 0; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }

.form { display: grid; gap: .9rem; }
.form > .btn:not(.btn-block) { justify-self: start; }
.form h3, .form p { margin: 0; }
.form.narrow { max-width: 360px; }
.form label { display: grid; gap: .35rem; font-weight: 550; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=search], select {
    width: 100%; padding: .65rem .8rem; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font: inherit; font-weight: 400;
}
input:focus, select:focus, .btn:focus-visible, .icon-btn:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.code-input { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.25rem !important; letter-spacing: .18em; text-align: center; }
.form-row-end { display: flex; justify-content: flex-end; margin-top: -.4rem; }
.form-inline-center { text-align: center; margin-top: .75rem; }

.alert { padding: .7rem .9rem; border-radius: 9px; margin: 0 0 1rem; font-size: .93rem; }
.alert-success { background: var(--accent-soft); color: var(--text); border-left: 3px solid var(--accent); }
.alert-error { background: var(--danger-soft); color: var(--text); border-left: 3px solid var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning-text); border-left: 3px solid #d4a72c; }
.alert-info { background: var(--info-soft); color: var(--text); border-left: 3px solid #5a86c0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }

/* ---------- Inlogpagina's ---------- */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.auth-wrap { width: 100%; max-width: 410px; }
.auth-brand { justify-content: center; margin-bottom: 1.25rem; font-size: 1.15rem; }
.auth-card h1 { margin-bottom: .2rem; }
.auth-card > .muted { margin: 0 0 1.25rem; }
.auth-footer { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 1.25rem; }
.notice { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.25rem; }
.notice .ic { color: var(--accent); }
.notice p { margin: 0; }

/* ---------- App-layout ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-ic { color: var(--accent); width: 28px; height: 28px; }
.topbar {
    position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem;
    padding: .6rem 1.25rem; background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.search { flex: 1; max-width: 620px; margin: 0 auto; position: relative; }
.search .ic { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 2.6rem; border-radius: 999px; background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: .25rem; }
.top-actions form { margin: 0; }
.avatar {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-left: .35rem;
    background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem;
}
.main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }

/* ---------- Bestandenlijst ---------- */
.drive-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.crumbs { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 1.2rem; }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--muted); }
.toolbar { display: flex; gap: .5rem; }
.upload-btn { margin: 0; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--muted); padding: .7rem 1rem; border-bottom: 1px solid var(--border); }
.list th a { color: inherit; }
.list td { padding: .35rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: var(--surface-2); }
.list .name { display: flex; align-items: center; gap: .75rem; color: var(--text); padding: .45rem 0; min-width: 0; }
.list .name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .name:hover span { text-decoration: underline; }
.list .name:hover { text-decoration: none; }
.row-folder .name { font-weight: 550; }
.col-name { max-width: 0; width: 60%; }
.col-date, .col-size { white-space: nowrap; color: var(--muted); font-size: .9rem; }
.col-act { width: 52px; text-align: right; }
.path-hint { margin: -.3rem 0 .3rem 2rem; }

.menu { position: relative; display: inline-block; }
.menu-pop {
    position: absolute; right: 0; top: 100%; z-index: 30; min-width: 210px; padding: .35rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
}
.menu-pop.up { top: auto; bottom: 100%; }
.menu-pop a, .menu-pop button {
    display: flex; width: 100%; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: 7px;
    background: none; border: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--hover); text-decoration: none; }
.menu-pop .ic { width: 18px; height: 18px; color: var(--muted); }
.menu-pop .danger, .menu-pop .danger .ic { color: var(--danger); }

.empty {
    text-align: center; padding: 4rem 1rem; border: 2px dashed var(--border); border-radius: var(--radius);
    background: var(--surface);
}
.empty p { margin: .4rem 0; }

.storage-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; font-size: .88rem; }
.storage-bar .muted { margin-left: auto; }
.meter { width: 160px; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); }

.drop-overlay {
    position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center;
    background: color-mix(in srgb, var(--accent) 16%, transparent); border: 3px dashed var(--accent);
    font-size: 1.2rem; font-weight: 600; pointer-events: none;
}
.drop-overlay .ic-xl { color: var(--accent); }

.upload-panel {
    position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 40; width: min(360px, calc(100vw - 2.5rem));
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden;
}
.upload-panel-head { padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
#upload-list { list-style: none; margin: 0; padding: .4rem 0; max-height: 280px; overflow: auto; }
#upload-list li { padding: .45rem 1rem; font-size: .88rem; }
#upload-list .fname { display: flex; justify-content: space-between; gap: .5rem; }
#upload-list .fname span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#upload-list .bar { height: 4px; border-radius: 99px; background: var(--border); margin-top: .35rem; overflow: hidden; }
#upload-list .bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
#upload-list .err { color: var(--danger); }

/* ---------- Dialogen ---------- */
.modal {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; width: min(440px, calc(100vw - 2rem));
    background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(10, 14, 12, .45); }
.modal h2 { margin-bottom: .25rem; }
.modal p { margin: 0; }

/* ---------- Instellingen ---------- */
.page-head { margin-bottom: 1.25rem; }
.back { font-size: .9rem; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.card-wide { grid-column: 1 / -1; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1.25rem; font-size: .92rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.status { display: flex; align-items: center; gap: .5rem; }
.status-on .ic { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1rem; }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .35rem; }
.qr-wrap { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.qr { background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--border); line-height: 0; }
.secret {
    display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1rem;
    background: var(--surface-2); border: 1px solid var(--border); padding: .4rem .6rem; border-radius: 7px;
    word-break: break-all; user-select: all;
}
.backup-box { border: 2px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.codes {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem 1.25rem;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.05rem; padding-left: 1.6rem; margin: 1rem 0;
}

/* ---------- Dashboard ---------- */
.topbar-spacer { flex: 1; }
.dash-hero { margin: .5rem 0 1.75rem; }
.dash-hero h1 { font-size: 1.9rem; }
.dash-hero p { margin: 0; }
.dash-date { font-size: .9rem; margin-bottom: .2rem !important; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.tile {
    --tile: var(--accent); --tile-soft: var(--accent-soft);
    position: relative; display: flex; gap: 1rem; align-items: flex-start; padding: 1.35rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text); text-decoration: none;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
a.tile:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--tile); }
a.tile:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--tile-soft); color: var(--tile); flex: none; }
.tile-icon .ic { width: 26px; height: 26px; }
.tile-body { display: grid; gap: .25rem; min-width: 0; }
.tile-title { font-weight: 650; font-size: 1.08rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tile-desc { color: var(--muted); font-size: .9rem; }
.tile-stat { font-size: .85rem; font-weight: 550; color: var(--tile); margin-top: .2rem; }
.tile-arrow { margin-left: auto; color: var(--muted); align-self: center; transition: transform .15s, color .15s; }
a.tile:hover .tile-arrow { transform: translateX(3px); color: var(--tile); }
.tile-soon { opacity: .7; box-shadow: none; border-style: dashed; cursor: default; }
.badge { font-size: .7rem; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .45rem; border-radius: 99px; background: var(--hover); color: var(--muted); }
.tile-green  { --tile: var(--accent);  --tile-soft: var(--accent-soft); }
.tile-amber  { --tile: #b7791f; --tile-soft: #fbf0d9; }
.tile-blue   { --tile: #3a6fb8; --tile-soft: #e5eef9; }
.tile-rose   { --tile: #b8476a; --tile-soft: #f8e4eb; }
.tile-violet { --tile: #7a55b8; --tile-soft: #eee6f8; }
.tile-slate  { --tile: #55606a; --tile-soft: #eaedf0; }
@media (prefers-color-scheme: dark) {
    .tile-amber  { --tile: #e3ad55; --tile-soft: #3a2e17; }
    .tile-blue   { --tile: #7aa6e6; --tile-soft: #1d2a3d; }
    .tile-rose   { --tile: #e88aa6; --tile-soft: #3a1f29; }
    .tile-violet { --tile: #b39be6; --tile-soft: #2b2340; }
    .tile-slate  { --tile: #aab4bd; --tile-soft: #2a3035; }
}
.recent h2 { font-size: 1rem; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.recent-list li:first-child { border-top: 0; }
.recent-list a { display: flex; align-items: center; gap: .7rem; color: var(--text); min-width: 0; }
.recent-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list li > span { white-space: nowrap; flex: none; }

/* ---------- Gebruikersbeheer ---------- */
.users-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.user-list { display: grid; gap: .75rem; }
.user-card { padding: 0; }
.user-card summary { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; cursor: pointer; list-style: none; }
.user-card summary::-webkit-details-marker { display: none; }
.user-card summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.user-card[open] summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.user-main { display: grid; min-width: 0; }
.user-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-badges { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.user-detail { padding: 1rem 1.25rem 1.25rem; }
.user-detail > p { margin: 0 0 .5rem; }
.user-detail .two-col { margin-top: .5rem; }
.avatar-sm { width: 36px; height: 36px; margin: 0; flex: none; }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.form label.check { display: flex; align-items: center; gap: .55rem; font-weight: 450; }
.form label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Budgetbeheer ---------- */
.budget-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .2rem .4rem; }
.month-nav > span { min-width: 9.5rem; text-align: center; font-weight: 600; }
.month-nav .small { padding: 0 .5rem; }
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem .95rem; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .ic { width: 18px; height: 18px; }

.b-hero { margin-bottom: 1rem; }
.b-hero > p { margin: 0; }
.b-left { font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent); line-height: 1.15; margin: .15rem 0 .35rem !important; font-variant-numeric: tabular-nums; }
.b-hero.negative .b-left { color: var(--danger); }
.b-formula { color: var(--muted); font-variant-numeric: tabular-nums; }
.alloc { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--border); margin: 1.1rem 0 .6rem; gap: 2px; }
.alloc span { display: block; height: 100%; }
.alloc-exp { background: #c98a2e; } .alloc-sav { background: #3a6fb8; } .alloc-bil { background: #b8476a; } .alloc-left { background: var(--accent); }
.alloc-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; color: var(--muted); }
.alloc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.b-hero .alert { margin: 1rem 0 0; }
.b-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.b-stat { display: grid; gap: .15rem; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.b-stat:hover { text-decoration: none; border-color: var(--accent); }
.b-stat strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.pos { color: var(--accent); }
.neg, .late { color: var(--danger); }
.paid { color: var(--accent); font-weight: 600; }
.b-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.b-grid h2, .b-list h2 { font-size: 1.02rem; }
.cat-row, .goal-mini { margin-bottom: .8rem; }
.cat-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .9rem; margin-bottom: .3rem; }
.cat-label span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.cat-bar, .progress { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.cat-bar span { display: block; height: 100%; background: #c98a2e; border-radius: 99px; }
.progress span { display: block; height: 100%; background: #3a6fb8; border-radius: 99px; transition: width .3s; }
.progress.done span { background: var(--accent); }
.progress.big { height: 12px; margin: .6rem 0 .5rem; }
.bill-list { list-style: none; margin: 0; padding: 0; }
.bill-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.bill-list li:first-child { border-top: 0; }
.bill-list li > span:first-child { display: grid; min-width: 0; }
.bill-list li.total { font-weight: 700; border-top: 2px solid var(--border); }
.bill-right { display: flex; align-items: center; gap: .6rem; white-space: nowrap; }
.btn-sm { padding: .3rem .6rem; font-size: .82rem; border-radius: 7px; gap: .3rem; }
.btn-sm .ic { width: 15px; height: 15px; }
.b-start { margin-bottom: 1rem; border: 2px dashed var(--accent); box-shadow: none; }
.b-start .steps { margin: .5rem 0 0; }

.b-add { margin-bottom: 1.25rem; padding: 0; box-shadow: none; background: transparent; border: 0; }
.b-add > summary { list-style: none; display: inline-flex; }
.b-add > summary::-webkit-details-marker { display: none; }
.b-add[open] { background: var(--surface); border: 1px solid var(--border); padding: 1.25rem; box-shadow: var(--shadow); }
.b-add[open] > summary { margin-bottom: .75rem; }
.b-add > p { margin: 0 0 1rem; }
.b-form { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); align-items: end; }
.b-form .btn-row { grid-column: 1 / -1; }
.b-form label.check { align-self: center; }
.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.money-input input { padding-left: 1.9rem; font-variant-numeric: tabular-nums; }
input[type=number], input[type=date] {
    width: 100%; padding: .6rem .8rem; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text); font: inherit;
}
.b-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.b-list-head h2 { margin: 0; }
.b-cat { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.25rem 0 .5rem; display: flex; justify-content: space-between; }
.b-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: .5rem; }
.b-item > summary { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.b-item > summary::-webkit-details-marker { display: none; }
.b-item > summary:hover { background: var(--surface-2); border-radius: 10px; }
.b-item-main { display: grid; min-width: 0; flex: 1; }
.b-item-main .small { overflow: hidden; text-overflow: ellipsis; }
.b-item-amount { font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.b-item-edit { padding: 1rem; border-top: 1px solid var(--border); display: grid; gap: .75rem; }
.danger-link { color: var(--danger); padding: 0; }
.toggle-paid { margin: 0; }
.b-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.b-two .b-form { grid-template-columns: 1fr 1fr; }
.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.goal-top, .goal-nums { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.goal .small { margin: .5rem 0; }
.goal .b-item { margin: .75rem 0 0; }
.goal .b-item > summary { padding: .5rem .75rem; font-size: .9rem; }
.deposit { display: flex; gap: .5rem; margin-top: .5rem; }
.deposit .money-input { flex: 1; }
.deposit + .small { margin-top: .3rem; }

/* ---------- Boodschappen ---------- */
.shop { max-width: 760px; margin: 0 auto; }
.shop-head h1 { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.shop-count { font-size: 1rem; font-weight: 500; }
.shop-lists { align-items: center; }
.shop-lists .badge { margin-left: .2rem; }
.shop-newlist { position: relative; margin-left: auto; }
.shop-newlist > summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; padding: .7rem .6rem; color: var(--muted); cursor: pointer; font-weight: 550; }
.shop-newlist > summary::-webkit-details-marker { display: none; }
.shop-newlist[open] .shop-inline { position: absolute; right: 0; top: 100%; z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .6rem; box-shadow: var(--shadow); }
.shop-inline { display: flex; gap: .5rem; align-items: center; }
.shop-inline input { flex: 1; padding: .5rem .7rem; }
.shop-add { display: flex; gap: .5rem; margin-bottom: .9rem; position: sticky; top: 57px; z-index: 10; background: var(--bg); padding: .4rem 0; }
.shop-add input { flex: 1; font-size: 1.05rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface); }
.shop-add .btn { border-radius: 12px; padding: .6rem 1rem; }
.shop-suggest { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.shop-suggest form { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: .25rem; padding: .35rem .7rem .35rem .5rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip .ic { width: 15px; height: 15px; color: var(--muted); }
.shop-empty { padding: 2.5rem 1rem; }
.shop-empty-emoji { font-size: 2.5rem; margin: 0 !important; }
.shop-group { margin-bottom: 1.1rem; }
.shop-group h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .4rem .2rem; gap: .4rem; }
.shop-group h2 span { font-size: 1rem; }
.shop-items { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.shop-item { display: flex; align-items: center; border-top: 1px solid var(--border); position: relative; }
.shop-item:first-child { border-top: 0; }
.shop-toggle { flex: 1; margin: 0; min-width: 0; }
.shop-check { display: flex; align-items: center; gap: .85rem; width: 100%; padding: .85rem 1rem; background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; min-height: 52px; }
.shop-check .box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.shop-check .box .ic { width: 16px; height: 16px; color: #fff; opacity: 0; stroke-width: 3; }
.shop-check:hover .box { border-color: var(--accent); }
.shop-name { flex: 1; min-width: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.shop-qty { flex: none; font-size: .85rem; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: .1rem .5rem; border-radius: 99px; }
.shop-item.done .box { background: var(--accent); border-color: var(--accent); }
.shop-item.done .box .ic { opacity: 1; }
.shop-item.done .shop-name { text-decoration: line-through; color: var(--muted); }
.shop-item.done .shop-qty { opacity: .5; }
.shop-more { flex: none; margin-right: .35rem; }
.shop-more > summary { list-style: none; }
.shop-more > summary::-webkit-details-marker { display: none; }
.shop-edit { position: absolute; right: .5rem; top: calc(100% - .3rem); z-index: 15; width: min(320px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); display: grid; gap: .6rem; }
.shop-edit p { margin: 0; }
.shop-done .shop-items { opacity: .85; margin-bottom: .75rem; }
.shop-settings { margin-top: 2rem; text-align: center; }
.shop-settings > summary { cursor: pointer; display: inline-block; }
.shop-settings-body { display: grid; gap: .75rem; margin-top: .75rem; justify-items: center; }
.shop-settings-body .shop-inline { width: min(380px, 100%); }

/* ---------- Mobiel ---------- */
@media (max-width: 760px) {
    .topbar { flex-wrap: wrap; padding: .6rem .9rem; }
    .brand span { display: none; }
    .search { order: 3; flex-basis: 100%; }
    .top-actions { margin-left: auto; }
    .main { padding: 1rem .9rem 4rem; }
    .col-date { display: none; }
    .list td, .list th { padding-left: .7rem; padding-right: .5rem; }
    .toolbar .btn span { display: none; }
    .settings-grid, .two-col { grid-template-columns: 1fr; }
    .crumbs { font-size: 1.05rem; }
    .tiles { grid-template-columns: 1fr; }
    .users-layout { grid-template-columns: 1fr; }
    .b-stats { grid-template-columns: 1fr 1fr; }
    .b-grid, .b-two, .b-two .b-form { grid-template-columns: 1fr; }
    .b-left { font-size: 2rem; }
    .month-nav > span { min-width: 7.5rem; }
    .tabs a span { display: none; }
    .tabs a.active span { display: inline; }
    .shop-lists a span { display: inline; }
    .shop-add .btn span { display: none; }
    .user-card summary { flex-wrap: wrap; }
    .dash-hero h1 { font-size: 1.5rem; }
}

@media print {
    body * { visibility: hidden; }
    .backup-box, .backup-box * { visibility: visible; }
    .backup-box { position: absolute; left: 0; top: 0; border: 0; background: #fff; color: #000; }
    .backup-box .btn-row { display: none; }
}
