:root {
  --bg: #0f1218;
  --panel: #171c26;
  --panel2: #1d2330;
  --line: #2a3242;
  --text: #e6e9ef;
  --muted: #8b95a7;
  --brand: #2b6cb0;
  --brand2: #3b82d6;
  --ok: #2f9e44;
  --bad: #e03131;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, "Segoe UI", Roboto, sans-serif; }
body.center { min-height: 100vh; display: grid; place-items: center; }
h1, h2, h3 { margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.top { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 1.5rem; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.05rem; }
nav { display: flex; gap: .25rem; flex: 1; }
.tab { background: none; border: 0; color: var(--muted); padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font: inherit; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel2); color: var(--text); }
.user { display: flex; align-items: center; gap: .6rem; }
.user img { width: 30px; height: 30px; border-radius: 50%; }

main { max-width: 980px; margin: 1.5rem auto; padding: 0 1rem 4rem; display: grid; gap: 1.25rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.25rem; }
.card.login { width: min(380px, 92vw); text-align: center; display: grid; gap: .8rem; }
.info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.info div b { display: block; font-size: 1.1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
label.field { display: grid; gap: .3rem; font-size: .9rem; color: var(--muted); }
select, input[type=text], textarea { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .6rem; font: inherit; }
select:focus, input:focus { outline: 2px solid var(--brand2); outline-offset: 0; }
select:disabled, input:disabled { opacity: .6; }

.checklist { border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.checklist input[type=text] { border: 0; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.checklist .rows { max-height: 220px; overflow: auto; padding: .3rem; }
.checklist label { display: flex; align-items: center; gap: .5rem; padding: .25rem .4rem; border-radius: 6px; cursor: pointer; color: var(--text); }
.checklist label:hover { background: rgba(255,255,255,.05); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #99aab5; flex: none; }

.btn { display: inline-block; border: 1px solid var(--line); background: var(--panel2); color: var(--text); padding: .55rem 1rem; border-radius: 8px; cursor: pointer; font: inherit; text-decoration: none; }
.btn:hover { border-color: var(--brand2); }
.btn.primary { background: var(--brand); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand2); }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }

.notice { background: rgba(240,140,0,.12); border: 1px solid rgba(240,140,0,.4); color: #f2b04d; padding: .6rem .9rem; border-radius: 8px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.right { text-align: right; white-space: nowrap; }
td a { color: var(--brand2); }

.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); padding: .7rem 1.1rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.toast.ok { border-color: var(--ok); }
.toast.bad { border-color: var(--bad); }
[hidden] { display: none !important; }

textarea { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .6rem; font: inherit; resize: vertical; }
textarea:focus { outline: 2px solid var(--brand2); }
input[type=color] { width: 64px; height: 38px; padding: 2px; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.card .grid + .actions { margin-top: 1rem; }
