/* #Troep7 — design tokens en componenten overgenomen uit uurregistratie (Quicksand, navy/rood). */
@font-face{font-family:Quicksand;font-weight:300;font-display:swap;src:url(fonts/Quicksand-Light.ttf)}
@font-face{font-family:Quicksand;font-weight:400;font-display:swap;src:url(fonts/Quicksand-Regular.ttf)}
@font-face{font-family:Quicksand;font-weight:500;font-display:swap;src:url(fonts/Quicksand-Medium.ttf)}
@font-face{font-family:Quicksand;font-weight:700;font-display:swap;src:url(fonts/Quicksand-Bold.ttf)}

:root{
  --navy:#00394E; --red:#E30613;
  --bg:#F3F6F8; --surface:#FFFFFF; --surface-2:#EAF0F3;
  --text:#00394E; --muted:#5C7682; --line:#DCE5EA;
  --pos:#1B8A5A; --pos-bg:#E3F4EC; --neg:#E30613; --neg-bg:#FDE7E8;
  --wait:#B26A00; --wait-bg:#FFF1D6;
  --accent:#6B5BD6; --accent-bg:#ECE9FB;
  --primary:var(--navy); --on-primary:#fff;
  --shadow:0 1px 2px rgba(0,57,78,.06),0 4px 16px rgba(0,57,78,.06);
  color-scheme:light;
}
/* Donker: volgt het systeem, tenzij manueel licht gekozen; of manueel donker. */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#06171F; --surface:#0C2530; --surface-2:#12313E;
    --text:#E8F1F4; --muted:#8FA9B3; --line:#1C3F4D;
    --pos:#4CC98F; --pos-bg:#123A2B; --neg:#FF5A63; --neg-bg:#3F1519;
    --wait:#FFB547; --wait-bg:#3A2A0C;
    --accent:#A79BFF; --accent-bg:#25214A;
    --primary:var(--red); --shadow:none; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#06171F; --surface:#0C2530; --surface-2:#12313E;
  --text:#E8F1F4; --muted:#8FA9B3; --line:#1C3F4D;
  --pos:#4CC98F; --pos-bg:#123A2B; --neg:#FF5A63; --neg-bg:#3F1519;
  --wait:#FFB547; --wait-bg:#3A2A0C;
  --accent:#A79BFF; --accent-bg:#25214A;
  --primary:var(--red); --shadow:none; color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0}
body{font-family:Quicksand,system-ui,sans-serif;background:var(--bg);color:var(--text);
  -webkit-font-smoothing:antialiased;font-weight:500;-webkit-tap-highlight-color:transparent}
button,input,select,textarea{font:inherit;color:inherit}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}

/* ---------- layout ---------- */
.app{display:grid;grid-template-columns:240px 1fr;min-height:100vh}
.side{background:var(--surface);border-right:1px solid var(--line);padding:28px 18px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:28px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:22px;letter-spacing:-.01em}
.brand img{width:36px;height:36px;border-radius:9px}
.brand span b{color:var(--red)}
.nav{display:flex;flex-direction:column;gap:4px}
.nav button{all:unset;cursor:pointer;display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:12px;font-weight:600;color:var(--muted);position:relative}
.nav button svg{width:20px;height:20px}
.nav button.on{background:var(--surface-2);color:var(--text)}
.nav button.on svg{color:var(--red)}
.badge{min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;margin-left:auto}
.side .who{margin-top:auto;display:flex;flex-direction:column;gap:10px;font-size:13px;color:var(--muted)}
.side .who .me{display:flex;align-items:center;gap:10px;color:var(--text);font-weight:700;font-size:14px}
main{padding:32px clamp(16px,4vw,48px) 48px;max-width:1100px;width:100%}
.topbar,.tabbar{display:none}

h1{font-size:28px;font-weight:700;margin:0}
h2{font-size:17px;font-weight:700;margin:0 0 12px}
.sub{color:var(--muted);font-weight:500;margin-top:4px}
.head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.card{background:var(--surface);border-radius:20px;box-shadow:var(--shadow);padding:22px;border:1px solid var(--line)}
.grid{display:grid;gap:16px}
.cols-2{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
.stack{display:flex;flex-direction:column;gap:16px}

/* ---------- knoppen en invoer ---------- */
.btn{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-sizing:border-box;text-align:center;
  padding:13px 18px;border-radius:14px;font-weight:700;background:var(--surface-2);min-height:48px}
.btn svg{width:20px;height:20px}
.btn.p{background:var(--primary);color:var(--on-primary)}
.btn.red{background:var(--red);color:#fff}
.btn.ok{background:var(--pos);color:#fff}
.btn.ghost{background:transparent;border:1px solid var(--line)}
.btn.sm{padding:9px 14px;min-height:40px;font-size:14px;border-radius:12px}
.btn.block{width:100%}
.btn:disabled,.btn[aria-disabled="true"]{opacity:.5;cursor:default}
.btn:focus-visible,.tile:focus-visible,.nav button:focus-visible,.chip:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.link{all:unset;cursor:pointer;color:var(--red);font-weight:700}
.iconbtn{all:unset;cursor:pointer;width:44px;height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);border:1px solid var(--line);flex:none}
.iconbtn svg{width:20px;height:20px}
.seg{display:inline-flex;background:var(--surface-2);border-radius:12px;padding:3px;flex-wrap:wrap}
.seg button{all:unset;cursor:pointer;white-space:nowrap;padding:8px 13px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted)}
.seg button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:var(--surface-2);font-weight:700;font-size:14px;border:2px solid transparent;min-height:24px}
.chip.on{border-color:var(--c,var(--primary));background:color-mix(in srgb,var(--c,var(--primary)) 14%,var(--surface))}
.chip.day{width:40px;justify-content:center;padding:8px 0}
.form{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form .full{grid-column:1/-1}
.form label,.field{font-size:12px;color:var(--muted);font-weight:600;display:flex;flex-direction:column;gap:6px}
.form input,.form select,.form textarea,.input{border:1px solid var(--line);background:var(--surface-2);border-radius:12px;padding:12px;font-size:16px;font-weight:600;width:100%;color:var(--text)}
.form textarea{font-weight:500;resize:vertical;min-height:70px}
.check{flex-direction:row!important;align-items:center;gap:10px!important;font-size:15px!important;color:var(--text)!important;cursor:pointer}
.check input{width:22px!important;height:22px;accent-color:var(--primary)}
.err{color:var(--neg);font-size:14px;font-weight:600;min-height:20px}
.hint{font-size:13px;color:var(--muted);font-weight:500}
.stepper{display:flex;align-items:center;gap:8px}
.stepper button{all:unset;cursor:pointer;width:44px;height:44px;border-radius:12px;background:var(--surface-2);text-align:center;line-height:44px;font-weight:700;font-size:20px}
.stepper input{width:80px;text-align:center}
.swatches{display:flex;gap:10px;flex-wrap:wrap}
.swatch{all:unset;cursor:pointer;width:36px;height:36px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 3px var(--surface),0 0 0 2px transparent}
.swatch.on{box-shadow:inset 0 0 0 3px var(--surface),0 0 0 3px var(--c)}
.emojis{display:flex;gap:6px;flex-wrap:wrap}
.emojis button{all:unset;cursor:pointer;width:40px;height:40px;border-radius:10px;text-align:center;line-height:40px;font-size:22px;background:var(--surface-2)}
.emojis button.on{outline:2px solid var(--primary)}

/* ---------- avatars en status ---------- */
.av{--c:var(--navy);width:36px;height:36px;border-radius:50%;flex:none;display:inline-flex;align-items:center;justify-content:center;
  background:color-mix(in srgb,var(--c) 18%,var(--surface));box-shadow:inset 0 0 0 2px var(--c);font-size:18px;font-weight:700;color:var(--c)}
.av.xs{width:20px;height:20px;font-size:11px;vertical-align:middle;box-shadow:inset 0 0 0 1.5px var(--c)}
.av.lg{width:64px;height:64px;font-size:32px}
.av.xl{width:96px;height:96px;font-size:48px}
.row.appr .acts{display:flex;gap:8px;flex:none}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:12px;font-weight:700;padding:4px 9px;border-radius:999px;white-space:nowrap}
.tag.ok{background:var(--pos-bg);color:var(--pos)}
.tag.wait{background:var(--wait-bg);color:var(--wait)}
.tag.no{background:var(--neg-bg);color:var(--neg)}
.tag.info{background:var(--surface-2);color:var(--muted)}
.pts{font-weight:700;color:var(--accent)}
.pos{color:var(--pos)}.neg{color:var(--neg)}
.empty{color:var(--muted);text-align:center;padding:28px 12px;font-weight:600}
.empty .big{font-size:40px;display:block;margin-bottom:8px}

@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .av{color:color-mix(in srgb,var(--c) 55%,#fff);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--c) 55%,#fff)}}
:root[data-theme="dark"] .av{color:color-mix(in srgb,var(--c) 55%,#fff);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--c) 55%,#fff)}

/* ---------- lijsten ---------- */
.row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.row:first-child{border-top:0}
.row .main{flex:1;min-width:0}
.row .title{font-weight:700;overflow-wrap:anywhere}
.row .meta{font-size:13px;color:var(--muted);font-weight:600;margin-top:2px}
.row.click{cursor:pointer;border-radius:12px}
.row.click:hover{background:var(--surface-2)}
.row .ico{font-size:24px;width:40px;height:40px;flex:none;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.row.off{opacity:.55}
.kidhead{display:flex;align-items:center;gap:12px;margin-bottom:6px}
.kidhead h2{margin:0;flex:1}

/* ---------- dagnavigatie ---------- */
.daynav{display:flex;align-items:center;gap:8px}
.daynav .lbl{min-width:0;text-align:center}
.daynav .lbl b{display:block;font-size:20px}
.daynav .lbl small{color:var(--muted);font-weight:600}

/* ---------- kind: tegels ---------- */
.hello{display:flex;align-items:center;gap:16px;margin-bottom:22px}
.hello h1{font-size:30px}
.balance{display:inline-flex;align-items:center;gap:8px;background:var(--accent-bg);color:var(--accent);font-weight:700;padding:10px 16px;border-radius:999px;font-size:18px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px}
.tile{all:unset;cursor:pointer;box-sizing:border-box;background:var(--surface);border:2px solid var(--line);border-radius:24px;padding:20px 18px;min-height:190px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;box-shadow:var(--shadow);transition:transform .12s}
.tile:active{transform:scale(.97)}
.tile .em{font-size:56px;line-height:1.1}
.tile .t{font-weight:700;font-size:19px}
.tile .p{font-weight:700;color:var(--accent)}
.tile .when{font-size:13px;color:var(--muted);font-weight:600}
.tile.pending{border-color:var(--wait);background:color-mix(in srgb,var(--wait) 8%,var(--surface))}
.tile.approved{border-color:var(--pos);background:color-mix(in srgb,var(--pos) 10%,var(--surface))}
.tile.approved .em{filter:saturate(.6)}
.tile.rejected{border-color:var(--neg)}
.tile.locked{cursor:default;opacity:.7}
.tile.pop{animation:pop .5s ease}
@keyframes pop{0%{transform:scale(1)}40%{transform:scale(1.06)}100%{transform:scale(1)}}

.tile .turn{font-size:12px;font-weight:700;color:var(--accent);background:var(--accent-bg);padding:3px 9px;border-radius:999px}
.streak{font-size:13px;font-weight:700;color:var(--wait);background:var(--wait-bg);padding:3px 9px;border-radius:999px;white-space:nowrap}
.tile.reward .p{font-size:18px}
.tile.reward.cant{opacity:.55}

/* ---------- leaderboard en badges ---------- */
.board{display:flex;flex-direction:column;gap:10px}
.brow{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--surface);border:1px solid var(--line)}
.brow .rank{width:30px;text-align:center;font-weight:700;font-size:20px;flex:none}
.bmain{flex:1;min-width:0}
.bname{font-weight:700}
.bar{height:10px;border-radius:999px;background:var(--surface-2);margin:6px 0 4px;overflow:hidden}
.bar i{display:block;height:100%;border-radius:999px}
.brow .meta{font-size:12px;color:var(--muted);font-weight:600}
.bval{font-size:22px;min-width:52px;text-align:right}
.badges{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.badge-tile{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:16px 10px;border-radius:18px;background:var(--surface-2)}
.badge-tile .bicon{font-size:40px;line-height:1.1}
.badge-tile small{font-size:12px;color:var(--muted);font-weight:600}
.badge-tile.locked{opacity:.5}
.badge-tile.locked .bicon{font-size:26px;filter:grayscale(1)}
.badge-tile.pop{animation:pop .6s ease}
.order{display:flex;flex-direction:column;gap:6px}
.order .ord{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;background:var(--surface-2);font-weight:700}
.order .ord .n{width:22px;text-align:center;color:var(--muted)}
.order .ord .sp{flex:1}
.order .ord button{all:unset;cursor:pointer;width:36px;height:36px;border-radius:10px;text-align:center;line-height:36px;background:var(--surface)}

/* ---------- agenda ---------- */
.ev{display:flex;align-items:flex-start;gap:12px;padding:10px 12px;border-radius:12px;border-left:4px solid var(--c);background:color-mix(in srgb,var(--c) 7%,var(--surface));margin-bottom:8px;cursor:pointer}
.ev:last-child{margin-bottom:0}
.ev .evtime{font-size:13px;font-weight:700;color:var(--muted);min-width:86px;padding-top:2px}
.ev .main{flex:1;min-width:0}
.ev .who{display:flex;gap:3px;flex-wrap:wrap;justify-content:flex-end}
.ev.small{cursor:default}
.week7{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}
.wday{padding:12px;border-radius:16px}
.wday.today{outline:2px solid var(--red)}
.wday .ev{flex-direction:column;gap:2px;padding:8px}
.wday .ev .evtime{min-width:0}
.wday .ev .who{justify-content:flex-start}
.wdh{all:unset;cursor:pointer;display:flex;justify-content:space-between;align-items:center;width:100%;margin-bottom:8px;font-size:14px}
.month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.mh{text-align:center;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase}
.mday{all:unset;cursor:pointer;box-sizing:border-box;min-height:104px;padding:6px;border-radius:12px;background:var(--surface);border:1px solid var(--line);display:flex;flex-direction:column;gap:3px;overflow:hidden}
.mday.other{opacity:.45}
.mday.today{outline:2px solid var(--red)}
.mnum{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:14px}
.mev{font-size:11px;font-weight:700;padding:2px 5px;border-radius:6px;background:color-mix(in srgb,var(--c) 16%,var(--surface));border-left:3px solid var(--c);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mmore{font-size:11px;color:var(--muted);font-weight:700}
.pdots{display:inline-flex;gap:3px}
.pdot{width:9px;height:9px;border-radius:50%;border:2px solid var(--c);background:var(--c);display:inline-block}
.pdot.away{background:transparent;opacity:.6}
.pdot.arrives{background:linear-gradient(90deg,transparent 50%,var(--c) 50%)}
.pdot.leaves{background:linear-gradient(90deg,var(--c) 50%,transparent 50%)}
.pres{margin-bottom:12px}
.pchip{cursor:default}
.pchip.here{border-color:var(--c);background:color-mix(in srgb,var(--c) 14%,var(--surface))}
.pchip.away{opacity:.65;border-style:dashed;border-color:var(--c)}
.pchip.arrives,.pchip.leaves{border-color:var(--c)}
.away-note{font-size:14px;color:var(--muted);font-weight:600;padding:8px 0}
@media (max-width:1000px){.week7{grid-template-columns:1fr}.wday .ev{flex-direction:row;gap:12px}.wday .ev .evtime{min-width:86px}}
@media (max-width:700px){.mday{min-height:64px;padding:4px}.mev{font-size:0;height:6px;padding:0;border-left:0;background:var(--c)}.mmore{font-size:10px}}

/* ---------- synchronisatie en lijsten ---------- */
.syncpill{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;padding:5px 10px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.syncpill i{width:8px;height:8px;border-radius:50%;background:var(--pos)}
.syncpill.busy i{background:var(--wait)}
.syncpill.off{background:var(--wait-bg);color:var(--wait)}
.syncpill.off i{background:var(--wait)}
.side .syncpill{align-self:flex-start}
.listcard{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.listcard .ico{font-size:24px;width:44px;height:44px;flex:none;border-radius:12px;background:var(--surface-2);display:flex;align-items:center;justify-content:center}
.listcard .main{flex:1;min-width:0}
.listcard .title{font-weight:700;font-size:17px}
.listcard .meta{font-size:13px;color:var(--muted);font-weight:600}
.listcard .who{display:flex;gap:3px}
.additem{display:flex;gap:8px;padding:10px;margin-bottom:14px;position:sticky;top:8px;z-index:5}
.additem input{flex:1;min-width:0}
.additem select{width:auto;max-width:42%}
.additem .btn{min-height:46px;padding:0 14px}
.card.sortable,.card.checkedbox{padding:6px 14px;margin-bottom:12px}
.checkedbox h2{font-size:14px;color:var(--muted);margin:8px 0 6px}
.li{display:flex;align-items:center;gap:10px;padding:4px 0;border-top:1px solid var(--line)}
.card > .li:first-child,.kidhead + .li,.checkedbox .hint + .li{border-top:0}
.tick{all:unset;cursor:pointer;width:30px;height:30px;flex:none;border-radius:50%;border:2px solid var(--muted);display:flex;align-items:center;justify-content:center;margin:6px 0}
.li.done .tick{background:var(--pos);border-color:var(--pos);color:#fff}
.lt{all:unset;cursor:pointer;flex:1;min-width:0;padding:8px 0;display:flex;flex-direction:column}
.lt span{font-weight:600;font-size:17px;overflow-wrap:anywhere}
.lt small{font-size:13px;color:var(--muted);font-weight:600}
.li.done .lt span{text-decoration:line-through;color:var(--muted)}
.drag{all:unset;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;width:30px;height:40px;flex:none;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:20px;border-radius:8px}
.drag:focus-visible{outline:3px solid var(--accent)}
.sortable .li{transition:transform .15s ease;background:var(--surface);position:relative}
.sortable .li.dragging{transition:none;z-index:3;box-shadow:0 8px 24px rgba(0,25,35,.18);border-radius:12px;cursor:grabbing}
.sync-dot{width:8px;height:8px;border-radius:50%;background:var(--wait);flex:none}
.checkedbox{opacity:.85}
.morelist{display:flex;flex-direction:column}
.morelist .row{all:unset;cursor:pointer;display:flex;align-items:center;gap:14px;padding:14px 6px;border-top:1px solid var(--line)}
.morelist .row:first-child{border-top:0}
.morelist .badge{position:static}
@media (max-width:700px){.topbar .syncpill span{display:none}.topbar .syncpill{padding:8px}.additem{top:calc(env(safe-area-inset-top) + 66px)}}

/* ---------- aanmelden, profielen en pincode ---------- */
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:calc(env(safe-area-inset-top) + 24px) 16px calc(env(safe-area-inset-bottom) + 24px)}
.login{width:min(400px,100%);padding:32px 28px;display:flex;flex-direction:column;gap:12px}
.login .brand{justify-content:center;font-size:28px;margin-bottom:10px}
.login .brand img{width:56px;height:56px;border-radius:14px}
.btn.sso{width:100%;background:var(--surface);border:1px solid var(--line);color:var(--text)}
.profiles{width:min(760px,100%);text-align:center}
.profiles .brand{justify-content:center;margin-bottom:8px}
.pgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin:28px 0}
.pbtn{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:12px;padding:24px 12px;border-radius:24px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);font-weight:700;font-size:20px}
.pbtn:active{transform:scale(.97)}
.pin{width:min(360px,100%);text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}
.dots{display:flex;gap:16px;margin:8px 0}
.dots i{width:18px;height:18px;border-radius:50%;border:2px solid var(--muted)}
.dots i.on{background:var(--text);border-color:var(--text)}
.dots.shake{animation:shake .35s}
@keyframes shake{20%,60%{transform:translateX(-10px)}40%,80%{transform:translateX(10px)}}
.keypad{display:grid;grid-template-columns:repeat(3,84px);gap:14px;justify-content:center}
.keypad button{all:unset;cursor:pointer;width:84px;height:84px;border-radius:50%;background:var(--surface);border:1px solid var(--line);font-size:30px;font-weight:700;text-align:center;line-height:84px;box-shadow:var(--shadow)}
.keypad button:active{background:var(--surface-2)}
.keypad button.fn{background:transparent;border:0;box-shadow:none;font-size:16px;color:var(--muted)}

/* ---------- sheet en toast ---------- */
.scrim{position:fixed;inset:0;background:rgba(0,25,35,.45);display:flex;align-items:center;justify-content:center;z-index:50;padding:16px}
.sheet{background:var(--surface);border-radius:22px;padding:24px;width:min(540px,100%);max-height:90vh;overflow:auto}
.sheethead{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.sheethead h2{flex:1;margin:0;font-size:19px}
.btns{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap}
.btns .btn{flex:1}
.toast{position:fixed;left:50%;bottom:32px;transform:translateX(-50%);background:var(--navy);color:#fff;padding:12px 18px;border-radius:14px;font-weight:600;z-index:100;box-shadow:0 8px 24px rgba(0,0,0,.2);max-width:calc(100% - 32px)}
.toast.err{background:var(--red)}
.offline{position:sticky;top:8px;z-index:20;margin:0 0 16px;padding:10px 14px;border-radius:12px;background:var(--wait-bg);color:var(--wait);font-weight:700;font-size:14px;text-align:center}
.appver{font-size:11px;color:var(--muted);opacity:.8}

/* ---------- tablet ---------- */
@media (max-width:1000px){
  .app{grid-template-columns:200px 1fr}
}
/* ---------- telefoon ---------- */
@media (max-width:700px){
  .app{display:block}
  .side{display:none}
  .topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}
  .topbar .brand{font-size:19px}
  .topbar .brand img{width:30px;height:30px;border-radius:8px}
  main{padding:20px 16px calc(100px + env(safe-area-inset-bottom))}
  h1{font-size:24px}
  .tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;position:fixed;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:8px 8px calc(8px + env(safe-area-inset-bottom));z-index:10}
  .tabbar button{all:unset;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11px;font-weight:600;color:var(--muted);position:relative;padding:4px 0}
  .tabbar button svg{width:26px;height:26px}
  .tabbar button.on{color:var(--red)}
  .tabbar .badge{position:absolute;top:-2px;left:calc(50% + 6px);margin:0;min-width:18px;height:18px;font-size:11px}
  .card{padding:18px;border-radius:18px}
  .row.appr{flex-wrap:wrap}
  .row.appr .acts{width:100%}
  .row.appr .acts .btn:last-child{flex:1}
  .form{grid-template-columns:1fr}
  .tiles{grid-template-columns:repeat(2,1fr);gap:12px}
  .tile{min-height:160px;padding:16px 10px}
  .tile .em{font-size:46px}
  .tile .t{font-size:16px}
  .hello h1{font-size:24px}
  .scrim{align-items:flex-end;padding:0}
  .sheet{border-radius:22px 22px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .toast{bottom:calc(96px + env(safe-area-inset-bottom))}
  .offline{top:calc(env(safe-area-inset-top) + 70px)}
  .keypad{grid-template-columns:repeat(3,76px)}
  .keypad button{width:76px;height:76px;line-height:76px}
}
.order .ord button:disabled{opacity:.3;cursor:default}
.form input,.form select{min-width:0}
.form label > span[style*="display:flex"] > input[type=date]{flex:1.4}
.form label > span[style*="display:flex"] > input[type=time]{flex:1}
