:root { --bg: #0f1115; --card: #181b22; --fg: #f4f5f7; --muted: #9aa3b2; --accent: #22c55e; --danger: #ef4444; --line: #262a33; --radius: 16px; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
#app { max-width: 760px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
.screen { display: none; flex-direction: column; gap: 14px; }
.screen.active { display: flex; }
.screen.center { align-items: center; text-align: center; min-height: 70vh; justify-content: center; }
h1 { font-size: 24px; margin: 0; } h2 { font-size: 22px; margin: 0; } h3 { margin: 0 0 8px; font-size: 17px; }
p { margin: 0; } .muted { color: var(--muted); } .small { font-size: 14px; } .hidden { display: none !important; }
.top { display: flex; justify-content: space-between; align-items: center; }
.row { display: flex; gap: 10px; align-items: center; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pill { padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.pill.frei { background: #14532d; color: #86efac; } .pill.besetzt { background: #713f12; color: #fde68a; } .pill.offline { background: #27272a; color: #a1a1aa; }
.btn { border: 0; border-radius: 14px; padding: 12px 18px; font-size: 16px; font-weight: 600; cursor: pointer; color: #fff; background: #2a2f3a; }
.btn.primary { background: var(--accent); color: #04120a; } .btn.danger { background: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); } .btn.small { padding: 8px 12px; font-size: 14px; }
.btn.big { width: 100%; padding: 18px; font-size: 20px; } .btn:disabled { opacity: .45; cursor: default; }
.toggle.off { background: #2a2f3a; } .toggle.on { background: var(--accent); color: #04120a; }
input[type=password] { width: 100%; padding: 14px; font-size: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); margin-bottom: 10px; }
.error { color: #fca5a5; min-height: 1em; }
.incoming { flex-direction: row; gap: 16px; border-color: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(34,197,94,.25); } }
.snap { width: 120px; height: 160px; object-fit: cover; border-radius: 12px; background: #000; flex: 0 0 auto; }
.inc-body { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.call { position: fixed; inset: 0; background: #000; display: none; }
.call.active { display: block; }
#remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
#local { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top)); width: 22vw; max-width: 200px; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,.6); transform: scaleX(-1); }
.call-top { position: absolute; left: 14px; top: calc(14px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.55); padding: 8px 12px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.call-hint { position: absolute; left: 14px; bottom: calc(100px + env(safe-area-inset-bottom)); color: #ddd; background: rgba(0,0,0,.45); padding: 4px 8px; border-radius: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
#btn-hangup { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(28px + env(safe-area-inset-bottom)); padding: 18px 36px; border-radius: 999px; font-size: 18px; }
.bar { width: min(420px, 90%); height: 10px; background: var(--card); border-radius: 999px; overflow: hidden; }
.bar div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; border-top: 0; }
.thumb { width: 54px; height: 96px; object-fit: cover; border-radius: 8px; background: #000; }
.st-done { color: #86efac; } .st-error { color: #fca5a5; } .st-wait { color: #fde68a; }
.detail { background: #11141a; border-radius: 12px; padding: 12px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; }
.detail img { max-width: 160px; border-radius: 8px; }
.detail video { width: 100%; max-width: 320px; border-radius: 8px; background: #000; }
a { color: #93c5fd; }
code { background: #11141a; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
@media (max-width: 520px) { .incoming { flex-direction: column; } .snap { width: 100%; height: 220px; } }
.tabs { margin-top: 6px; } .tab.on { color: var(--fg); border-color: var(--accent); }
#stats table td, #stats table th { text-align: right; font-variant-numeric: tabular-nums; } #stats table td:first-child, #stats table th:first-child { text-align: left; }
#stats tr.sub td:first-child { padding-left: 18px; color: var(--muted); }
#log { max-height: 460px; overflow: auto; } .step { white-space: nowrap; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: 0 0 auto; }
