:root {
  --bg: #06101b;
  --panel: #0c1928;
  --line: rgba(155, 179, 199, 0.18);
  --text: #f2f7fa;
  --muted: #91a4b4;
  --cyan: #4ee8db;
  --green: #b7ff36;
  --danger: #ff7b7b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; color: var(--text); background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 5%, rgba(78, 232, 219, 0.12), transparent 32rem),
    radial-gradient(circle at 92% 92%, rgba(183, 255, 54, 0.08), transparent 28rem),
    linear-gradient(145deg, #06101b, #081421 55%, #050c15);
}
button, input { font: inherit; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 520px);
  gap: clamp(36px, 6vw, 96px);
  width: min(1240px, 92vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 54px 0;
  align-items: center;
}

.intro { display: flex; min-height: min(760px, 88vh); flex-direction: column; justify-content: space-between; }
.brand { display: flex; width: max-content; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(78,232,219,.55); border-radius: 13px; color: var(--cyan); background: rgba(78,232,219,.08); font-size: 23px; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.eyebrow { margin: 0 0 13px; color: var(--cyan); font: 800 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .15em; }
.intro-copy h1 { max-width: 760px; margin: 0 0 24px; font-size: clamp(46px, 6vw, 82px); line-height: .98; letter-spacing: -.055em; }
.intro-copy h1 span { color: var(--cyan); }
.intro-copy > p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(15px, 1.45vw, 19px); line-height: 1.65; }
.route { display: grid; padding: 0; margin: 36px 0 0; list-style: none; grid-template-columns: repeat(3, 1fr); }
.route li { display: flex; min-height: 92px; gap: 12px; padding: 17px; border: 1px solid var(--line); background: rgba(10, 25, 40, .62); }
.route li:first-child { border-radius: 15px 0 0 15px; }
.route li:last-child { border-radius: 0 15px 15px 0; }
.route li + li { border-left: 0; }
.route li > span { color: var(--cyan); font: 800 11px ui-monospace, monospace; }
.route strong, .route small { display: block; }
.route strong { margin-bottom: 7px; font-size: 13px; }
.route small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.security-note { margin: 22px 0 0; color: #b7c6d1; font-size: 12px; }

.auth-card { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: rgba(12, 25, 40, .86); box-shadow: 0 28px 80px rgba(0,0,0,.34); backdrop-filter: blur(20px); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; margin-bottom: 38px; border: 1px solid var(--line); border-radius: 13px; background: rgba(0,0,0,.18); }
.tab { min-height: 43px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; font-weight: 800; }
.tab.active { color: #06101b; background: var(--cyan); }
.form-heading h2 { margin: 0 0 9px; font-size: 32px; letter-spacing: -.035em; }
.form-heading > p:last-child { margin: 0 0 30px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field > span { color: #c9d5dd; font-size: 12px; font-weight: 750; }
input { width: 100%; height: 51px; padding: 0 15px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--text); background: rgba(4, 12, 21, .7); transition: border .15s, box-shadow .15s; }
input:focus { border-color: rgba(78,232,219,.72); box-shadow: 0 0 0 3px rgba(78,232,219,.09); }
input::placeholder { color: #5f7484; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 90px; }
.show-password { position: absolute; top: 50%; right: 8px; min-height: 35px; padding: 0 9px; border: 0; color: var(--cyan); background: transparent; cursor: pointer; transform: translateY(-50%); font-size: 11px; font-weight: 800; }
.form-error { min-height: 20px; margin: 2px 0 10px; color: var(--danger); font-size: 12px; line-height: 1.45; }
.submit { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; padding: 0 18px; border: 0; border-radius: 12px; color: #06101b; background: var(--green); cursor: pointer; font-size: 14px; font-weight: 900; }
.submit:disabled { cursor: wait; opacity: .62; }
.submit span { font-size: 21px; }
.legal { margin: 20px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.login-mode #nameField, .login-mode #confirmField { display: none; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; min-height: auto; padding: 26px 0 44px; }
  .intro { min-height: auto; gap: 58px; }
  .intro-copy { margin-top: 14px; }
  .security-note { display: none; }
  .auth-card { width: 100%; }
}
@media (max-width: 560px) {
  .auth-layout { width: min(100% - 28px, 520px); gap: 34px; }
  .intro { gap: 38px; }
  .intro-copy h1 { font-size: clamp(38px, 12vw, 58px); }
  .intro-copy > p:last-child { font-size: 14px; }
  .route { grid-template-columns: 1fr; margin-top: 4px; }
  .route li, .route li:first-child, .route li:last-child { min-height: auto; border: 1px solid var(--line); border-radius: 0; }
  .route li:first-child { border-radius: 13px 13px 0 0; }
  .route li:last-child { border-radius: 0 0 13px 13px; }
  .route li + li { border-top: 0; }
  .auth-card { padding: 25px 20px; border-radius: 18px; }
}
