:root {
	--bg: #0f1117; --card: #181b24; --line: #2a2f3d; --text: #e6e8ef; --muted: #8b91a3;
	--accent: #5865f2; --accent-2: #4752c4; --ok: #3ba55d; --warn: #faa61a; --err: #ed4245;
	color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 system-ui, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); background: #12151d; position: sticky; top: 0; z-index: 2; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand b { display: block; font-size: 16px; }
.brand span { color: var(--muted); font-size: 12px; }
main { max-width: 1180px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.card.narrow { max-width: 380px; margin: 60px auto; width: 100%; }
h2, h3 { margin: 0 0 12px; }
h3 { font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
label.inline { flex-direction: row; align-items: center; gap: 12px; margin: 0; }
label.inline select { flex: 1; max-width: 420px; }
label.switch { flex-direction: row; align-items: center; text-transform: none; font-size: 14px; color: var(--text); }
input, select, textarea { background: #0f1218; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit; text-transform: none; letter-spacing: 0; font-weight: 400; }
input[type=color] { padding: 2px; height: 38px; width: 80px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { resize: vertical; }
button, .button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .button:hover { background: var(--accent-2); }
button:disabled { opacity: .55; cursor: wait; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.ghost:hover { background: #222634; }
button.small { padding: 5px 10px; font-size: 12px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.status > img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--line); }
.status h2 { margin: 0; }
.grow { flex: 1; min-width: 260px; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #333; }
.badge.ok { background: rgba(59,165,93,.18); color: var(--ok); }
.badge.warn { background: rgba(250,166,26,.18); color: var(--warn); }
.badge.err { background: rgba(237,66,69,.18); color: var(--err); }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 10px; margin-top: 12px; }
.metrics div { background: #0f1218; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.metrics span { display: block; color: var(--muted); font-size: 11px; }
.metrics b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fatal { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(237,66,69,.12); color: var(--err); }
.hint, .muted { color: var(--muted); font-size: 12px; margin: 0 0 12px; }
.cmds { margin: 0; padding-left: 18px; line-height: 2; }
code { background: #0f1218; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { margin: 0; max-height: 280px; overflow: auto; background: #0b0d12; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 12px; color: #b9bfd0; white-space: pre-wrap; }
.hidden { display: none !important; }
#toast { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 10; }
#toast div { background: #222634; border: 1px solid var(--line); border-left: 4px solid var(--ok); padding: 10px 14px; border-radius: 8px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
#toast div.err { border-left-color: var(--err); }
