:root {
  --bg: #030711;
  --panel: rgba(9, 17, 31, .92);
  --panel-soft: rgba(12, 25, 45, .72);
  --text: #f5f8ff;
  --muted: #96a6bd;
  --line: rgba(130, 166, 213, .2);
  --blue: #1687ff;
  --cyan: #21d5ff;
  --green: #2fe1a2;
  --danger: #ff657a;
  --header: 92px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { min-height: 100vh; margin: 0; color: var(--text); font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 999; padding: 10px 14px; border-radius: 8px; color: #02101f; background: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 14% 22%, rgba(22, 135, 255, .2), transparent 31%), radial-gradient(circle at 84% 78%, rgba(33, 213, 255, .11), transparent 28%), linear-gradient(rgba(89, 132, 189, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(89, 132, 189, .035) 1px, transparent 1px); background-size: auto, auto, 56px 56px, 56px 56px; }

.site-header { position: relative; z-index: 2; display: flex; min-height: var(--header); padding: 0 clamp(22px, 4vw, 68px); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(3, 7, 17, .72); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; width: auto; height: 62px; object-fit: contain; }
.back-link { display: inline-flex; min-height: 42px; padding: 0 17px; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; color: #d8e4f4; font-size: 14px; font-weight: 700; transition: border-color .2s, background .2s, transform .2s; }
.back-link:hover { border-color: rgba(22, 135, 255, .6); background: rgba(22, 135, 255, .1); transform: translateY(-1px); }

.auth-layout { position: relative; z-index: 1; display: grid; width: min(calc(100% - 44px), 1240px); min-height: calc(100vh - var(--header) - 70px); margin: 0 auto; padding: 64px 0; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(430px, 520px); gap: clamp(55px, 8vw, 120px); }
.auth-intro { max-width: 610px; }
.eyebrow, .kicker { margin: 0 0 18px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 31px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--cyan)); }
h1 { max-width: 700px; margin: 0; font-size: clamp(42px, 5vw, 72px); line-height: .99; letter-spacing: -.055em; }
h1 em { color: transparent; font-style: normal; background: linear-gradient(100deg, var(--blue), var(--cyan)); background-clip: text; -webkit-background-clip: text; }
.intro-copy { max-width: 590px; margin: 26px 0 36px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.benefits { display: grid; margin: 0; padding: 0; gap: 15px; list-style: none; }
.benefits li { display: flex; padding: 16px 18px; align-items: center; gap: 17px; border: 1px solid var(--line); border-radius: 16px; background: rgba(9, 18, 33, .56); }
.benefits li > span { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--cyan); background: rgba(22, 135, 255, .13); font-size: 11px; font-weight: 800; }
.benefits strong, .benefits small { display: block; }
.benefits strong { margin-bottom: 5px; font-size: 14px; }
.benefits small { color: var(--muted); font-size: 12px; line-height: 1.45; }

.auth-card { overflow: hidden; border: 1px solid rgba(114, 161, 224, .25); border-radius: 26px; background: linear-gradient(145deg, rgba(14, 26, 45, .97), rgba(5, 11, 21, .98)); box-shadow: 0 32px 80px rgba(0, 0, 0, .43), inset 0 1px 0 rgba(255, 255, 255, .04); }
.service-status { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); color: #ffd5da; background: rgba(255, 101, 122, .1); font-size: 12px; line-height: 1.55; }
.account-session { padding: 46px 38px 38px; text-align: center; }
.account-session[hidden] { display: none; }
.account-mark { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border: 1px solid rgba(47, 225, 162, .35); border-radius: 18px; color: var(--green); background: rgba(47, 225, 162, .1); font-size: 26px; font-weight: 800; }
.account-session .kicker { margin-bottom: 10px; }
.account-session h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.account-email { margin: 0; color: var(--muted); font-size: 14px; }
.account-actions { display: grid; margin-top: 30px; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-actions a, .account-actions button { display: flex; min-height: 50px; padding: 0 16px; align-items: center; justify-content: center; border-radius: 12px; font-size: 13px; font-weight: 800; cursor: pointer; }
.account-actions a { color: #fff; background: linear-gradient(115deg, #0878ff, #159eff); }
.account-actions button { border: 1px solid var(--line); color: #dce7f6; background: rgba(2, 8, 17, .6); }
.tabs { display: grid; padding: 8px; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); background: rgba(1, 5, 12, .45); }
.tab { min-height: 48px; border: 0; border-radius: 12px; color: var(--muted); background: transparent; font-weight: 750; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s; }
.tab.active { color: #fff; background: linear-gradient(120deg, rgba(22, 135, 255, .22), rgba(33, 213, 255, .11)); box-shadow: inset 0 0 0 1px rgba(45, 163, 255, .28); }
.panel { padding: 38px 38px 34px; }
.panel[hidden] { display: none; }
.panel-heading { margin-bottom: 27px; }
.panel-heading .kicker { margin-bottom: 10px; font-size: 10px; }
.panel-heading h2 { margin: 0 0 8px; font-size: 30px; letter-spacing: -.035em; }
.panel-heading > p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; color: #dce7f6; font-size: 13px; font-weight: 700; }
.field input { width: 100%; height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: #fff; background: rgba(2, 8, 17, .76); font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder { color: #617188; }
.field input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 135, 255, .13); }
.field input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 101, 122, .1); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 84px; }
.password-toggle { position: absolute; top: 50%; right: 10px; padding: 7px 8px; border: 0; border-radius: 7px; color: #90bfff; background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; transform: translateY(-50%); }
.form-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 12px; }
.form-options.single { justify-content: flex-end; }
.form-options > a { color: #9ac8ff; font-weight: 700; }
.text-button { padding: 0; border: 0; color: #9ac8ff; background: none; font-size: 12px; font-weight: 700; cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.55; }
.check input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--blue); }
.check a { color: #8ed8ff; text-decoration: underline; text-underline-offset: 2px; }
.terms.invalid { color: var(--danger); }
.submit-button { display: flex; width: 100%; min-height: 54px; padding: 0 19px; align-items: center; justify-content: space-between; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(115deg, #0878ff, #159eff); font-weight: 800; cursor: pointer; box-shadow: 0 15px 30px rgba(8, 120, 255, .22); transition: transform .2s, box-shadow .2s; }
.submit-button:hover { transform: translateY(-2px); box-shadow: 0 19px 36px rgba(8, 120, 255, .3); }
.form-status { min-height: 18px; margin: -5px 0 0; font-size: 12px; line-height: 1.5; }
.form-status.error { color: #ff8696; }
.form-status.success { color: var(--green); }
.switch-copy { margin: 25px 0 0; padding-top: 21px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; }
.switch-copy button { padding: 0; border: 0; color: #9bc9ff; background: none; font-weight: 800; cursor: pointer; }
.switch-copy.secondary { margin-top: 12px; padding-top: 0; border-top: 0; font-size: 12px; }
.strength { display: grid; margin-top: -10px; gap: 6px; }
.strength > span { overflow: hidden; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.strength i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--danger); transition: width .2s, background .2s; }
.strength small { color: var(--muted); font-size: 10px; }

footer { position: relative; z-index: 1; display: flex; width: min(calc(100% - 44px), 1240px); min-height: 70px; margin: 0 auto; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: #72839a; font-size: 12px; }
footer a { color: #9ac8ff; }

@media (max-width: 980px) {
  .auth-layout { padding-block: 48px; grid-template-columns: 1fr; gap: 42px; }
  .auth-intro { max-width: 740px; }
  .benefits { grid-template-columns: repeat(3, 1fr); }
  .benefits li { align-items: flex-start; }
}

@media (max-width: 720px) {
  :root { --header: 76px; }
  .site-header { padding-inline: 18px; }
  .brand img { height: 50px; }
  .back-link { padding-inline: 12px; }
  .auth-layout { width: min(calc(100% - 28px), 600px); padding-block: 38px; }
  h1 { font-size: clamp(38px, 13vw, 55px); }
  .intro-copy { font-size: 15px; }
  .benefits { grid-template-columns: 1fr; }
  .panel { padding: 30px 22px 27px; }
  .account-session { padding: 38px 22px 30px; }
  .account-actions { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  footer { width: min(calc(100% - 28px), 600px); flex-direction: column; justify-content: center; }
}

@media (max-width: 430px) {
  .brand img { height: 43px; }
  .back-link { min-height: 38px; font-size: 0; }
  .back-link span { font-size: 20px; }
  .panel { padding-inline: 17px; }
  .form-options { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
