/* Anrufer-Popup – helles Design, Mobile-first.
   Leitmotiv: das Klingeln. Ein Anruf bekommt Wellen um den Avatar, alles andere bleibt ruhig. */

:root {
  --bg: #edf2f8; --bg2: #e1e9f3; --card: #fff;
  --ink: #10233a; --muted: #5a6c84; --line: #dae3ee;
  --brand: #0b7a85; --brand-d: #075a63; --brand-soft: #dcf1f2;
  --ring: #12b76a; --ring-soft: #dbf6e8; --ring-ink: #0b6b3e;
  --bad: #d6384c; --bad-soft: #fde7ea; --bad-ink: #9f1f30;
  --sun-soft: #fff1d0; --sun-ink: #7a4a05;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --sh: 0 1px 2px rgba(16, 35, 58, .06), 0 10px 28px -14px rgba(16, 35, 58, .22);
  --sh-pop: 0 18px 50px -12px rgba(16, 35, 58, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 64px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Kompatibilität */
  --text: var(--ink); --accent: var(--brand); --ok: var(--ring); --warn: #d97706;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.5 var(--font); color: var(--ink);
  background: linear-gradient(180deg, #d9eef0 0, var(--bg) 300px) no-repeat, var(--bg);
  min-height: 100vh;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.empty { padding: 8px 0; }
h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 22px 0 10px; letter-spacing: .01em; }
h3 { margin: 0 0 8px; font-size: 15px; }
a { color: var(--brand-d); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
.num, .tnum, td, .code { font-variant-numeric: tabular-nums; }

/* ---------- Icons ---------- */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic.sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic.lg { width: 28px; height: 28px; }

/* ---------- Marke ---------- */
.mark { position: relative; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--ring)); box-shadow: 0 6px 14px -6px rgba(11, 122, 133, .6); }
.mark .ic { width: 20px; height: 20px; }
.mark.big { width: 64px; height: 64px; border-radius: 20px; }
.mark.big .ic { width: 32px; height: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; min-width: 0; }
.brand .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spacer { flex: 1; }

/* ---------- Kopfleiste ---------- */
header.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(255, 255, 255, .84); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.on { background: var(--ring-soft); color: var(--ring-ink); }
.status.on::before { animation: breathe 2.4s ease-in-out infinite; }
.status.off { background: var(--bad-soft); color: var(--bad-ink); }
@keyframes breathe { 50% { opacity: .35; } }
.badge { display: inline-block; font-size: 11px; font-weight: 600; background: var(--brand-soft); color: var(--brand-d); padding: 2px 9px; border-radius: 99px; vertical-align: middle; }
.badge:empty { display: none; }
#whoami { font-size: 13px; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; font: inherit; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(11, 122, 133, .9); }
.btn.primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn.danger { color: var(--bad-ink); } .btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn.block { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--bg2); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.btn .ic { width: 18px; height: 18px; vertical-align: 0; }

select, input, textarea { font: inherit; font-size: 16px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); max-width: 100%;
  transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 72px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }
input[type=color] { padding: 3px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-top: 14px; box-shadow: var(--sh); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; }
.err { color: var(--bad-ink); margin: 0; min-height: 1em; font-size: 13px; }

/* ---------- Chips ---------- */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--bg2); color: var(--muted); white-space: nowrap; }
.state.ringing { background: var(--ring-soft); color: var(--ring-ink); }
.state.missed { background: var(--bad-soft); color: var(--bad-ink); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 12%, #fff); padding: 3px 10px 3px 8px; border-radius: 99px; }
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }

/* ---------- Layout Agent-App (Mobile zuerst) ---------- */
main { padding: 6px 14px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); max-width: 680px; margin: 0 auto; }
.view { display: none; }
.view.on { display: block; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; gap: 2px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bn, .tab { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 4px 2px; font: inherit; font-size: 11px; font-weight: 600;
  color: var(--muted); background: none; border: 0; border-radius: 14px; cursor: pointer; transition: color .2s; }
.bn .ic, .tab .ic { width: 22px; height: 22px; vertical-align: 0; transition: transform .25s var(--ease); }
.bn.on, .tab.on { color: var(--brand-d); }
.bn.on .ic, .tab.on .ic { transform: translateY(-1px) scale(1.08); }
.bn::before, .tab::before { content: ""; position: absolute; top: 3px; width: 46px; height: 30px; border-radius: 15px; background: var(--brand-soft); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .3s var(--ease); z-index: -1; }
.bn.on::before, .tab.on::before { opacity: 1; transform: none; }
.bn .count { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ring); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.bn .count:empty { display: none; }

/* ---------- Anruf-Karte ---------- */
.call { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 14px; box-shadow: var(--sh); }
.call.new { animation: enter .5s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }
.call.ringing { border-color: color-mix(in srgb, var(--ring) 40%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 10%, transparent), var(--sh); }
.call.ended { box-shadow: none; background: color-mix(in srgb, var(--card) 70%, transparent); }
.call-head { display: flex; align-items: center; gap: 18px; padding-right: 36px; }
.avatar { position: relative; width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 19px; color: #fff; background: var(--c, var(--brand)); }
.avatar.unknown { background: var(--bg2); color: var(--muted); }
.avatar .ic { width: 24px; height: 24px; vertical-align: 0; }
.ringing .avatar::before, .ringing .avatar::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--ring); animation: ripple 2s ease-out infinite; }
.ringing .avatar::after { animation-delay: 1s; }
@keyframes ripple { from { transform: scale(1); opacity: .75; } to { transform: scale(1.35); opacity: 0; } }
.call-title { min-width: 0; flex: 1; }
.call .num { display: block; font-size: 20px; font-weight: 700; letter-spacing: .01em; line-height: 1.2; overflow-wrap: anywhere; }
.call .to { color: var(--muted); font-size: 13px; }
.call-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.call .close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; min-height: 0; color: var(--muted); }

.match { margin-top: 14px; padding: 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--c, var(--brand)) 7%, #fff); border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 22%, #fff); }
.match .name { font-weight: 700; font-size: 17px; margin: 8px 0 6px; line-height: 1.25; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.facts span { display: inline-flex; align-items: center; gap: 6px; }
.facts .ic { width: 16px; height: 16px; vertical-align: 0; }
.facts .warn { color: var(--bad-ink); }
.offer { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--sun-soft); color: var(--sun-ink); font-size: 13px; font-weight: 500; animation: nudge .6s .25s var(--ease) both; }
.offer .ic { width: 18px; height: 18px; vertical-align: 0; }
@keyframes nudge { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.unknown { margin-top: 12px; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.actions .btn { flex: 1 1 140px; } .actions .btn.sm, .noteform .btn { flex: none; }
.noteform { display: flex; gap: 8px; margin-top: 10px; } .noteform input { flex: 1; min-width: 0; }

/* ---------- Listen ---------- */
.item { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; }
.item .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bg2); color: var(--muted); flex: none; }
.item .ico.missed { background: var(--bad-soft); color: var(--bad-ink); }
.item .ico .ic { width: 19px; height: 19px; vertical-align: 0; }
.item .grow { flex: 1; min-width: 0; } .item .grow b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .sub { color: var(--muted); font-size: 12px; }
.item .when { color: var(--muted); font-size: 12px; white-space: nowrap; }

.empty-state { text-align: center; padding: 34px 16px 20px; color: var(--muted); }
.empty-state .art { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); position: relative; }
.empty-state .art::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--brand-soft); opacity: .8; }
.empty-state .art .ic { width: 34px; height: 34px; vertical-align: 0; }
.empty-state b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty-state p { margin: 0 auto; max-width: 30ch; font-size: 14px; }

/* ---------- Sheets (Detail, Einstellungen) ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(16, 35, 58, .38); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.scrim.open { opacity: 1; visibility: visible; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow: auto; background: var(--card); border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-pop); transform: translateY(104%); visibility: hidden; transition: transform .38s var(--ease), visibility .38s; }
.sheet.open { transform: none; visibility: visible; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet .sheet-close { position: absolute; top: 14px; right: 12px; }
.sheet h1 { margin-top: 8px; }
.sheet .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin: 14px 0; }
.sheet .field select { width: 100%; }
.sheet .menu { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sheet .menu .btn { justify-content: flex-start; }
.who { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.who .avatar { width: 46px; height: 46px; font-size: 16px; }

table { width: 100%; border-collapse: collapse; margin-top: 6px; }
td, th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .panel { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 24px 20px; margin: 0; border-radius: 26px; animation: enter .55s var(--ease); }
.login .mark.big { margin: 0 auto 4px; }
.login .mark.big::before, .login .mark.big::after { content: ""; position: absolute; inset: 0; border-radius: 20px; border: 2px solid var(--ring); animation: ripple-sq 3s ease-out infinite; }
.login .mark.big::after { animation-delay: 1.5s; }
@keyframes ripple-sq { from { transform: scale(1); opacity: .5; } to { transform: scale(1.6); opacity: 0; } }
.login h1 { text-align: center; margin: 0; }
.login .panel > .muted { text-align: center; margin: 0; font-size: 14px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login input { width: 100%; }

/* ---------- Verwaltung ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
main.admin { display: block; max-width: 1100px; margin: 0 auto; padding: 4px 14px calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
#view.enter { animation: fade .22s var(--ease); }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
.bar h2 { margin: 0; font-size: 20px; color: var(--ink); letter-spacing: -.01em; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.narrow { max-width: 520px; }
.right { text-align: right; white-space: nowrap; } tr.off { opacity: .55; }
.code { font: 13px/1.45 ui-monospace, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; word-break: break-all; user-select: all; }
pre { font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; }
.form { display: flex; flex-direction: column; gap: 12px; } .form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.form input:not([type=checkbox]), .form select, .form textarea { width: 100%; } .form input[type=color] { height: 46px; }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
.check { flex-direction: row !important; align-items: center; gap: 10px !important; color: var(--ink) !important; font-size: 15px !important; font-weight: 500 !important; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.raw { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); } .raw .row input { flex: 1; min-width: 0; }
.conn .bar { margin: 0 0 8px; }
.conn-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.swatch { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c, var(--brand)); flex: none; }
.swatch .ic { width: 20px; height: 20px; vertical-align: 0; }
.step { display: flex; align-items: center; gap: 10px; }
.step .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-d); }
.step .ico .ic { width: 18px; height: 18px; vertical-align: 0; }
.step h3 { margin: 0; }

.overlay { position: fixed; inset: 0; background: rgba(16, 35, 58, .42); display: flex; align-items: flex-end; justify-content: center; z-index: 60; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } }
.dialog { background: var(--card); border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); width: 100%; max-height: 92vh; overflow: auto; animation: sheet-up .38s var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.dialog h2 { margin: 0 0 14px; font-size: 20px; color: var(--ink); letter-spacing: -.01em; } .dialog h3 { margin: 16px 0 6px; }
.dialog .actions { margin-top: 18px; } .dialog .actions .btn { flex: 1; } .dialog .actions .spacer { display: none; }

.toast { position: fixed; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 14px; z-index: 80; font-size: 14px; max-width: 92vw; box-shadow: var(--sh-pop); animation: toast-in .35s var(--ease); }
.toast.bad { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } }

/* Tabellen werden auf dem Handy zu Karten (Beschriftung kommt aus der Kopfzeile, siehe admin.js) */
@media (max-width: 719px) {
  main.admin table, main.admin tbody, main.admin tr, main.admin td { display: block; width: 100%; }
  main.admin tr:first-child:has(th) { display: none; }
  main.admin tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; margin-bottom: 10px; box-shadow: var(--sh); }
  main.admin td { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border: 0; text-align: right; }
  main.admin td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; }
  main.admin td[data-label=""]::before, main.admin td:not([data-label])::before { content: none; }
  main.admin td.right { justify-content: flex-start; flex-wrap: wrap; gap: 8px; white-space: normal; padding-top: 10px; }
  main.admin td[colspan] { display: block; text-align: left; }
  header.topbar .badge { display: none; }
}

/* ---------- Ab Tablet / Desktop ---------- */
@media (min-width: 720px) {
  .two { grid-template-columns: 1fr 1fr; }
  .dialog { border-radius: 24px; width: min(460px, 100%); animation-name: pop-in; }
  .overlay { align-items: center; padding: 16px; }
  .dialog.wide { width: min(660px, 100%); }
  .dialog .actions .btn { flex: 0 0 auto; } .dialog .actions .spacer { display: block; }
  @keyframes pop-in { from { transform: scale(.96) translateY(10px); opacity: 0; } }
  .toast { bottom: 24px; }
}
@media (min-width: 900px) {
  :root { --nav-h: 0px; }
  main { max-width: 1120px; display: grid; grid-template-columns: minmax(380px, 1.15fr) minmax(320px, 1fr); gap: 0 28px; align-items: start; padding-bottom: 48px; }
  .view { display: block; animation: none; }
  .view.on { animation: none; }
  .bottomnav { display: none; }
  .bn-only { display: none !important; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .tabs { position: static; justify-content: flex-start; gap: 4px; padding: 0 14px; background: rgba(255, 255, 255, .6); border-top: 0; border-bottom: 1px solid var(--line); backdrop-filter: none; }
  .tab { flex: none; flex-direction: row; gap: 8px; min-height: 48px; padding: 0 16px; font-size: 14px; border-radius: 0; }
  .tab::before { display: none; }
  .tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transition: transform .3s var(--ease); }
  .tab.on::after { transform: none; }
  .tab .ic { width: 20px; height: 20px; } .tab.on .ic { transform: none; }
  main.admin { padding-bottom: 60px; }
  .sheet { left: auto; top: 0; right: 0; bottom: 0; width: 460px; max-height: none; border-radius: 26px 0 0 26px; transform: translateX(104%); padding-top: 22px; }
  .sheet.open { transform: none; }
  .sheet .grab { display: none; }
  .sheet .sheet-close { top: 16px; }
  .toast { bottom: 24px; }
}
/* macOS-App: Titelleiste ist Teil der Seite (Ampel-Tasten links) */
.desktop-mac header.topbar { padding-left: 82px; -webkit-app-region: drag; }
.desktop-mac header.topbar :is(button, a, select, input) { -webkit-app-region: no-drag; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.sheet td:first-child { white-space: nowrap; }
