* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background: #0f172a; color: #f8fafc; min-height: 100vh; padding: 20px 24px; }
[hidden] { display: none !important; }
h1 { font-size: 1.4rem; }
header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
header h1 { flex: 1; }
.box { max-width: 360px; margin: 12vh auto; background: #1e293b; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
input, textarea { background: #0f172a; color: #f8fafc; border: 1px solid #334155; border-radius: 8px; padding: 9px 10px; font-size: 0.95rem; width: 100%; }
button { background: #0284c7; color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-weight: bold; cursor: pointer; }
button.ghost { background: transparent; border: 1px solid #475569; color: #cbd5e1; }
button.danger { background: #dc2626; }
button.small { padding: 5px 10px; font-size: 0.8rem; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: #94a3b8; margin-bottom: 12px; }
.err { color: #f87171; font-size: 0.85rem; min-height: 1.2em; }
.ok { color: #4ade80; font-size: 0.85rem; }
.note { color: #94a3b8; font-size: 0.85rem; margin-bottom: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.card { background: #1e293b; border: 1px solid #334155; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.off { opacity: 0.6; }
.card .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card .id { color: #94a3b8; font-size: 0.8rem; }
.card a { color: #38bdf8; font-size: 0.85rem; word-break: break-all; }
.switch { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; cursor: pointer; }
.switch small { display: block; color: #94a3b8; }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 12px; background: #475569; position: relative; cursor: pointer; flex: none; margin: 0; padding: 0; border: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left 0.2s; }
.switch input:checked { background: #0284c7; }
.switch input:checked::after { left: 21px; }
.switch input:disabled { opacity: 0.4; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
details { background: #0f172a; border: 1px solid #334155; border-radius: 10px; padding: 8px 10px; font-size: 0.82rem; }
details summary { cursor: pointer; font-weight: bold; }
.kv { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.kv code { flex: 1; word-break: break-all; background: #1e293b; padding: 4px 6px; border-radius: 6px; }
dialog { background: #1e293b; color: #f8fafc; border: 1px solid #334155; border-radius: 14px; padding: 22px; width: min(480px, 94vw); margin: auto; }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { margin-bottom: 14px; }
