:root {
  color-scheme: dark;
  --auth-bg: #160729;
  --auth-surface: rgba(31, 16, 57, .82);
  --auth-input: rgba(73, 43, 112, .72);
  --auth-input-border: rgba(190, 164, 228, .18);
  --auth-text: #fff;
  --auth-muted: #aaa2b9;
  --auth-purple: #9d5ce9;
  --auth-blue: #5195d4;
  --auth-green: #43e08d;
  --auth-danger: #ff8292;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; font-size: 16px; }
body { min-height: 100vh; overflow-x: hidden; margin: 0; color: var(--auth-text); background: var(--auth-bg); font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #17072d url("../images/auth/space-bg.png") center / cover no-repeat;
}
.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 5, 26, .08) 0%, rgba(15, 7, 31, .22) 42%, rgba(13, 6, 25, .73) 72%, rgba(10, 5, 20, .9) 100%);
}

.auth-header { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(17, 7, 35, .45); backdrop-filter: blur(18px); }
.auth-nav { display: flex; width: min(1440px, 100%); height: 76px; align-items: center; margin: 0 auto; padding: 0 42px; }
.auth-brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.18rem; font-weight: 760; letter-spacing: -.035em; }
.auth-brand-mark { position: relative; display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(81, 149, 212, .46); border-radius: 9px; background: linear-gradient(145deg, rgba(157, 92, 233, .28), rgba(81, 149, 212, .18)); transform: rotate(8deg); box-shadow: 0 0 20px rgba(104, 103, 221, .24); }
.auth-brand-mark::before, .auth-brand-mark::after, .auth-brand-mark i { content: ""; position: absolute; bottom: 6px; width: 4px; border-radius: 4px; background: linear-gradient(#9d5ce9, #67b6ec); }
.auth-brand-mark::before { left: 6px; height: 9px; }.auth-brand-mark i { left: 12px; height: 16px; }.auth-brand-mark::after { left: 18px; height: 12px; }
.auth-menu { display: flex; align-items: center; gap: 36px; margin-left: auto; }
.auth-menu > a { position: relative; color: rgba(255, 255, 255, .73); font-size: .84rem; font-weight: 560; transition: color .2s ease; }
.auth-menu > a:not(.auth-menu-login)::after { content: ""; position: absolute; right: 50%; bottom: -9px; left: 50%; height: 2px; border-radius: 2px; background: var(--auth-purple); transition: .2s ease; }
.auth-menu > a:hover { color: white; }.auth-menu > a:hover::after { right: 0; left: 0; }
.auth-menu .auth-menu-login { padding: 10px 17px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; color: white; }
.auth-menu .auth-menu-login:hover { border-color: rgba(157, 92, 233, .75); background: rgba(157, 92, 233, .12); }
.auth-menu-toggle { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; margin-left: auto; border: 1px solid rgba(255, 255, 255, .15); border-radius: 10px; background: rgba(255, 255, 255, .06); color: white; }
.auth-menu-toggle > span:not(.sr-only) { width: 19px; height: 2px; border-radius: 2px; background: currentColor; transition: .2s ease; }

.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1.06fr) minmax(480px, .94fr); padding-top: 76px; }
.auth-hero { position: relative; display: flex; min-height: calc(100vh - 76px); align-items: flex-end; padding: 72px clamp(40px, 7vw, 120px); }
.auth-hero-copy { max-width: 610px; padding-bottom: 22px; text-shadow: 0 2px 18px rgba(4, 2, 16, .35); }
.auth-kicker { display: inline-block; margin-bottom: 18px; color: #b998e2; font-size: .72rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.auth-hero h1 { margin: 0; font-size: clamp(2.5rem, 4.7vw, 4.8rem); line-height: .98; letter-spacing: -.065em; text-transform: uppercase; }
.auth-hero h1 span { color: transparent; background: linear-gradient(90deg, #a865ed, #57a6dc); background-clip: text; -webkit-background-clip: text; }
.auth-hero p { max-width: 540px; margin: 23px 0 0; color: rgba(255, 255, 255, .66); font-size: .95rem; line-height: 1.7; }
.auth-signal { display: inline-flex; align-items: center; gap: 9px; margin-top: 28px; padding: 9px 13px; border: 1px solid rgba(67, 224, 141, .18); border-radius: 30px; background: rgba(8, 15, 27, .28); color: rgba(255, 255, 255, .72); font-size: .72rem; backdrop-filter: blur(8px); }
.auth-signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-green); box-shadow: 0 0 0 5px rgba(67, 224, 141, .1), 0 0 14px rgba(67, 224, 141, .75); }

.auth-content { display: flex; min-height: calc(100vh - 76px); align-items: center; justify-content: center; flex-direction: column; padding: 48px clamp(28px, 6vw, 96px) 26px; }
.auth-card { width: min(440px, 100%); min-width: 0; padding: 37px 38px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 25px; background: linear-gradient(145deg, rgba(42, 22, 73, .84), rgba(21, 11, 40, .76)); box-shadow: 0 30px 75px rgba(3, 1, 12, .38), inset 0 1px rgba(255, 255, 255, .05); backdrop-filter: blur(21px); }
.auth-form-header { margin-bottom: 27px; }
.auth-form-header .auth-kicker { margin-bottom: 9px; }
.auth-form-header h2 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.06em; text-transform: uppercase; }
.auth-form-header p { margin: 11px 0 0; color: var(--auth-muted); font-size: .81rem; line-height: 1.55; }
.auth-form { display: grid; min-width: 0; gap: 17px; }
.auth-field { display: grid; min-width: 0; gap: 7px; }
.auth-field > label { color: #cfc7da; font-size: .72rem; font-weight: 650; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > svg { position: absolute; top: 50%; left: 16px; width: 19px; height: 19px; fill: none; stroke: #aaa2b9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform: translateY(-50%); pointer-events: none; }
.auth-input { width: 100%; height: 55px; padding: 0 47px 0 47px; border: 1px solid var(--auth-input-border); border-radius: 14px; outline: 0; background: var(--auth-input); color: white; font-size: .88rem; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.auth-input::placeholder { color: #9d94aa; }.auth-input:hover { border-color: rgba(190, 164, 228, .3); }.auth-input:focus { border-color: rgba(157, 92, 233, .85); background: rgba(80, 48, 121, .8); box-shadow: 0 0 0 4px rgba(157, 92, 233, .13); }
.password-toggle { position: absolute; top: 50%; right: 9px; display: grid; width: 37px; height: 37px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #aaa2b9; transform: translateY(-50%); cursor: pointer; }
.password-toggle:hover { background: rgba(255, 255, 255, .07); color: white; }.password-toggle svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.auth-checkbox { display: inline-flex; align-items: center; gap: 8px; color: var(--auth-muted); font-size: .74rem; cursor: pointer; }.auth-checkbox input { width: 15px; height: 15px; accent-color: var(--auth-purple); }
.auth-link { color: #bd89f3; font-size: .75rem; font-weight: 650; }.auth-link:hover { color: white; }
.auth-submit { display: inline-flex; width: 100%; min-height: 55px; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; border: 0; border-radius: 15px; background: linear-gradient(100deg, #6f2dad, #417dad); color: white; font-size: .86rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; box-shadow: 0 13px 28px rgba(71, 40, 132, .28); cursor: pointer; transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.auth-submit:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(71, 40, 132, .38); }.auth-submit:active { transform: translateY(0); }
.auth-submit svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.auth-separator { display: flex; align-items: center; gap: 13px; color: #81788e; font-size: .67rem; text-transform: uppercase; }.auth-separator::before, .auth-separator::after { content: ""; height: 1px; flex: 1; background: rgba(255, 255, 255, .11); }
.auth-alternative { margin: 0; color: var(--auth-muted); font-size: .77rem; text-align: center; }.auth-alternative a { color: #bd89f3; font-weight: 700; }.auth-alternative a:hover { color: white; }
.auth-help { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid rgba(81, 149, 212, .18); border-radius: 12px; background: rgba(50, 89, 128, .12); color: #b8b2c3; font-size: .72rem; line-height: 1.5; }.auth-help svg { flex: 0 0 auto; width: 18px; fill: none; stroke: #7fc0ed; stroke-width: 1.8; }
.auth-status { margin-bottom: 18px; padding: 12px 14px; border: 1px solid rgba(67, 224, 141, .22); border-radius: 12px; background: rgba(67, 224, 141, .09); color: #9cf0c4; font-size: .76rem; line-height: 1.5; }
.validation-summary-valid { display: none; }.validation-summary-errors { padding: 11px 13px; border: 1px solid rgba(255, 130, 146, .24); border-radius: 11px; background: rgba(255, 73, 97, .09); color: #ffadb8; font-size: .72rem; }.validation-summary-errors ul { margin: 0; padding-left: 17px; }
.field-validation-error { color: var(--auth-danger); font-size: .68rem; }.input-validation-error { border-color: rgba(255, 130, 146, .7); }
.password-hint { margin: -2px 0 0; color: #8f879b; font-size: .65rem; line-height: 1.45; }
.auth-copyright { margin: 24px 0 0; color: rgba(255, 255, 255, .37); font-size: .65rem; text-align: center; }

@media (max-width: 980px) {
  .auth-page::before { background-image: url("../images/auth/space-mobile-bg.png"); background-position: center top; }
  .auth-page::after { background: linear-gradient(180deg, rgba(15, 7, 34, .2), rgba(12, 5, 25, .82) 48%, rgba(10, 4, 20, .94)); }
  .auth-shell { display: block; padding-top: 76px; }.auth-hero { min-height: 250px; align-items: flex-end; padding: 36px 32px 22px; }.auth-hero-copy { padding: 0; }.auth-hero h1 { font-size: clamp(2.1rem, 9vw, 3.7rem); }.auth-hero p, .auth-signal { display: none; }.auth-kicker { margin-bottom: 10px; }
  .auth-content { min-height: auto; padding: 18px 24px 38px; }.auth-card { width: min(500px, 100%); }
}

@media (max-width: 760px) {
  .auth-nav { height: 68px; padding: 0 20px; }.auth-header { background: rgba(17, 7, 35, .72); }.auth-menu-toggle { display: flex; }
  .auth-menu { position: absolute; top: 68px; right: 14px; left: 14px; display: grid; gap: 3px; padding: 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 15px; background: rgba(28, 13, 50, .96); box-shadow: 0 22px 50px rgba(0, 0, 0, .35); backdrop-filter: blur(20px); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .2s ease; }
  .auth-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }.auth-menu > a { padding: 12px 13px; border-radius: 9px; }.auth-menu > a:hover { background: rgba(255, 255, 255, .06); }.auth-menu > a::after { display: none; }.auth-menu .auth-menu-login { margin-top: 4px; text-align: center; }
  .auth-menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }.auth-menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }.auth-menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .auth-shell { padding-top: 68px; }.auth-hero { min-height: 210px; padding: 30px 22px 16px; }.auth-hero h1 { max-width: 600px; }.auth-content { padding: 12px 15px 32px; }.auth-card { padding: 29px 23px; border-radius: 21px; }.auth-form-header h2 { font-size: 2.25rem; }
}

@media (max-width: 420px) {
  .auth-hero { min-height: 180px; }.auth-hero h1 { font-size: 2rem; }.auth-kicker { font-size: .62rem; }.auth-card { padding: 26px 18px; }.auth-input { height: 52px; }.auth-submit { min-height: 52px; }.auth-row { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (max-height: 760px) and (min-width: 981px) {
  .auth-content { padding-top: 26px; padding-bottom: 18px; }.auth-card { padding-top: 27px; padding-bottom: 27px; }.auth-form-header { margin-bottom: 20px; }.auth-form { gap: 13px; }.auth-input { height: 50px; }.auth-submit { min-height: 50px; }.auth-hero h1 { font-size: 3.4rem; }
}

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