.auth-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; margin: auto; padding: 32px; border: 1px solid rgba(255,255,255,.9); border-radius: 28px; color: #303442; background: linear-gradient(155deg,#fffaf4 0,#fff 35%); box-shadow: 0 24px 90px #20294338; overflow: auto; overscroll-behavior: contain; }
/* Session storage may hydrate before the cookie check; never paint its old private rows. */
html:not([data-authenticated="true"]) #session-list,
html:not([data-authenticated="true"]) .messages .message { display: none !important; }
.auth-dialog::backdrop { background: rgba(41,47,68,.28); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.auth-dialog[open] { animation: auth-arrive .18s ease-out; }
.auth-dialog [hidden] { display: none !important; }
.auth-dialog * { box-sizing: border-box; }
.auth-dialog button, .auth-dialog input { font: inherit; }
.auth-dialog button { cursor: pointer; }
.auth-dialog button:focus-visible, .auth-account button:focus-visible, .auth-header-entry:focus-visible { outline: 3px solid #777dea; outline-offset: 3px; }
.auth-dialog .auth-close { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f0f1f7; color: #747c90; font-size: 28px; line-height: 1; }
.auth-heading { margin-bottom: 26px; }
.auth-emblem { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px; color: #b0692d; background: #ffeed8; border: 1px solid #f7dcc1; border-radius: 18px; font-size: 17px; font-weight: 700; }
.auth-eyebrow { margin: 0 0 7px; font-size: 13px; color: #ad743f; }
.auth-dialog h2 { margin: 0 0 9px; font-size: 27px; line-height: 1.35; letter-spacing: -.5px; }
.auth-description { margin: 0; color: #7c8292; font-size: 14px; line-height: 1.7; }
.auth-field { margin: 0 0 18px; }
.auth-field label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
/* Dash 4 adds a 34px clipped container; the native field owns this form's shape. */
.auth-dialog .auth-field div.dash-input-container, .auth-dialog .auth-field div.dash-input { display: block; width: 100%; height: auto; min-height: 0; max-height: none; padding: 0; border: 0; border-radius: 0; overflow: visible; background: transparent; box-shadow: none; }
.auth-field input { display: block; width: 100%; height: 50px; border: 1px solid #e0e3ee; border-radius: 13px; padding: 0 14px; background: #fff; color: #303442; font-size: 16px; outline: none; }
.auth-field input:focus { border-color: #737be4; box-shadow: 0 0 0 3px #626dd51a; }
.auth-field input[aria-invalid=true] { border-color: #d87363; }
.auth-password-wrap { position: relative; }
.auth-password-wrap input { padding-right: 66px; }
.auth-dialog .auth-password-toggle { position: absolute; z-index: 1; top: 3px; right: 4px; height: 44px; min-width: 54px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: #626ca7; font-size: 13px; }
.auth-test-hint { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #fff5e8; color: #a36b36; font-size: 12px; line-height: 1.65; }
.auth-error { margin: 0 0 14px; color: #b84639; font-size: 13px; line-height: 1.6; }
.auth-dialog .auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 0; border-radius: 13px; background: #5965d8; color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 6px 18px #5965d826; }
.auth-submit:hover { background: #4d59cd; }
.auth-dialog button:disabled { cursor: wait; opacity: .7; }
.auth-spinner { display: none; width: 16px; height: 16px; border: 2px solid #ffffff60; border-top-color: white; border-radius: 50%; animation: auth-spin .7s linear infinite; }
.auth-dialog[aria-busy=true] .auth-spinner { display: inline-block; }
.auth-footnote { margin: 20px 0 0; color: #9298a8; font-size: 12px; line-height: 1.7; text-align: center; }
.auth-status { min-height: 0; margin: 12px 0 0; color: #7b8395; font-size: 13px; line-height: 1.6; text-align: center; }
.auth-status:empty { display: none; }
.auth-signed-name { font-size: 20px; font-weight: 600; margin: 8px 0 12px; }
.auth-dialog .auth-dialog-logout { margin-top: 24px; width: 100%; min-height: 48px; border: 1px solid #e0e3ee; background: #fff; border-radius: 12px; color: #6c7490; }
.auth-account.sidebar-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px 6px; }
.auth-account .auth-account-entry { display: flex; flex: 1 1 170px; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 5px; border: 0; background: transparent; border-radius: 12px; text-align: left; cursor: pointer; color: inherit; }
.auth-account-avatar { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: #e7eaff; color: #6b77d7; }
.auth-account-copy { display: grid; min-width: 0; gap: 4px; }
.auth-account-copy strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; white-space: nowrap; }
.auth-account-copy small { font-size: 11px; color: #969dae; line-height: 1.5; }
.auth-account .auth-logout { min-height: 44px; padding: 6px 10px; margin-left: 43px; background: transparent; border: 0; border-radius: 10px; color: #7c849b; font-size: 12px; cursor: pointer; }
.auth-account .auth-logout[hidden] { display: none; }
.auth-account button:hover { background: #eceefa; }
.header-actions .auth-header-entry { min-width: 48px; min-height: 40px; padding: 6px 10px; background: #f4f5fc; border: 1px solid #e7e9f3; border-radius: 12px; color: #6873b2; font-size: 12px; cursor: pointer; }
html.auth-modal-open, html.auth-modal-open body { overflow: hidden !important; }
@keyframes auth-arrive { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 479px) { .auth-dialog { width: calc(100vw - 24px); padding: 26px 22px 22px; border-radius: 24px; max-height: calc(100dvh - 24px); } .auth-heading { margin-bottom: 22px; } .auth-dialog h2 { font-size: 25px; } .auth-emblem { margin-bottom: 14px; } .header-actions .auth-header-entry { min-width: 44px; padding: 5px 8px; } }
@media (max-height: 560px) { .auth-dialog { padding: 20px 26px; } .auth-emblem { display: none; } .auth-heading { margin-bottom: 15px; } .auth-field { margin-bottom: 12px; } .auth-footnote { margin-top: 14px; } }
@media (prefers-reduced-motion: reduce) { .auth-dialog[open], .auth-spinner { animation: none; } }
