:root { --accent: oklch(0.45 0.13 28); --accent-hover: oklch(0.39 0.13 28); --accent-soft: oklch(0.95 0.025 28); }
@media (prefers-color-scheme: dark) { :root { --accent: oklch(0.74 0.12 28); --accent-hover: oklch(0.8 0.12 28); --accent-soft: oklch(0.3 0.05 28); } }

.lock-btn { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: 500; color: var(--muted); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2); cursor: pointer; min-height: 32px; }
.lock-btn:hover { color: var(--text); }
.lock-btn svg { width: 14px; height: 14px; }
body.locked .tabs, body.locked .bottombar { visibility: hidden; }

.lock-wrap { max-width: 440px; margin: clamp(var(--space-6), 8vh, var(--space-16)) auto 0; }
.lock-wrap .card { padding: var(--space-6); }
.lock-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: var(--space-4); }
.lock-icon svg { width: 26px; height: 26px; }
.lock-wrap h1 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.lock-wrap p { color: var(--muted); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.strength { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.strength > i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.strength.s2 > i { background: var(--warn); }
.strength.s3 > i { background: var(--ok); }
.err { color: var(--danger); font-size: var(--text-sm); min-height: 1.25em; }

.toolbar { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-4); }
.search { flex: 1 1 220px; position: relative; }
.search svg { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: var(--space-10); }
select.input.compact { width: auto; min-width: 10rem; }

.member { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-2); }
.member + .member { border-top: 1px solid var(--divider); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: var(--text-sm); background: var(--accent-soft); color: var(--accent); flex: none; }
.member-main { flex: 1; min-width: 0; cursor: pointer; background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; }
.member-name { font-weight: 500; display: block; }
.member-meta { font-size: var(--text-xs); color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin-top: 2px; }
.actions { display: flex; gap: var(--space-1); flex: none; }
.act { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--accent); display: grid; place-items: center; text-decoration: none; }
.act:hover { background: var(--accent-soft); }
.act[aria-disabled="true"] { color: var(--faint); pointer-events: none; opacity: .5; }
.act svg { width: 18px; height: 18px; }
.gtag { display: inline-block; font-size: var(--text-xs); padding: 0 var(--space-2); border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.gtag.flag { background: var(--warn-soft); color: var(--warn); }

.chunk-list { display: grid; gap: var(--space-2); }
.chunk { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); }
.chunk.done { opacity: .6; }
.chunk-info { font-size: var(--text-sm); }
.chunk-info strong { display: block; font-weight: 500; }
.preview-box { background: var(--surface-2); border-radius: var(--radius); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; }
.copy-area { width: 100%; min-height: 80px; font-size: var(--text-xs); }

.call-card { display: grid; gap: var(--space-3); }
.call-head { display: flex; align-items: center; gap: var(--space-3); }
.call-head .avatar { width: 56px; height: 56px; font-size: var(--text-base); }
.call-name { font-size: var(--text-lg); font-weight: 600; }
.call-btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.call-btns .btn { min-height: 48px; }
.result-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.result-btns .btn { min-height: 44px; padding-inline: var(--space-2); }
.call-progress { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--muted); }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.log li { display: flex; gap: var(--space-2); }
.log time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; width: 5.5rem; }

.occ { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-2); }
.occ + .occ { border-top: 1px solid var(--divider); }
.occ-date { width: 3.5rem; flex: none; text-align: center; }
.occ-day { font-size: var(--text-lg); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.occ-mon { font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.badge.round { background: var(--accent-soft); color: var(--accent); }

.map-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.map-table td { padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--divider); }
.map-table td:first-child { color: var(--muted); width: 45%; overflow-wrap: anywhere; }
.map-table select { min-height: 36px; font-size: var(--text-sm); }
.call-btns { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
@media (max-width: 600px) { .toolbar select.input.compact { flex: 1 1 100%; width: 100%; } }

/* Wechsel zur anderen App: reiner Link, keine Datenübergabe */
.app-switch { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: 500; color: var(--muted); text-decoration: none; border: 1px solid var(--border); border-radius: 999px; padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2); min-height: 32px; white-space: nowrap; }
.app-switch:hover { color: var(--text); }
.app-switch svg { width: 14px; height: 14px; }
.app-switch ~ .local-pill, .app-switch ~ .lock-btn { margin-left: 0; }
.topbar-inner:has(.app-switch) { gap: var(--space-4); }
@media (max-width: 420px) { .app-switch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .app-switch { padding: var(--space-1) var(--space-2); } }

/* Geräteabgleich */
.sync-banner { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.sync-note { align-items: center; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; display: inline-block; }
.sync-dot.ok { background: var(--ok); }
.sync-dot.warn { background: var(--warn); }
.sync-dot.busy { background: var(--accent); animation: syncpulse 1.2s var(--ease) infinite; }
@keyframes syncpulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .sync-dot.busy { animation: none; } }
.dev-list, .conf-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.dev-list li, .conf-list li { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius); }
.dev-list li > div, .conf-list li > div:first-child { flex: 1; min-width: 0; }
.dev-list .sync-dot { margin-top: 2px; }
.conf-list li { flex-direction: column; align-items: stretch; }
.pair-code, .sas { font-size: var(--text-xl); font-weight: 600; letter-spacing: .12em; text-align: center; padding: var(--space-4); border-radius: var(--radius); background: var(--surface-2); font-variant-numeric: tabular-nums; margin: var(--space-3) 0; user-select: all; }
.pair-input { text-transform: uppercase; letter-spacing: .12em; font-variant-numeric: tabular-nums; }

/* Eingebettet im Ämter-Planer */
.embedded #app-switch { display: none; }
.embedded .topbar { position: static; }
