.auth-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--page); }
.auth-page .topbar { justify-content: space-between; }
.auth-page .language-select { margin-left: auto; }
.auth-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; width: 100%; place-items: center; padding: 56px 24px; }
.auth-card { min-width: 0; width: min(100%, 440px); padding: 36px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 40px var(--shadow); }
.auth-card h1 { margin: 8px 0 12px; font-size: 28px; }
.auth-intro, .auth-help { color: var(--muted); line-height: 1.6; }
.auth-card form { display: grid; gap: 10px; margin-top: 26px; }
.auth-card .ui-input { min-height: 48px; }
.auth-card label:not(:first-of-type) { margin-top: 12px; }
.auth-card .ui-button { min-height: 48px; margin-top: 14px; }
.auth-help { margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; }
.auth-errors, .auth-status { padding: 12px 16px; margin-top: 20px; border-radius: 6px; line-height: 1.5; }
.auth-errors { background: #f6e7e2; border: 1px solid #c9998d; color: #853f36; }
.auth-errors p { margin: 0; }
.auth-status { background: var(--success-bg); color: var(--success-text); }
.auth-page [data-locale] { min-height: 44px; min-width: 44px; }
@media (max-width: 600px) {
  .auth-main { padding: 28px 18px; align-items: start; }
  .auth-card { padding: 26px 22px; }
  .auth-page .topbar { padding: 14px 18px; }
  .auth-page .brand > .brand-name { display: block; font-size: 10px; }
  .auth-page .brand { gap: 10px; }
  .auth-page .brand-logo { width: 40px; height: 40px; }
  .auth-card h1 { font-size: 25px; }
}

.auth-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.auth-identity span { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.auth-identity a { flex-shrink: 0; color: var(--action); font-size: 13px; padding-block: 10px; text-underline-offset: 3px; }
.auth-setup-intro { margin: 4px 0; color: var(--muted); line-height: 1.5; }
.auth-field-help { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.auth-card .auth-remember { margin-top: 10px; }
.auth-card [hidden] { display: none !important; }
#auth-progress { margin-top: 12px; }
#auth-restart { display: inline-block; margin-top: 10px; color: var(--action); }
