:root {
  --bg: #0a0c11;
  --bg2: #10131b;
  --card: #141824;
  --line: #1f2534;
  --txt: #e6e9f2;
  --dim: #8b93a7;
  --acc: #7c5cff;
  --acc2: #a78bfa;
  --red: #ff4d5e;
  --green: #37d67a;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, #1a1440 0%, var(--bg) 55%);
  color: var(--txt);
  font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
}

.hidden { display: none !important; }
.view { min-height: 100%; }

.logo {
  font-weight: 800;
  letter-spacing: .35em;
  font-size: 26px;
  text-align: center;
  background: linear-gradient(90deg, #fff, var(--acc2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}
.logo.small { font-size: 15px; margin: 0; letter-spacing: .25em; }

/* auth */
.auth-card {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  padding: 28px;
}
.card {
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button {
  flex: 1; padding: 9px; border-radius: 9px;
  border: 1px solid var(--line); background: transparent;
  color: var(--dim); cursor: pointer;
}
.tabs button.on { color: #fff; border-color: var(--acc); background: rgba(124,92,255,.12); }

input {
  width: 100%; padding: 11px 12px; margin-bottom: 10px;
  border-radius: 9px; border: 1px solid var(--line);
  background: #0d1017; color: var(--txt); outline: none;
}
input:focus { border-color: var(--acc); }

button.primary {
  width: 100%; padding: 11px; border-radius: 9px; border: 0;
  background: linear-gradient(90deg, var(--acc), #6d4dff);
  color: #fff; font-weight: 600; cursor: pointer;
}
button.primary:disabled { opacity: .4; cursor: not-allowed; }
button.ghost {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); cursor: pointer;
}
.msg { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--red); }
.msg.ok { color: var(--green); }

/* panel */
header {
  display: flex; align-items: center; gap: 26px;
  padding: 16px 26px; border-bottom: 1px solid var(--line);
  background: rgba(10,12,17,.7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
nav { display: flex; gap: 6px; flex: 1; }
nav button {
  padding: 8px 14px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--dim); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
nav button.on { color: #fff; background: rgba(124,92,255,.12); border-color: var(--acc); }
.user { display: flex; align-items: center; gap: 12px; color: var(--dim); }

.ping { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ping.red   { background: var(--red);   box-shadow: 0 0 10px var(--red); }
.ping.green { background: var(--green); box-shadow: 0 0 10px var(--green); }

main { max-width: 780px; margin: 28px auto; padding: 0 18px; }
.tab { display: flex; flex-direction: column; gap: 14px; }
h2 { margin: 0 0 14px; font-size: 17px; }

.news-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.news-item:last-child { border-bottom: 0; }
.news-item h3 { margin: 0 0 6px; font-size: 15px; }
.news-item time { color: var(--dim); font-size: 12px; }
.news-item p { margin: 8px 0 0; color: #c9cfe0; white-space: pre-wrap; }

.sub-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.sub-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #0d1017;
}
.sub-row .exp { color: var(--dim); font-size: 12px; }
.row { display: flex; gap: 10px; }
.row input { margin: 0; }
.row button { width: auto; padding: 11px 18px; white-space: nowrap; }

.gate { margin-bottom: 14px; color: var(--dim); }
.gate.bad { color: var(--red); }
.gate.ok  { color: var(--green); }

.progress-wrap { margin-top: 20px; }
.progress {
  height: 8px; border-radius: 99px; background: #0d1017;
  border: 1px solid var(--line); overflow: hidden;
}
.progress #bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--acc), var(--acc2));
  transition: width .5s ease;
}
.status-text { margin-top: 10px; color: var(--dim); font-size: 13px; }
.status-text.err { color: var(--red); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 10px; z-index: 60;
  background: rgba(255,77,94,.12); border: 1px solid var(--red);
  color: #ffd7db; font-size: 13px; max-width: 90vw;
}

/* modal */
.modal {
  position: fixed; inset: 0; background: rgba(4,5,8,.75);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-card {
  width: 420px; text-align: center; padding: 30px;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--acc); border-radius: 16px;
  box-shadow: 0 0 60px rgba(124,92,255,.35);
}
.modal-card h3 { margin: 0 0 10px; font-size: 19px; }
.modal-card p { color: var(--dim); margin: 0; }
.count { font-size: 40px; font-weight: 800; margin-top: 18px; color: var(--acc2); }
