body.auth-modal-open { overflow: hidden; }
.nav__auth { padding: 6px 13px; color: #fff; background: var(--blue-dark); border: 0; border-radius: 999px; font-size: .68rem; }
.nav__auth[data-authenticated="true"] { color: #d7ecff; background: rgba(41, 151, 255, .22); border: 1px solid rgba(41, 151, 255, .45); }
.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; padding: 24px; }
.auth-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(12px); }
.auth-dialog { position: relative; width: min(100%, 470px); max-height: min(760px, calc(100dvh - 48px)); overflow-y: auto; padding: 30px; color: var(--ink); background: #fff; border-radius: 8px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.auth-dialog__header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.auth-dialog__header p { color: var(--blue-dark); font-size: .62rem; font-weight: 650; }
.auth-dialog__header h2 { margin-top: 8px; font-size: 1.8rem; font-weight: 640; line-height: 1.1; }
.auth-dialog__close { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; padding: 0; color: #555; background: #f5f5f7; border: 0; border-radius: 50%; font-size: 1.45rem; font-weight: 350; line-height: 1; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 34px; padding: 4px; background: #f5f5f7; border-radius: 7px; }
.auth-tabs button { min-height: 42px; color: #6e6e73; background: transparent; border: 0; border-radius: 5px; font-size: .78rem; font-weight: 600; }
.auth-tabs button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .08); }
.auth-form { display: grid; gap: 18px; margin-top: 26px; }
.auth-form label { display: grid; gap: 8px; color: #6e6e73; font-size: .67rem; font-weight: 600; }
.auth-form input { width: 100%; height: 48px; padding: 0 14px; color: var(--ink); background: #fff; border: 1px solid rgba(0, 0, 0, .18); border-radius: 7px; font: inherit; font-size: .86rem; outline: 0; }
.auth-form input:focus { border-color: var(--blue-dark); box-shadow: 0 0 0 3px rgba(0, 113, 227, .12); }
.auth-form__submit { min-height: 48px; margin-top: 4px; color: #fff; background: var(--blue-dark); border: 0; border-radius: 7px; font-size: .82rem; font-weight: 620; }
.auth-form__submit:disabled { cursor: wait; opacity: .6; }
.auth-form__status { min-height: 21px; margin-top: 14px; color: var(--muted); font-size: .7rem; }
.auth-form__status[data-type="error"] { color: #b42318; }
.auth-form__status[data-type="success"] { color: #067647; }
.auth-dialog__note { margin-top: 16px; color: #aaa; font-size: .61rem; line-height: 1.5; }
.auth-unconfigured, .auth-session { margin-top: 32px; padding: 26px 0 4px; border-top: 1px solid var(--line); }
.auth-unconfigured strong, .auth-session strong { display: block; font-size: 1.08rem; font-weight: 620; }
.auth-unconfigured p, .auth-session p { margin-top: 12px; color: var(--muted); font-size: .78rem; }
.auth-session > span { color: var(--muted); font-size: .62rem; }
.auth-session strong { margin-top: 6px; overflow-wrap: anywhere; }
.auth-session button { width: 100%; min-height: 44px; margin-top: 24px; color: #b42318; background: #fff; border: 1px solid rgba(180, 35, 24, .25); border-radius: 7px; font-size: .78rem; font-weight: 600; }

@media (max-width: 680px) {
  .nav__auth { width: 100%; margin-top: 18px; padding: 13px 18px; font-size: 1rem; text-align: center; }
  .auth-modal { align-items: end; padding: 0; }
  .auth-dialog { width: 100%; max-height: calc(100dvh - 28px); padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); border-radius: 8px 8px 0 0; }
  .auth-dialog__header h2 { font-size: 1.55rem; }
}
