:root {
  color-scheme: dark;

  --bg: #060b16;
  --bg-panel: #0c1626;
  --bg-panel-2: #101d33;
  --fg: #e7f0ff;
  --muted: #7b90b3;

  --blue: #2f8bff;
  --blue-bright: #5bb4ff;
  --cyan: #35e0e0;

  --ok: #22c88f;
  --blocked: #ff4d6a;

  --border: rgba(91, 180, 255, 0.18);
  --border-bright: rgba(91, 180, 255, 0.45);

  --radius: 10px;
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -20px rgba(47, 139, 255, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

/* ── Hi-Tech фон: тонкая сетка + синее свечение ─────────────────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(91, 180, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 180, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 90%);
}

.bg-glow {
  position: fixed;
  z-index: -1;
  top: -20%;
  left: 50%;
  width: 1100px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47, 139, 255, 0.28), transparent 70%);
  pointer-events: none;
}

/* ── Общие элементы ──────────────────────────────────────────────────── */
h1, h2, h3 { font-weight: 500; letter-spacing: 0.01em; }

.brand-mark {
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--fg);
  background: linear-gradient(135deg, var(--blue-bright), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-left: 0.5rem;
}

a.topbar__brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a.topbar__brand:hover { opacity: 0.8; }

.btn {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter 0.15s ease, transform 0.05s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan) 160%);
  color: #04101f;
  box-shadow: 0 8px 24px -8px rgba(47, 139, 255, 0.6);
}

.btn--primary:hover { filter: brightness(1.08); }

.btn-link {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-link:hover {
  color: var(--blue-bright);
  border-color: var(--border-bright);
}

.field {
  display: block;
  text-align: left;
  margin-bottom: 1.1rem;
}

.field__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(6, 16, 32, 0.7);
  color: var(--fg);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #45557a;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 139, 255, 0.18);
}

/* ── Экран входа ─────────────────────────────────────────────────────── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
}

.auth-card__brand { margin-bottom: 1.75rem; }

.auth-card__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
}

.step--active {
  color: #04101f;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-color: transparent;
}

.step--done {
  color: var(--ok);
  border-color: var(--ok);
}

.step-line {
  width: 36px;
  height: 1px;
  background: var(--border);
}

.step-line--done { background: var(--ok); }

.auth-card__title {
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}

.auth-card__hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.auth-form { text-align: left; }

.auth-form__back { margin-top: 1.1rem; text-align: center; }

.auth-error {
  background: rgba(255, 77, 106, 0.12);
  border: 1px solid rgba(255, 77, 106, 0.35);
  color: var(--blocked);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.auth-form .btn { width: 100%; margin-top: 0.25rem; }

/* ── Верхняя панель основного сайта ─────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
}

/* ── Главная страница ────────────────────────────────────────────────── */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.panel {
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  padding: 2.5rem;
}

.panel--narrow { max-width: 420px; margin: 0 auto; }

.page__title { font-size: 1.6rem; margin: 0 0 0.4rem; }
.page__lead { color: var(--muted); margin: 0 0 1.75rem; }

@media (max-width: 480px) {
  .panel { padding: 1.75rem 1.25rem; }
}
