/* Shared login ergonomics. Auth endpoints, tenant colors and desktop composition stay page-owned. */
.mint-auth, .mint-auth *, .mint-auth *::before, .mint-auth *::after { box-sizing: border-box; }
.mint-auth { width: 100%; -webkit-text-size-adjust: 100%; }
.mint-auth [hidden] { display: none !important; }
.mint-auth .input-group input { min-width: 0; font-size: 16px !important; scroll-margin-block: 28px; }
.mint-auth input:is([type=password], [autocomplete=current-password], [autocomplete=new-password]) { padding-right: 54px; }
.mint-auth :is(button, a) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mint-auth :is(button, a):focus-visible { outline: 3px solid var(--primary, #1f8f88); outline-offset: 4px; }
.mint-auth :is(.error-msg, .message, .magic-subtitle, .subtitle, .company-name, .email-highlight, .account-info) { overflow-wrap: anywhere; }
.mint-auth :is(.error-msg, .message) { line-height: 1.5; }
.mint-auth .auth-label { display: block; color: #34454e; text-align: left; font-size: 14px; font-weight: 500; margin: 0 0 8px; }
.mint-auth .auth-status { color: var(--primary, #1f8f88); font-size: 14px; text-align: center; line-height: 1.5; margin-top: 12px; }
.mint-auth .auth-status:empty { display: none; }
.mint-auth :is(.back-link, .text-btn, .resend-link, .forgot-link, .manage-link) { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.mint-auth .back-link { font-family: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mint-auth .resend-link { width: 100%; }
.mint-auth [aria-disabled=true] { cursor: default; opacity: .65; }
.mint-auth :is(.login-btn, .submit-btn, .btn, .magic-link-trigger) { min-height: 48px; }
.mint-auth :is(.password-toggle, .toggle-pw) { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.auth-main .password-toggle { right: 4px; }
.auth-recovery .password-toggle { top: auto; bottom: 4px; right: 4px; transform: none; }
.auth-recovery .input-group input { min-height: 52px; }
.auth-branded .password-actions { top: auto; bottom: 4px; right: 4px; transform: none; }
.auth-branded .input-group.password-group input { padding-right: 54px; }
.auth-branded .auth-forgot-row { display: flex; justify-content: flex-end; margin-top: -12px; }
.auth-branded .input-group input { min-height: 52px; padding-top: 14px; padding-bottom: 14px; }
.mint-auth #codeInput { font-variant-numeric: tabular-nums; letter-spacing: .3em !important; padding-inline: 10px; font-size: 20px !important; }
.mint-auth #codeInput::placeholder { letter-spacing: .12em; }
.mint-auth .auth-recovery-link { display: flex; margin: 16px auto 0; width: fit-content; color: var(--primary, #1f8f88); text-decoration: none; }
.mint-auth .auth-recovery-link[hidden] { display: none; }
.auth-approval .email-highlight { max-width: 100%; }
.auth-approval .info-row > span { min-width: 0; overflow-wrap: anywhere; }
.auth-approval .warning { line-height: 1.5; }
.auth-approval .main { padding-bottom: max(24px, env(safe-area-inset-bottom)); }

@media (max-width: 1023px) {
  html:has(body.mint-auth) { height: auto; min-height: 100%; }
  body.mint-auth { display: flex; flex-direction: column; height: auto; min-height: 100vh; min-height: 100svh; }
  .mint-auth .container { flex: 1 0 auto; min-height: 0; }
  .mint-auth .footer { position: relative; inset: auto; width: 100%; margin: 0; padding: 12px max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); background: none; font-size: 12px; line-height: 1.7; }
  .mint-auth .footer a { display: inline-flex; min-height: 44px; align-items: center; }
  .mint-auth .powered-by { position: relative; inset: auto; align-self: center; justify-content: center; min-height: 44px; margin: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .auth-main .container { flex-direction: column; }
  .auth-main .logo { position: relative; inset: auto; align-self: flex-start; margin: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-left)) 0; }
  .auth-main .left-section { flex: 1; width: 100%; min-height: 0; padding: 36px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left)); align-items: flex-start; }
  .auth-main .right-section { display: none; }
  .auth-main .form-wrapper { max-width: 440px; min-height: 0 !important; }
  .auth-main .welcome-title { font-size: clamp(24px, 6.5vw, 30px); line-height: 1.3; }
  .auth-main .welcome-subtitle { font-size: 15px; line-height: 1.55; margin-bottom: 28px; }
  .auth-main .input-group input { min-height: 52px; font-size: 16px; }
  .auth-main .magic-link-option { margin-top: 8px; }
  .auth-main .magic-link-option a { min-height: 44px; display: inline-flex; align-items: center; }
  .auth-main .magic-form .back-link { margin-bottom: 20px; }
  .auth-main .footer { padding-bottom: max(76px, calc(env(safe-area-inset-bottom) + 60px)); }
  .auth-main .account-remove { width: 44px; height: 44px; }
  .auth-main .account-name { overflow: hidden; text-overflow: ellipsis; }
  .auth-main .account-info { min-width: 0; }
  .auth-main .account-detail { flex-wrap: wrap; }
  .auth-main .account-role { flex-shrink: 0; white-space: nowrap; }
  .auth-main .account-org { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .auth-branded .container, .auth-recovery .container { justify-content: flex-start; padding: max(32px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left)); }
  .auth-branded .logo, .auth-recovery .logo { width: 160px; max-width: 100%; margin: 0 auto 28px; }
  .auth-branded .logo img, .auth-recovery .logo img { width: 100%; max-width: 100%; max-height: 64px; object-fit: contain; }
  .auth-branded .login-box, .auth-recovery .form-box { width: 100%; max-width: 440px; padding: 28px 24px; }
  .auth-branded .verify-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .auth-branded .verify-actions .separator { display: none; }
  .auth-branded .powered-by { padding-bottom: max(76px, calc(env(safe-area-inset-bottom) + 60px)); }
  .auth-branded #crossDeviceNotice { border: 0 !important; padding: 12px !important; }
  .auth-branded #crossDeviceNotice > div { align-items: flex-start !important; }
  .auth-recovery .form-title { font-size: 24px; line-height: 1.3; }
  .auth-recovery .form-subtitle { font-size: 15px; line-height: 1.6; }
  .auth-recovery .password-reqs { font-size: 13px; line-height: 1.5; }
  .auth-approval .header { padding-top: max(16px, env(safe-area-inset-top)); }
  .auth-approval .main { padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); }
}
@media (max-width: 359px) {
  .auth-main .left-section { padding-inline: 20px; }
  .auth-branded .container, .auth-recovery .container { padding-inline: 16px; }
  .auth-branded .login-box, .auth-recovery .form-box { padding: 24px 18px; }
  .mint-auth .magic-title { font-size: 23px; }
}
@media (max-height: 500px) and (max-width: 1023px) {
  .auth-main .left-section { padding-top: 24px; }
  .auth-branded .container, .auth-recovery .container { padding-top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .mint-auth *, .mint-auth *::before, .mint-auth *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
