/* Password screens, the sign-in box over the board, and the Change password dialog (auth.js).
   They reuse the .web-dialog look; Dark mode comes from theme.css like every dialog. */
.hn-auth { width:min(440px,calc(100vw - 32px)); }
.hn-auth .hn-auth-brand { display:flex; align-items:center; gap:10px; margin:0 0 18px; font-size:17px; font-weight:700; }
.hn-auth .hn-auth-brand img { width:34px; height:34px; display:block; }
.hn-auth .web-fields { gap:12px; }
.hn-auth-field { display:grid; gap:6px; }
.hn-auth-field input[dir=ltr] { text-align:left; }
.hn-auth .hn-auth-field-error { min-height:0; font-size:12.5px; font-weight:normal; line-height:1.5; color:var(--theme-danger,#a13535); }
.hn-auth .hn-auth-field-error:empty { display:none; }
.hn-auth input[aria-invalid=true] { border-color:var(--theme-danger,#a13535) !important; }
.hn-auth .web-error:empty { min-height:0; margin:0; }
.hn-auth .web-actions button[type=submit] { min-width:130px; }
/* theme.css gives every dialog button a light hover background, which would leave the main
   button's light text unreadable; keep the action colour, slightly deeper, instead. */
body.hn-themed .hn-auth button[type=submit]:hover:not(:disabled):not(#none) { background-color:color-mix(in srgb,var(--theme-action) 86%,var(--theme-ink)) !important; }
/* Confirmations share the message line but not the error colour. theme.css paints .web-error
   red through an :is() list that holds an ID, so :not(#none) gives this rule the same weight. */
.hn-auth .web-error.ok, body.hn-themed .hn-auth .web-error.ok:not(#none) { color:var(--theme-accent,#356346) !important; }
/* While the workspace opens, the password screen is the whole page. */
.hn-auth-page::backdrop { background:#ebedee; backdrop-filter:none; }
body.hn-dark .hn-auth-page::backdrop { background:#323b40; }
.hn-auth-page { box-shadow:0 18px 60px #1f2a3422; }
/* Phones zoom into inputs smaller than 16px. */
@media (max-width:700px), (pointer:coarse) { .hn-auth input { font-size:16px; } }
@media (max-width:600px) {
  .hn-auth .web-actions button { min-height:44px; }
  .hn-auth .web-actions button[type=submit] { flex:1; }
}
