:root { --bg:#0f1720; --card:#17212c; --ink:#e8eef5; --mute:#9fb0c2; --line:#2a3949; --acc:#3fb6a8; --acc2:#2a8f84; --warn:#f2b84b; --bad:#e5605a; color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.top { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--bg); z-index:2; flex-wrap:wrap; }
.brand { font-weight:700; letter-spacing:.2px; display:flex; gap:8px; align-items:center; }
.logo { color: var(--acc); }
.top-actions { display:flex; gap:6px; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
footer { max-width:760px; margin: 24px auto; padding: 0 16px 32px; color: var(--mute); font-size: 13px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.card { background: var(--card); border:1px solid var(--line); border-radius: 14px; padding: 18px; margin: 12px 0; }
.card.narrow { max-width: 520px; margin: 24px auto; }
.center { text-align:center; }
h1 { font-size: 22px; margin: 4px 0 12px; } h2 { font-size: 18px; margin: 0 0 10px; }
p { margin: 8px 0; } .small { color: var(--mute); font-size: 14px; }
button { font: inherit; color: var(--ink); background: #22303f; border:1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor:pointer; min-height: 42px; }
button:hover { border-color: var(--acc); } button:disabled { opacity:.45; cursor:not-allowed; }
button.primary { background: var(--acc2); border-color: var(--acc); color:#fff; font-weight:600; }
button.danger { background: #3a1f22; border-color: var(--bad); color:#ffd9d6; }
button.link { background: none; border: none; color: var(--acc); text-decoration: underline; min-height: 36px; }
button.big { font-size: 18px; padding: 14px 20px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; margin-top: 12px; } .actions.col { flex-direction: column; align-items: stretch; }
input, select, textarea { font: inherit; color: var(--ink); background: #0c131b; border:1px solid var(--line); border-radius:10px; padding: 10px; width: 100%; }
input[type=checkbox] { width:auto; } label { display:block; margin: 10px 0 4px; color: var(--mute); font-size: 14px; }
label.check { display:flex; gap:8px; align-items:center; color: var(--ink); }
.form-row { margin: 6px 0; } .inline { display:flex; gap:6px; } .inline input { flex:1; }
.toolbar { display:flex; gap:8px; } .toolbar input { flex: 2; } .toolbar select { flex: 1; }
.list { list-style:none; padding:0; margin: 8px 0; }
.list li { border-bottom: 1px solid var(--line); display:flex; align-items:center; gap:8px; padding: 6px 0; }
.item-open { flex:1; text-align:left; background:none; border:none; display:flex; flex-direction:column; }
.name { font-weight:600; } .sub { color: var(--mute); font-size: 13px; }
.key-row > div:first-child { flex: 1; }
.empty { color: var(--mute); justify-content:center; padding: 24px 0 !important; }
.field { display:grid; grid-template-columns: 110px 1fr auto auto; gap:8px; align-items:center; padding: 6px 0; border-bottom:1px solid var(--line); }
.field .label { color: var(--mute); font-size: 14px; } .value { word-break: break-all; white-space: pre-wrap; margin:0; font: inherit; }
code.secret { font-family: ui-monospace, Menlo, Consolas, monospace; background:#0c131b; padding:6px 8px; border-radius:8px; word-break: break-all; display:block; }
.hidden { display:none !important; }
.warn { background: #3a2f17; border:1px solid var(--warn); color: #ffe7b8; padding: 10px 14px; border-radius:10px; margin: 10px 16px; }
.card .warn { margin: 10px 0; } .warn.big p { font-weight: 600; }
.note { background:#14313a; border:1px solid var(--acc2); padding: 8px 14px; margin: 10px 16px; border-radius:10px; }
.meter { height: 8px; background:#0c131b; border-radius: 8px; overflow:hidden; margin-top: 10px; }
.meter-bar { height:100%; width: 20%; background: var(--bad); transition: width .2s; }
.meter-bar.s2 { background: var(--warn); } .meter-bar.s3 { background: #b9c94b; } .meter-bar.s4 { background: var(--acc); }
.reasons { color: var(--warn); font-size: 14px; padding-left: 18px; }
.overlay { position: fixed; inset: 0; background: rgba(4,8,12,.72); display:flex; align-items:center; justify-content:center; padding: 16px; z-index: 10; }
.modal { max-width: 480px; width: 100%; max-height: 90vh; overflow:auto; }
.busy { text-align:center; } .spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--acc); border-radius:50%; margin: 0 auto 10px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.keyart { font-size: 44px; text-align:center; } .step { font-size: 17px; text-align:center; min-height: 2em; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background:#22303f; border:1px solid var(--acc); padding: 10px 16px; border-radius: 10px; opacity:0; transition: opacity .2s; pointer-events:none; z-index: 20; max-width: 90vw; }
#toast.show { opacity:1; }
.probe-pass strong { color: var(--acc); } .probe-fail strong { color: var(--bad); }
.danger-zone { border-color: #5a2a2a; } .loading { text-align:center; color: var(--mute); padding: 40px; }
@media (max-width: 560px) { .field { grid-template-columns: 1fr auto auto; } .field .label { grid-column: 1 / -1; } .toolbar { flex-wrap: wrap; } }
