.auth-page { min-height: 100svh; background: var(--paper); overflow-x: hidden; }
.auth-header { min-height: 72px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--paper); border-bottom: 1px solid var(--line); }
.auth-header-meta { display: flex; align-items: center; gap: 34px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .055em; }
.auth-header-meta > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.auth-header-meta > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 5px rgba(101,244,207,.14); }
.auth-header-meta a { display: inline-flex; gap: 20px; align-items: center; }

.auth-shell { min-height: calc(100svh - 72px); display: grid; grid-template-columns: minmax(480px, .88fr) minmax(600px, 1.12fr); }
.auth-form-panel { min-width: 0; padding: 64px clamp(34px, 6vw, 96px); display: grid; place-items: center; background: var(--white); }
.auth-form-wrap { width: min(100%, 480px); }
.auth-section-label { padding-bottom: 18px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--ink); color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; }
.auth-section-label span:first-child { color: #7667ff; }
.auth-state { padding-top: 44px; animation: authReveal .3s var(--ease); }
.auth-state[hidden] { display: none; }
@keyframes authReveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.auth-title h1 { margin: 0; font-size: clamp(48px, 5vw, 72px); line-height: .92; letter-spacing: -.06em; font-weight: 620; }
.auth-title p { max-width: 390px; margin: 18px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.oauth-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.oauth-grid button { min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--ink); background: transparent; border: 1px solid var(--line); font-size: 14px; font-weight: 620; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.oauth-grid button:hover { border-color: var(--ink); background: var(--paper); transform: translateY(-1px); }
.oauth-grid svg { width: 18px; height: 18px; }
.auth-divider { height: 56px; display: flex; align-items: center; gap: 14px; color: #979992; font-family: var(--font-mono); font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.credential-form { display: grid; gap: 18px; }
.field-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 630; }
.field-group > input, .password-field { height: 52px; width: 100%; border: 1px solid var(--line); background: transparent; transition: border-color .2s, box-shadow .2s; }
.field-group > input, .password-field input { padding: 0 15px; color: var(--ink); background: transparent; border: 0; outline: 0; font: 16px var(--font-sans); }
.field-group > input { border: 1px solid var(--line); }
.field-group > input:focus, .password-field:focus-within { border-color: #7667ff; box-shadow: 0 0 0 3px rgba(118,103,255,.1); }
.field-group input::placeholder { color: #aaa9a4; }
.password-field { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.password-field button { height: 100%; min-width: 58px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-left: 1px solid var(--line); font-family: var(--font-mono); font-size: 9px; cursor: pointer; text-transform: uppercase; }
.field-error { min-height: 15px; margin: 5px 0 -10px; color: #b33838; font-size: 11px; }
.field-group.invalid > input, .field-group.invalid .password-field { border-color: #b33838; }
.auth-submit { min-height: 54px; margin-top: 2px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); background: var(--signal); border: 1px solid var(--ink); font-size: 15px; font-weight: 680; cursor: pointer; transition: background .2s, transform .2s; }
.auth-submit:hover { background: #7cffdc; transform: translateY(-1px); }
.auth-submit:disabled { cursor: wait; opacity: .65; transform: none; }
.auth-submit i { font-style: normal; }
.auth-switch { margin: 26px 0 0; color: var(--muted); text-align: center; font-size: 13px; }
.auth-switch button, .auth-back { padding: 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid currentColor; font-weight: 650; cursor: pointer; }
.auth-switch button { margin-left: 5px; }
.auth-back { margin-bottom: 28px; display: inline-flex; align-items: center; gap: 9px; font: 10px var(--font-mono); letter-spacing: .04em; }
.terms-check { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; cursor: pointer; }
.terms-check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #7667ff; }
.terms-check a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.terms-error { margin-top: -14px; }

.auth-visual { min-width: 0; min-height: calc(100svh - 72px); padding: clamp(48px, 6vw, 90px); position: relative; overflow: hidden; display: flex; flex-direction: column; color: var(--white); background: var(--ink); }
.visual-grid { position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(to bottom, black, transparent 92%); }
.visual-orbit { position: absolute; border: 1px solid rgba(101,244,207,.18); border-radius: 50%; }
.orbit-a { width: min(68vw, 880px); aspect-ratio: 1; right: -42%; top: -45%; box-shadow: 0 0 0 9vw rgba(101,244,207,.018), 0 0 0 18vw rgba(92,115,255,.018); animation: authOrbit 15s var(--ease) infinite; }
.orbit-b { width: 280px; aspect-ratio: 1; left: 9%; bottom: -15%; border-color: rgba(118,103,255,.28); border-style: dashed; animation: authSpin 24s linear infinite; }
@keyframes authOrbit { 50% { scale: 1.035; } }
@keyframes authSpin { to { transform: rotate(360deg); } }
.visual-heading { position: relative; z-index: 2; }
.visual-heading > span { font: 10px var(--font-mono); letter-spacing: .09em; color: #9a9e99; }
.visual-heading h2 { margin: 24px 0 18px; font-size: clamp(56px, 6.4vw, 104px); line-height: .88; letter-spacing: -.065em; font-weight: 610; }
.visual-heading h2 em { color: var(--signal); font-style: normal; }
.visual-heading p { max-width: 580px; margin: 0; color: #9fa39e; font-size: 17px; line-height: 1.55; }
.access-diagram { width: min(100%, 620px); height: 290px; margin: auto 0 0 auto; position: relative; z-index: 2; }
.access-layer { height: 58px; padding: 0 16px; position: absolute; left: 0; right: 136px; display: grid; grid-template-columns: 34px 80px 1fr auto; align-items: center; gap: 12px; color: #d6d8d2; background: rgba(19,23,25,.92); border: 1px solid rgba(255,255,255,.18); font-family: var(--font-mono); }
.access-layer::after { content: ""; width: 136px; height: 1px; position: absolute; right: -136px; top: 50%; background: linear-gradient(90deg, rgba(101,244,207,.55), rgba(101,244,207,.12)); }
.access-layer span, .access-layer small { color: #747a75; font-size: 9px; }
.access-layer strong { font-size: 11px; font-weight: 500; }
.access-layer i { height: 1px; background: linear-gradient(90deg, var(--signal), transparent); transform-origin: left; animation: signalLine 2.8s var(--ease) infinite; }
.layer-text { top: 10px; }
.layer-image { top: 91px; left: 28px; right: 108px; }
.layer-video { top: 172px; left: 56px; right: 80px; }
.layer-image i { animation-delay: -.9s; }
.layer-video i { animation-delay: -1.8s; }
@keyframes signalLine { 0%,100% { opacity: .25; transform: scaleX(.55); } 50% { opacity: 1; transform: scaleX(1); } }
.access-core { width: 104px; aspect-ratio: 1; position: absolute; right: 0; top: 64px; z-index: 3; display: grid; place-content: center; text-align: center; color: var(--ink); background: var(--signal); border: 8px solid #141719; box-shadow: 0 0 0 1px rgba(101,244,207,.38); font-family: var(--font-mono); }
.access-core span { font-size: 22px; }
.access-core small { margin-top: 3px; font-size: 7px; letter-spacing: .12em; }
.visual-status { min-height: 44px; margin-top: 22px; padding: 0 14px; position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(255,255,255,.16); color: #7f8580; font: 9px var(--font-mono); letter-spacing: .06em; }
.visual-status span:first-child { display: flex; align-items: center; gap: 8px; color: var(--signal); }
.visual-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.auth-toast { max-width: calc(100vw - 32px); padding: 12px 16px; position: fixed; right: 20px; bottom: 20px; z-index: 50; color: var(--ink); background: var(--signal); border: 1px solid var(--ink); font: 10px var(--font-mono); opacity: 0; transform: translateY(70px); transition: opacity .25s, transform .25s var(--ease); }
.auth-toast.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-form-panel { min-height: calc(100svh - 72px); padding-block: 56px; }
  .auth-visual { min-height: 720px; }
}

@media (max-width: 600px) {
  .auth-header { min-height: 64px; padding-inline: 18px; }
  .auth-header-meta > span { display: none; }
  .auth-header-meta { font-size: 9px; }
  .auth-shell { min-height: calc(100svh - 64px); }
  .auth-form-panel { min-height: calc(100svh - 64px); padding: 42px 22px 54px; align-items: start; }
  .auth-state { padding-top: 34px; }
  .auth-title h1 { font-size: 52px; }
  .auth-title p { font-size: 15px; }
  .oauth-grid { margin-top: 28px; }
  .field-group > input, .password-field { height: 50px; }
  .auth-visual { min-height: 640px; padding: 54px 22px; }
  .visual-heading h2 { font-size: 58px; }
  .access-layer { right: 90px; grid-template-columns: 28px 62px 1fr; }
  .access-layer small { display: none; }
  .access-layer::after { width: 90px; right: -90px; }
  .layer-image { right: 72px; }
  .layer-video { right: 54px; }
  .access-core { width: 82px; top: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-state, .visual-orbit, .access-layer i, .auth-toast { animation: none; transition: none; }
}
