:root { color-scheme: light dark; --bg:#0f172a; --card:#1e293b; --fg:#e2e8f0; --muted:#94a3b8; --accent:#facc15; --green:#16a34a; --red:#dc2626; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--fg); }
header { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; background:var(--card); position:sticky; top:0; z-index:2; }
h1 { margin:0; font-size:20px; } h2 { font-size:17px; display:flex; justify-content:space-between; align-items:center; }
main { padding:16px; max-width:720px; margin:0 auto; }
.status { font-size:13px; padding:4px 10px; border-radius:12px; background:#334155; }
.status.on { background:var(--green); color:#fff; } .status.off { background:var(--red); color:#fff; }
button { font:inherit; border:0; border-radius:10px; padding:14px 18px; background:#334155; color:var(--fg); cursor:pointer; }
button:disabled { opacity:.5; }
button.door { background:var(--accent); color:#1e293b; font-weight:600; }
button.answer { background:var(--green); color:#fff; font-weight:600; }
button.reject { background:var(--red); color:#fff; font-weight:600; }
button.secondary { background:transparent; border:1px solid #475569; }
button.small { padding:6px 10px; font-size:13px; }
.actions { display:flex; gap:10px; flex-wrap:wrap; margin:12px 0; } .actions button { flex:1; min-width:120px; }
form label { display:block; margin:10px 0; } input { width:100%; font:inherit; padding:10px; border-radius:8px; border:1px solid #475569; background:#0b1220; color:var(--fg); margin-top:4px; }
code { background:#0b1220; padding:2px 6px; border-radius:6px; font-size:13px; word-break:break-all; }
.error { color:#f87171; }
.videobox { position:relative; background:#000; border-radius:12px; overflow:hidden; aspect-ratio:4/3; }
.videobox video, .videobox img { width:100%; height:100%; object-fit:contain; display:block; }
.videobox .small { position:absolute; top:8px; right:8px; }
#calls { list-style:none; padding:0; margin:0; }
#calls li { display:flex; gap:12px; align-items:center; background:var(--card); border-radius:10px; padding:8px; margin-bottom:8px; }
#calls img { width:96px; height:72px; object-fit:cover; border-radius:6px; background:#000; flex:none; }
#calls .meta { flex:1; font-size:14px; } #calls .meta b { display:block; }
.badge { font-size:12px; padding:2px 8px; border-radius:10px; background:#334155; }
.badge.missed { background:var(--red); color:#fff; } .badge.answered { background:var(--green); color:#fff; } .badge.ringing { background:var(--accent); color:#1e293b; }
.overlay { position:fixed; inset:0; background:rgba(2,6,23,.92); display:flex; align-items:center; justify-content:center; z-index:10; padding:12px; }
.ringbox { width:100%; max-width:720px; }
.ringbox h2 { justify-content:center; font-size:24px; }
.ringactions button { padding:18px; font-size:18px; }
#toast { position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:#334155; padding:12px 18px; border-radius:10px; z-index:20; max-width:90%; }
.device { color:var(--muted); font-size:13px; margin-top:24px; } a { color:var(--accent); }
[hidden] { display:none !important; }
a { color:#93c5fd; }
.card a.btn { display:block; text-align:center; padding:16px; margin:16px 0; border-radius:12px; background:#2563eb; color:#fff; font-size:18px; font-weight:600; text-decoration:none; }
.card ol { padding-left:20px; line-height:1.6; } .card small { word-break:break-all; color:#94a3b8; }
