/* ============================================================================
   Freizeitmanager — design system. Light & dark, responsive, CSP-safe.
   ========================================================================== */

/* Self-hosted Poppins (DSGVO-safe — no Google hotlink). Used on public pages. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/poppins-400.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/poppins-500.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/poppins-700.woff2') format('woff2'); }

:root {
    --bg: #f5f6f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #182031;
    --muted: #6b7688;
    --line: #e7eaf0;
    --primary: #5b53e8;
    --primary-ink: #ffffff;
    --primary-soft: #eeecfd;
    --accent: #0ea5a4;
    --danger: #e5484d;
    --success-bg: #e7f7ee; --success-ink: #17663b; --success-line: #b7e6cb;
    --error-bg: #fdecec; --error-ink: #b4232a; --error-line: #f6c9cb;
    --info-bg: #eaf0fe; --info-ink: #24448c; --info-line: #c9d8fb;
    --warn-bg: #fef3c7; --warn-ink: #92400e;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
    --shadow-lg: 0 8px 30px rgba(16,24,40,.12);
    --radius: 14px;
    --radius-sm: 9px;
    --c1:#6366f1; --c2:#14b8a6; --c3:#f59e0b; --c4:#ec4899; --c5:#3b82f6; --c6:#8b5cf6;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg:#0f1421; --surface:#161d2c; --surface-2:#1b2233; --ink:#e8edf5; --muted:#97a2b5;
        --line:#27314681; --primary:#7c78f0; --primary-soft:#241f45; --accent:#2dd4bf;
        --success-bg:#12331f; --success-ink:#7ee2a8; --success-line:#1e5233;
        --error-bg:#3a1618; --error-ink:#f4a6a9; --error-line:#5f2427;
        --info-bg:#16233f; --info-ink:#a8c4f5; --info-line:#274372;
        --warn-bg:#3a2f10; --warn-ink:#f3d18a;
        --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 20px rgba(0,0,0,.35);
        --shadow-lg:0 12px 40px rgba(0,0,0,.5);
    }
}
:root[data-theme="dark"] {
    --bg:#0f1421; --surface:#161d2c; --surface-2:#1b2233; --ink:#e8edf5; --muted:#97a2b5;
    --line:#273146; --primary:#7c78f0; --primary-soft:#241f45; --accent:#2dd4bf;
    --success-bg:#12331f; --success-ink:#7ee2a8; --success-line:#1e5233;
    --error-bg:#3a1618; --error-ink:#f4a6a9; --error-line:#5f2427;
    --info-bg:#16233f; --info-ink:#a8c4f5; --info-line:#274372;
    --warn-bg:#3a2f10; --warn-ink:#f3d18a;
    --shadow:0 1px 2px rgba(0,0,0,.3),0 6px 20px rgba(0,0,0,.35);
    --shadow-lg:0 12px 40px rgba(0,0,0,.5);
}
:root[data-theme="light"] {
    color-scheme: light;   /* opt out of mobile "force dark" so the form stays light */
    --bg:#f5f6f9; --surface:#fff; --surface-2:#f8fafc; --ink:#182031; --muted:#6b7688; --line:#e7eaf0;
    --primary:#5b53e8; --primary-soft:#eeecfd; --accent:#0ea5a4;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
    line-height: 1.5; font-size: 15px;
}
a { color: var(--primary); }
.icon { flex: none; vertical-align: -0.15em; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
h1 { font-size: 1.5rem; margin: 0 0 .3rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; letter-spacing: -.01em; }
h3 { font-size: .92rem; margin: 1rem 0 .4rem; }

/* --- App shell ----------------------------------------------------------- */
.app-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
    background: var(--surface); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar__brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; }
.sidebar__brand .logo {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 800;
}
.sidebar__brand b { font-size: 1.02rem; letter-spacing: -.01em; }
.sidebar__brand span { display: block; font-size: .72rem; color: var(--muted); }
.sidebar nav { padding: .5rem .75rem; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-weight: 500; font-size: .92rem;
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--ink); }
.sidebar nav a.active { background: var(--primary-soft); color: var(--primary); }
.sidebar nav a.active .icon { color: var(--primary); }
.sidebar__foot { margin-top: auto; padding: .9rem; border-top: 1px solid var(--line); }
.userbox { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; }
.userbox .avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
    display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none;
}
.userbox .who { line-height: 1.2; overflow: hidden; }
.userbox .who b { font-size: .85rem; display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.userbox .who span { font-size: .74rem; color: var(--muted); }

/* --- Topbar & content ---------------------------------------------------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
    position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 1rem; padding: .7rem 1.4rem;
}
.topbar h1 { font-size: 1.15rem; margin: 0; }
.topbar__search { margin-left: auto; position: relative; }
.topbar__search input {
    width: 260px; max-width: 40vw; padding: .5rem .8rem .5rem 2.1rem; border: 1px solid var(--line);
    border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9rem;
}
.topbar__search .icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.iconbtn {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.iconbtn:hover { color: var(--ink); }
.menu-toggle { display: none; }
.content { padding: 1.5rem 1.4rem 3rem; max-width: 1240px; width: 100%; margin: 0 auto; }

/* --- Cards & panels ------------------------------------------------------ */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.card h2 .icon { color: var(--muted); vertical-align: -.2em; margin-right: .3rem; }

/* --- Page header --------------------------------------------------------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .5rem; }
.crumbs a { color: var(--muted); text-decoration: none; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .9rem;
    font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 20%, var(--line)); }
.btn--small { padding: .38rem .65rem; font-size: .83rem; }
.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { filter: brightness(1.05); }
.btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.05); }
.linkbtn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: .82rem; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.linkbtn--danger { color: var(--danger); }

/* --- Dashboard grids ----------------------------------------------------- */
.grid { display: grid; gap: 1rem; }
.grid--kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.kpi {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem;
    box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: block; position: relative; overflow: hidden;
}
a.kpi:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); transform: translateY(-1px); transition: .15s; }
.kpi .kpi__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: .6rem; }
.kpi__num { font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; }
.kpi__label { color: var(--muted); font-size: .85rem; }

/* --- Charts -------------------------------------------------------------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.ch-bar { fill: var(--primary); }
.ch-val { fill: var(--muted); font-size: 11px; }
.ch-lbl { fill: var(--muted); font-size: 10px; }
.ch-line { stroke: var(--primary); stroke-width: 2.5; }
.ch-area { fill: color-mix(in srgb, var(--primary) 14%, transparent); }
.ch-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.ch-total { fill: var(--ink); font-size: 20px; font-weight: 700; }
.ch-hole { fill: var(--surface); }
.chart--donut { width: 160px; height: 160px; }
.ch-donut-wrap { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.ch-legend { list-style: none; margin: 0; padding: 0; font-size: .88rem; display: grid; gap: .35rem; }
.ch-dot-legend { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .45rem; vertical-align: 0; }
.ch-c1{fill:var(--c1)} .ch-c2{fill:var(--c2)} .ch-c3{fill:var(--c3)} .ch-c4{fill:var(--c4)} .ch-c5{fill:var(--c5)} .ch-c6{fill:var(--c6)}
span.ch-c1{background:var(--c1)} span.ch-c2{background:var(--c2)} span.ch-c3{background:var(--c3)}
span.ch-c4{background:var(--c4)} span.ch-c5{background:var(--c5)} span.ch-c6{background:var(--c6)}

/* --- Tables -------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .6rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.table thead th a { color: inherit; text-decoration: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; }
.table a { color: var(--primary); text-decoration: none; font-weight: 500; }
.table a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }

/* --- Definition lists ---------------------------------------------------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1rem; }
.fields { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.1rem; margin: 0; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; }
.list { margin: .3rem 0 0; padding-left: 1.1rem; }
.list--plain { list-style: none; padding-left: 0; }
.list--plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }

/* --- Search / filter bars ------------------------------------------------ */
.searchbar { display: flex; gap: .5rem; margin-bottom: 1rem; align-items: center; flex-wrap: wrap; }
.searchbar input, .searchbar select {
    padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .9rem;
}
.searchbar input[type=search] { flex: 1; min-width: 180px; max-width: 26rem; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }

/* --- Badges / tags / chips ---------------------------------------------- */
.badge { display: inline-flex; align-items: center; font-size: .7rem; padding: .12rem .45rem; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge--warn { background: var(--warn-bg); color: var(--warn-ink); border: none; }
.tag { font-size: .62rem; padding: .12rem .4rem; border-radius: 6px; font-weight: 700; letter-spacing: .02em; }
.tag--pii { background: var(--info-bg); color: var(--info-ink); }
.tag--art9 { background: var(--error-bg); color: var(--error-ink); }
.chip { display: inline-flex; align-items: center; font-size: .8rem; padding: .18rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); margin: 0 .2rem .3rem 0; }
.chip--yes { background: var(--success-bg); color: var(--success-ink); border: none; }
.chip--no { background: var(--error-bg); color: var(--error-ink); border: none; }
.pill { display: inline-flex; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.pill--participant { background: var(--info-bg); color: var(--info-ink); }
.pill--staff { background: var(--success-bg); color: var(--success-ink); }
.pill--other { background: var(--surface-2); color: var(--muted); }

.locked { color: var(--muted); background: var(--surface-2); border: 1px dashed var(--line); border-radius: 10px; padding: .7rem .85rem; }

/* --- Alerts -------------------------------------------------------------- */
.alert { padding: .7rem .9rem; border-radius: 10px; margin-bottom: 1rem; font-size: .9rem; }
.alert--error { background: var(--error-bg); color: var(--error-ink); border: 1px solid var(--error-line); }
.alert--success { background: var(--success-bg); color: var(--success-ink); border: 1px solid var(--success-line); }
.alert--info { background: var(--info-bg); color: var(--info-ink); border: 1px solid var(--info-line); }

/* --- Forms --------------------------------------------------------------- */
.form label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: .7rem; }
.form input, .form select, .form textarea {
    width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; margin-top: .25rem;
    background: var(--surface); color: var(--ink); font-size: .95rem; font-family: inherit;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .row { display: flex; gap: .75rem; } .form .row > label { flex: 1; }
.form-actions { margin-top: 1.1rem; display: flex; gap: .5rem; }
.field-error { color: var(--danger); font-size: .82rem; display: block; margin-top: .2rem; }
.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .7rem 0; padding: .7rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.inline-form input, .inline-form select { padding: .42rem .6rem; border: 1px solid var(--line); border-radius: 8px; width: auto; background: var(--surface); color: var(--ink); font-size: .88rem; }
.inline-form .check { display: flex; align-items: center; gap: .3rem; white-space: nowrap; font-size: .85rem; }

/* --- Auth screen --------------------------------------------------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card { width: 100%; max-width: 25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 2rem; box-shadow: var(--shadow-lg); }
.auth-card .logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.auth-card label { display: block; font-weight: 500; font-size: .9rem; margin: .9rem 0 .3rem; }
.auth-card input { width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; background: var(--surface); color: var(--ink); }
.auth-card .btn--primary { width: 100%; justify-content: center; margin-top: 1.2rem; }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

/* --- Utilities (used instead of inline styles; strict CSP has no unsafe-inline) --- */
.m-0 { margin: 0; }
.mb-tiny { margin-bottom: .1rem; }
.mb-1 { margin-bottom: 1rem; }
.mt-half { margin-top: .5rem; }
.mt-1 { margin-top: 1rem; }
.mt-r { margin: .6rem 0 0; }
.ml-auto { margin-left: auto; }
.w-full { width: 100%; }
.jc-center { justify-content: center; }
.nowrap { white-space: nowrap; }
.maxw-sm { max-width: 560px; }
.maxw-md { max-width: 640px; }
.narrow-6 { max-width: 6rem; }
.narrow-9 { max-width: 9rem; }
.check { display: flex; gap: .45rem; align-items: center; font-weight: 400; margin-bottom: .4rem; }
.check input { width: auto; margin: 0; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .9rem; }

/* --- Public sign-up form (logged-out) --- */
.public-wrap { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
.public-head { text-align: center; margin-bottom: 1.5rem; }
.logo { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.logo--center { margin: 0 auto 1rem; }
.public-wrap .form h2 { margin-top: 1.2rem; font-size: 1rem; }
.public-danke { text-align: center; max-width: 30rem; margin: 3rem auto; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .7rem; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.fieldset legend { font-size: .88rem; font-weight: 500; padding: 0 .3rem; }
.consent { align-items: flex-start; margin-top: .5rem; }
.sep { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }

/* Embed mode: strip our chrome so the form blends into camp-impact.de */
.public-wrap--embed { max-width: 620px; margin: 0 auto; padding: .25rem; }
.card--bare { border: none; box-shadow: none; background: transparent; padding: 0; }
body:has(.public-wrap--embed) { background: transparent; }

/* Match camp-impact.de: Poppins, 17px base, on the public form */
.public-wrap { font-family: 'Poppins', system-ui, -apple-system, sans-serif; font-size: 17px; }
.public-wrap .form label,
.public-wrap .form input,
.public-wrap .form select,
.public-wrap .form textarea,
.public-wrap .btn { font-family: inherit; }

/* Roomier, touch-friendly sizing for the public form (desktop + mobile) */
.public-wrap .form label { margin-bottom: 1.05rem; font-size: .95rem; }
.public-wrap .form input,
.public-wrap .form select,
.public-wrap .form textarea { padding: .7rem .8rem; font-size: 1rem; margin-top: .3rem; }
.public-wrap .form .row { gap: 1rem; }
.public-wrap .btn--primary { padding: .8rem 1.4rem; font-size: 1.05rem; }
.public-wrap .consent { font-size: .95rem; }

/* Stack the two-column rows on small screens */
@media (max-width: 600px) {
    .public-wrap .form .row { flex-direction: column; gap: 0; }
    .public-wrap .fieldset { flex-direction: column; align-items: flex-start; gap: .3rem; }
}

/* Sidebar count badge (e.g. Eingang) */
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; font-weight: 700; }

/* --- Export / print ------------------------------------------------------ */
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.export-tile { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--surface-2); }
.export-tile:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.export-tile .icon { color: var(--primary); margin-top: .1rem; }
.export-tile b { display: block; font-size: .9rem; }
.export-tile span { color: var(--muted); font-size: .8rem; }
.export-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.export-form select { padding: .42rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .88rem; }

.print-toolbar { position: sticky; top: 0; z-index: 10; display: flex; gap: .5rem; padding: .7rem 1rem; background: var(--surface); border-bottom: 1px solid var(--line); align-items: center; }
.print-doc { max-width: 920px; margin: 0 auto; padding: 1.5rem; }
.print-doc h1 { margin-bottom: .1rem; }
.print-doc .sub { color: var(--muted); margin: 0 0 1.2rem; }
.print-group { margin-bottom: 1.4rem; break-inside: avoid; }
.print-group h2 { border-bottom: 2px solid var(--ink); padding-bottom: .25rem; margin-bottom: .5rem; display: flex; justify-content: space-between; }
.print-doc .table th, .print-doc .table td { padding: .35rem .5rem; }

@media print {
    .no-print { display: none !important; }
    body { background: #fff; color: #000; }
    .print-doc { max-width: none; padding: 0; }
    .print-group { break-inside: avoid; }
    .print-group h2 { border-color: #000; }
    .table th { color: #000; }
    .table th, .table td { border-color: #999; }
    a { color: #000; text-decoration: none; }
    @page { margin: 1.4cm; }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; left: 0; top: 0; width: 250px; z-index: 60; transform: translateX(-100%);
        transition: transform .2s ease; box-shadow: var(--shadow-lg);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 50; }
    .menu-toggle { display: grid; }
    .topbar__search input { width: 150px; }
}
