:root {
  --bg: #0d0f13; --panel: #161a21; --panel-2: #1d222b; --line: #2a303b; --text: #e8ebf0; --muted: #8b93a1;
  --accent: #8b5cf6; --ok: #2fbf71; --warn: #f2b530; --bad: #ef4444; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, select, input, textarea { font: inherit; color: inherit; }
input, select, textarea { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
a { color: #b9a3ff; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 4px; font-size: 13px; word-break: break-all; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #0b0d10ee; backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; flex: 1; min-width: 180px; }
.logo { background: var(--accent); color: #fff; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: .5px; }
.title { font-weight: 700; font-size: 17px; }

main { max-width: 1200px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; display: grid; gap: 10px; }
.card.off { border-left: 4px solid var(--bad); }
.card.on { border-left: 4px solid var(--ok); }
h2 { font-size: 13px; margin: 0; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
h3 { margin: 0; font-size: 17px; }

.btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 3px 10px; font-size: 13px; }
.btn.danger { background: transparent; border: 1px solid #5b1a24; color: #fca5a5; }

.pill { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; }
.pill.on { background: #0e3a26; color: #6ee7a8; }
.pill.off { background: #3b0a17; color: #fecdd3; }
.pill.tier { background: #2a1f4d; color: #d6c8ff; }

.link { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.link > span:first-child { width: 150px; color: var(--muted); }
.link code { flex: 1; min-width: 200px; }
.ents { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.ents label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
td, th { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.notice { background: #2b230b; border: 1px solid #5c4a12; color: #fde68a; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.notice code { background: #00000040; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--panel-2); border: 1px solid var(--line); padding: 8px 16px; border-radius: 8px; transition: transform .2s; z-index: 20; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--bad); color: #fecaca; }

body.auth { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-box { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: grid; gap: 16px; }
.auth-box form { display: grid; gap: 12px; }
.auth-box label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.msg { color: #fca5a5; min-height: 1em; margin: 0; }
.ok { color: #6ee7a8; margin: 0; }

@media (max-width: 600px) {
  .link > span:first-child { width: 100%; }
}
