:root {
  --bg: #070a11;
  --panel: #0d1420;
  --panel-2: #101a27;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eaf3f7;
  --muted: #91a3b4;
  --muted-2: #627386;
  --accent: #a6ff6b;
  --accent-2: #4fe3ff;
  --danger: #ff6b7a;
  --radius: 20px;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr);
  min-height: 100vh;
}

/* ---------- Левая часть ---------- */
.auth-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px clamp(32px, 6vw, 84px);
  border-right: 1px solid var(--line);
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(79, 227, 255, .12), transparent 60%),
    radial-gradient(700px 500px at 85% 85%, rgba(166, 255, 107, .1), transparent 60%),
    linear-gradient(160deg, #0a1019, #070a11 70%);
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, #000, transparent 75%);
  pointer-events: none;
}
.visual-glow {
  position: absolute;
  width: 420px; height: 420px;
  right: -160px; top: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(166,255,107,.14), transparent 62%);
  filter: blur(20px);
  pointer-events: none;
}
.brand {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  width: fit-content; text-decoration: none;
  font-size: 20px; font-weight: 900; letter-spacing: -.4px;
}
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; color: #0d1b12;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(166,255,107,.2);
}
.brand-mark svg { width: 21px; height: 21px; stroke-width: 2.2; }
.visual-copy { position: relative; margin: auto 0 28px; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border: 1px solid rgba(166,255,107,.28); border-radius: 999px;
  background: rgba(166,255,107,.07); color: var(--accent);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.visual-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02; letter-spacing: -3px; font-weight: 900;
}
.visual-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.visual-copy p { margin: 0; max-width: 480px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.visual-features { position: relative; display: grid; gap: 12px; margin: 0 0 34px; padding: 0; list-style: none; }
.visual-features li { display: flex; align-items: center; gap: 11px; color: #c8d6e0; font-size: 13.5px; }
.visual-features svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent); stroke-width: 2.4; }
.visual-terminal {
  position: relative; max-width: 560px;
  border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden;
  background: rgba(5, 9, 15, .8);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.terminal-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.025);
}
.terminal-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3d4a58; }
.terminal-bar i:first-child { background: var(--accent); }
.terminal-bar i:nth-child(2) { background: var(--accent-2); }
.terminal-bar span { margin-left: auto; color: var(--muted-2); font-family: var(--mono); font-size: 10px; }
.visual-terminal pre {
  margin: 0; padding: 16px 18px; color: #cfe0e9;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word;
}
.t-dim { color: var(--muted-2); }
.t-green { color: var(--accent); }
.t-cyan { color: var(--accent-2); }

/* ---------- Правая часть ---------- */
.auth-side {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 48px clamp(24px, 5vw, 72px);
  background: radial-gradient(600px 400px at 50% 0%, rgba(79,227,255,.05), transparent 70%);
}
.auth-card {
  width: 100%; max-width: 430px; padding: 34px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255,255,255,.035), rgba(255,255,255,.012) 45%, var(--panel));
  box-shadow: 0 28px 70px rgba(0,0,0,.38);
}
.auth-card-head { text-align: center; margin-bottom: 24px; }
.auth-logo {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 16px;
  border: 1px solid rgba(166,255,107,.3); border-radius: 15px;
  background: rgba(166,255,107,.08); color: var(--accent);
}
.auth-logo svg { width: 25px; height: 25px; }
.auth-card-head h2 { margin: 0 0 7px; font-size: 25px; letter-spacing: -.7px; }
.auth-card-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: 12px; background: #080e16;
}
.auth-tabs button {
  padding: 10px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 12.5px; font-weight: 800; transition: .18s;
}
.auth-tabs button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.auth-tabs button.active {
  color: #0d1b12; background: linear-gradient(135deg, var(--accent), #79e0ff);
  box-shadow: 0 6px 18px rgba(166,255,107,.18);
}
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 7px; color: #b9c9d6; font-size: 11.5px; font-weight: 700; }
.field-wrap {
  display: flex; align-items: center; gap: 10px;
  height: 45px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: #080e16;
  transition: border-color .18s, box-shadow .18s;
}
.field-wrap:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(79,227,255,.12); }
.field-wrap svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--muted-2); }
.field-wrap input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 13px; }
.field-wrap input::placeholder { color: var(--muted-2); }
.auth-hint { margin: 2px 0 16px; color: var(--muted-2); font-size: 11px; line-height: 1.5; }
.auth-error {
  margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid rgba(255,107,122,.35); border-radius: 10px;
  background: rgba(255,107,122,.08); color: var(--danger); font-size: 11.5px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 45px; padding: 0 18px; border: 0; border-radius: 11px;
  font-size: 13px; font-weight: 800; cursor: pointer; text-decoration: none;
  transition: transform .16s, box-shadow .16s, background .16s, opacity .16s;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-primary { color: #0d1b12; background: linear-gradient(135deg, var(--accent), #79e0ff); box-shadow: 0 10px 26px rgba(166,255,107,.18); }
.btn-primary:hover { box-shadow: 0 14px 32px rgba(166,255,107,.26); }
.btn-ghost { color: var(--muted); background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.07); }
.btn-block { width: 100%; margin-top: 4px; }
.auth-alt { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.auth-alt button { border: 0; background: transparent; color: var(--accent-2); font-weight: 800; cursor: pointer; padding: 0; }
.auth-alt button:hover { text-decoration: underline; }
.back-link { display: block; margin-top: 18px; text-align: center; color: var(--muted-2); font-size: 11.5px; text-decoration: none; }
.back-link:hover { color: var(--text); }

.signed-in { text-align: center; }
.signed-icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 16px;
  border-radius: 50%; color: #0d1b12; background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.signed-icon svg { width: 27px; height: 27px; stroke-width: 2.4; }
.signed-in h3 { margin: 0 0 7px; font-size: 21px; }
.signed-in p { margin: 0 0 22px; color: var(--muted); font-size: 12.5px; word-break: break-all; }
.signed-in .btn { margin-bottom: 10px; }
.auth-legal {
  display: flex; align-items: center; gap: 8px; margin: 0;
  color: var(--muted-2); font-size: 10.5px;
}
.auth-legal svg { width: 14px; height: 14px; flex: 0 0 auto; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { padding: 32px 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .visual-copy { margin: 42px 0 24px; }
  .visual-copy h1 { font-size: clamp(36px, 8vw, 56px); letter-spacing: -2px; }
  .visual-terminal { display: none; }
  .auth-side { padding: 40px 20px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .auth-card-head h2 { font-size: 22px; }
  .visual-features li { font-size: 12.5px; }
}
