:root { --bg:#f2f2f7; --card:#fff; --text:#1c1c1e; --muted:#6c6c70; --line:#d9d9de; --accent:#5b3fd1; --ok:#1f8f4e; --bad:#d70015; }
@media (prefers-color-scheme: dark) { :root { --bg:#000; --card:#1c1c1e; --text:#f2f2f7; --muted:#a1a1a6; --line:#38383a; --accent:#9b87f5; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif; padding-bottom:calc(96px + env(safe-area-inset-bottom,0px)); }
main { max-width:720px; margin:0 auto; padding:16px; }
h1 { font-size:26px; margin:8px 0 12px; } h2 { font-size:18px; margin:0 0 8px; }
header { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.muted { color:var(--muted); font-size:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:14px; margin:0 0 12px; }
label { display:block; margin:0 0 10px; font-weight:600; font-size:14px; }
input[type=text],input[type=email],input[type=password],select { display:block; width:100%; margin-top:4px; padding:10px; border:1px solid var(--line); border-radius:10px; background:var(--bg); color:var(--text); font:inherit; }
button { font:inherit; padding:10px 14px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--text); }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
button.link { border:0; background:none; color:var(--muted); text-decoration:underline; }
button:disabled { opacity:.5; }
.msg { color:var(--bad); min-height:1.2em; margin:8px 0 0; }
.row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
details.card > summary { cursor:pointer; list-style:none; } details.card > summary::-webkit-details-marker { display:none; }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; } .tag { font-size:12px; padding:2px 8px; border-radius:999px; background:var(--bg); border:1px solid var(--line); color:var(--muted); }
.tag.on { color:var(--ok); border-color:var(--ok); }
.apps { margin-top:10px; border-top:1px solid var(--line); }
.app { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); min-height:44px; }
.app:last-child { border-bottom:0; }
.switch { position:relative; width:52px; height:32px; flex:none; }
.switch input { appearance:none; -webkit-appearance:none; width:52px; height:32px; margin:0; border-radius:16px; background:var(--line); position:relative; cursor:pointer; transition:background .15s; }
.switch input::after { content:""; position:absolute; top:2px; left:2px; width:28px; height:28px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 3px #0004; }
.switch input:checked { background:var(--ok); } .switch input:checked::after { left:22px; }
.switch input:indeterminate { background:#e0a800; } .switch input:indeterminate::after { left:12px; }
.switch input:disabled { opacity:.5; }
.checks { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; margin-bottom:10px; } .checks label { font-weight:400; display:flex; gap:8px; align-items:center; margin:0; }
nav.appbar { position:fixed; left:0; right:0; bottom:0; z-index:15; display:flex; justify-content:center; gap:2px; background:var(--card); border-top:1px solid var(--line); padding:6px 6px calc(6px + env(safe-area-inset-bottom,0px)); }
nav.appbar a { flex:1 1 0; max-width:140px; text-align:center; padding:14px 4px; border-radius:12px; text-decoration:none; color:var(--muted); font-weight:600; font-size:14px; }
nav.appbar a.active { color:var(--accent); background:color-mix(in srgb,var(--accent) 14%,transparent); }
.toast { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(90px + env(safe-area-inset-bottom,0px)); background:#222; color:#fff; padding:10px 16px; border-radius:12px; z-index:20; max-width:90%; }
.toast.err { background:var(--bad); }
.foot { text-align:center; margin-top:20px; }
[hidden] { display:none !important; }
table { width:100%; border-collapse:collapse; font-size:14px; } td,th { text-align:left; padding:6px 4px; border-bottom:1px solid var(--line); vertical-align:top; }
