.auth-page { min-height: 100%; height: auto; margin: 0; background: var(--bg); }
.auth-page *, .auth-page *::before, .auth-page *::after { box-sizing: border-box; }
.auth-page [hidden] { display: none !important; }
.auth-page svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-shell { position: relative; max-width: 1000px; min-height: 100svh; padding: 88px 32px 48px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; }
.auth-brand .brand-logo__name { font-size: 28px; letter-spacing: .08em; }
.auth-brand .brand-logo__name::after { display: none; }
.auth-theme { position: absolute; top: 28px; right: 32px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer; color: var(--text-muted); }
.auth-theme:hover { color: var(--accent); border-color: var(--accent); }
.theme-sun, .dark .theme-moon { display: none; }
.dark .theme-sun { display: block; }
.auth-layout { display: grid; grid-template-columns: .9fr 1fr; align-items: center; gap: 40px; }
.auth-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px 0; }
.auth-dragon { display: block; width: 100%; max-width: 390px; height: auto; object-fit: contain; }
.auth-panel { padding: 34px 36px; width: 100%; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 28px; }
.auth-tabs a { text-align: center; padding: 8px 6px; font-size: 12px; font-weight: 500; text-decoration: none; color: var(--text-muted); border-radius: 5px; }
.auth-tabs a:hover { color: var(--accent); }
.auth-tabs a[aria-current=page] { background: var(--surface); color: var(--accent); }
.auth-heading { margin-bottom: 24px; }
.auth-heading h1 { font-size: 25px; font-weight: 600; letter-spacing: -.025em; margin: 0; line-height: 1.25; }
.auth-field { margin-top: 18px; }
.auth-field label { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 500; }
.auth-field label span { color: var(--text-muted); font-size: 10px; font-weight: 400; }
.auth-field input { width: 100%; height: 44px; padding: 0 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 12px; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.auth-field input:hover { border-color: color-mix(in srgb, var(--text-muted) 50%, var(--border)); }
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.auth-field input[aria-invalid=true] { border-color: var(--danger); }
.auth-field input::placeholder { color: var(--text-muted); opacity: .7; }
.auth-password { position: relative; }
.auth-password input { padding-right: 46px; }
.auth-password-toggle { position: absolute; top: 4px; right: 5px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; background: transparent; border: 0; border-radius: 5px; color: var(--text-muted); cursor: pointer; }
.auth-password-toggle:hover { color: var(--accent); background: var(--accent-soft); }
.eye-slash { display: none; }
[aria-pressed=true] .eye-slash { display: block; }
.auth-hint { font-size: 10px; line-height: 1.6; color: var(--text-muted); margin: 7px 0 0; }
.auth-submit { width: 100%; min-height: 45px; padding: 11px 16px; margin-top: 24px; border: 1px solid transparent; border-radius: 7px; background: var(--accent); color: white; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s; }
.auth-submit:hover { background: var(--accent-active); }
.dark .auth-submit { background: #8b5cf6; }
.dark .auth-submit:hover { background: #7c3aed; }
.auth-switch { margin: 23px 0 0; text-align: center; color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.auth-switch a { color: var(--accent); font-weight: 500; text-decoration: none; margin-left: 3px; }
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-error { margin: 0 0 18px; padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: 7px; background: color-mix(in srgb, var(--danger) 6%, var(--surface)); color: var(--danger); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.auth-error ul, .auth-field-error ul { margin: 0; padding: 0; list-style: none; }
.auth-field-error { font-size: 11px; line-height: 1.5; color: var(--danger); margin-top: 6px; }
.auth-skip { position: fixed; left: 16px; top: -100px; z-index: 10; background: var(--surface); color: var(--accent); padding: 12px; border: 1px solid var(--accent); border-radius: 8px; }
.auth-skip:focus { top: 12px; }
@media (max-width: 960px) and (min-width: 761px) { .auth-layout { gap: 28px; } .auth-panel { padding: 30px 26px; } }
@media (max-width: 760px) {
  .auth-shell { max-width: 480px; padding: 68px 20px 24px; }
  .auth-theme { top: 18px; right: 20px; width: 36px; height: 36px; }
  .auth-brand .brand-logo__name { font-size: 23px; }
  .auth-layout { display: block; }
  .auth-art { gap: 0; padding: 0 0 20px; }
  .auth-dragon { max-width: 180px; }
  .auth-panel { padding: 28px; }
  .auth-heading h1 { font-size: 24px; }
  .auth-field input { font-size: 16px; height: 46px; }
  .auth-field input::placeholder { font-size: 12px; }
  .auth-password-toggle { top: 5px; }
  .auth-field label, .auth-submit { font-size: 13px; }
  .auth-hint { font-size: 11px; }
}
@media (max-width: 370px) { .auth-shell { padding: 64px 12px 20px; } .auth-theme { right: 12px; } .auth-panel { padding: 24px 20px; } .auth-heading h1 { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .auth-page, .auth-page * { transition: none !important; } }
@media (forced-colors: active) { .auth-submit { border-color: ButtonText; } .auth-tabs a[aria-current=page] { outline: 1px solid Highlight; } }
