.page { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; }
.login-card { width: 440px; max-width: 100%; padding: 44px 40px 35px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 5px 18px #60422b03; }
.brand { text-align: center; margin-bottom: 35px; }
.brand-caption { font-size: 15px; line-height: 1.6; margin: 8px 0 0; color: #746b62; }
.mobile-caption { display: none; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; line-height: 1.5; margin-bottom: 7px; }
.input-wrap { display: flex; align-items: center; position: relative; gap: 11px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--input); color: #8b7a69; transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within { border-color: #9b7b62; box-shadow: 0 0 0 3px #65422f0c; }
.input-wrap:has([aria-invalid="true"]) { border-color: var(--error); }
.input-wrap input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--ink); height: 47px; font-size: 15px; outline: none; }
.input-wrap input:focus-visible { outline: none; }
input::placeholder { color: #a49688; opacity: 1; }
.input-wrap:has(.password-toggle) { padding-right: 2px; }
.password-toggle { display: flex; align-items: center; justify-content: center; flex: 0 0 42px; align-self: stretch; background: transparent; border: 0; color: #8e7967; border-radius: 4px; }
.password-toggle:hover { color: var(--brown); }
.password-toggle .icon { width: 17px; height: 17px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.text-button { border: 0; padding: 0; background: none; color: inherit; text-underline-offset: 3px; }
.text-button:hover { color: var(--brown-hover); text-decoration: underline; }
.forgot-link { font-size: 12px; font-weight: 500; color: #817265; text-decoration: underline; white-space: nowrap; }
.field-error { font-size: 12px; color: var(--error); margin: 6px 0 0; line-height: 1.5; }
.field-error:empty { display: none; }
.password-field { margin-bottom: 28px; }
.form-status { font-size: 11px; line-height: 1.5; color: var(--muted); margin: 10px 0 0; }
.form-status:empty { display: none; }
.login-footer { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 24px; text-align: center; color: #81766b; font-size: 13px; }
.login-footer p { margin: 0; line-height: 1.7; }
.register-link { color: var(--brown); font-size: inherit; font-weight: 700; }
.guest-link { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 500; color: #8c8075; text-decoration: underline; min-height: 24px; }
@media (min-width: 1440px) { .login-card { width: 450px; padding: 48px 42px 38px; } }
@media (max-width: 600px) {
  :root { --background: #f7f1e9; --paper: #fffdf7; }
  .page { padding: 18px; }
  .login-card { width: 100%; max-width: 430px; min-height: min(820px, calc(100svh - 36px)); padding: clamp(42px, 9svh, 76px) clamp(26px, 7vw, 46px) 40px; border-radius: 6px; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }
  .brand { margin-bottom: clamp(40px, 8svh, 70px); }
  .brand-name { text-transform: uppercase; font-size: clamp(26px, 7.5vw, 33px); letter-spacing: -1.6px; }
  .brand-caption { font-size: 15px; margin-top: 12px; line-height: 1.55; }
  .desktop-caption { display: none; }
  .mobile-caption { display: inline; }
  .field { margin-bottom: 28px; }
  .field label { font-size: 11px; letter-spacing: 1.15px; margin-bottom: 10px; }
  .input-wrap { padding-left: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; gap: 12px; }
  .input-wrap:focus-within { box-shadow: 0 2px 0 #65422f20; }
  .input-wrap input { font-size: 16px; height: 44px; }
  .input-wrap input::placeholder { font-size: 15px; }
  .password-field { position: relative; margin-bottom: 55px; }
  .label-row { display: block; }
  .forgot-link { position: absolute; right: 0; top: 81px; font-size: 11px; letter-spacing: 0; text-decoration: none; min-height: 24px; }
  .primary-button { min-height: 46px; border-radius: 3px; }
  .login-button { text-transform: uppercase; font-size: 12px; letter-spacing: .85px; }
  .login-button .icon { display: none; }
  .login-footer { border: 0; margin-top: clamp(32px, 7svh, 58px); padding-top: 0; font-size: 13px; }
  .login-footer p { max-width: 220px; margin: 0 auto; line-height: 1.5; }
  .register-link { font-weight: 600; }
  .guest-link { margin-top: 19px; font-size: 13px; }
  dialog .input-wrap { padding-left: 10px; background: var(--input); border: 1px solid var(--line); border-radius: 4px; }
  dialog .field { margin-bottom: 20px; }
  .password-field:has([aria-invalid="true"]) { margin-bottom: 55px; }
  .password-field:has([aria-invalid="true"]) .forgot-link { top: auto; bottom: -33px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
