/* Sign in / sign up dialog: two-pane layout, short screens and a stepper, so the form never scrolls.
   Scoped to .auth-split (templates/accounts/auth_panel.html); other dialogs are untouched. */
.auth-dialog:has(.auth-split){width:min(880px,calc(100vw - 32px));height:min(640px,calc(100dvh - 32px));max-height:none;border-radius:28px;overflow:hidden;box-shadow:0 30px 80px #0a2a2744,0 2px 6px #0a2a2714}
.auth-dialog:has(.auth-split)[open]{display:block}
.auth-dialog:has(.auth-split) [data-auth-body]{height:100%}
.auth-dialog:has(.auth-split) .auth-dialog-top{position:absolute;top:18px;right:20px;z-index:3;padding:0;border:0;background:none}
.auth-dialog:has(.auth-split) .auth-dialog-top>span,.auth-dialog:has(.auth-split) .auth-dialog-top>img{display:none}
.auth-dialog:has(.auth-split) .auth-dialog-top .icon-button{width:36px;height:36px;border-radius:50%;background:#f7f6ef;color:#66756e;display:grid;place-items:center}
.auth-dialog:has(.auth-split) .auth-dialog-top .icon{width:17px;height:17px}
.auth-split{--a-deep:#073f3e;--a-brand:#0b5a50;--a-ink:#173e3a;--a-muted:#66756e;--a-line:#cfd6cf;--a-soft:#f7f6ef;--a-wash:#f0f5f1;--a-green:#1f8a5b;display:grid;grid-template-columns:300px minmax(0,1fr);height:100%;padding:0!important;color:var(--a-ink)}
.auth-split .icon{width:20px;height:20px;flex:none}
/* brand pane */
.auth-side{position:relative;display:flex;flex-direction:column;padding:34px 30px;overflow:hidden;color:#fff;background:linear-gradient(160deg,#0a4f4a,#073f3e 60%,#05302f)}
.auth-side:before{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,#ffffff14,#fff0 70%)}
.auth-side>*{position:relative}
.auth-side-mark{display:grid;place-items:center;width:44px;height:44px;margin-bottom:26px;border-radius:13px;background:#fff}
.auth-side-mark img{width:30px;height:30px;object-fit:contain}
.auth-split .auth-host-badge{display:inline-flex;align-items:center;gap:7px;width:max-content;margin:0 0 16px;padding:5px 12px;border:1px solid #ffffff2a;border-radius:99px;background:#ffffff1c;font-size:12px;font-weight:600;color:#fff}
.auth-split .auth-host-badge .icon{width:14px;height:14px}
.auth-side-title{margin:0 0 8px;font-size:23px;line-height:1.2;letter-spacing:-.025em;font-weight:600}
.auth-side-text{margin:0;color:#b9d2ca;font-size:13.5px;line-height:1.55}
.auth-benefits{display:grid;gap:14px;margin:26px 0 0;padding:0;list-style:none}
.auth-benefits li{display:flex;align-items:center;gap:12px;color:#e4f0ec;font-size:13.5px;font-weight:500}
.auth-benefits span{display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid #ffffff1f;border-radius:11px;background:#ffffff17}
.auth-benefits .icon{width:17px;height:17px}
.auth-side-wave{position:absolute!important;left:0;right:0;bottom:0;width:100%;height:130px}
/* form pane */
.auth-main{display:flex;flex-direction:column;min-width:0;min-height:0;padding:20px 44px 26px;overflow-y:auto}
.auth-split .auth-panel-heading{display:flex;align-items:center;gap:12px;height:40px;margin:0 52px 14px 0;flex:none;font-size:12px;font-weight:600;color:var(--a-muted)}
.auth-split .auth-back{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--a-soft);color:var(--a-muted);transform:rotate(180deg)}
.auth-split .auth-back[hidden]{display:none}
.auth-split .auth-back .icon{width:16px;height:16px}
.auth-seg{display:flex;flex:1;gap:6px}
.auth-seg span{flex:1;height:4px;border-radius:4px;background:#e4e9e3;transition:background-color .2s}
.auth-seg span.is-on{background:var(--a-brand)}
.auth-seg span:first-child:last-child{display:none}
.auth-split [data-auth-progress]{white-space:nowrap}
.auth-split h2{margin:0 0 6px;font-size:28px;line-height:1.15;letter-spacing:-.03em;font-weight:600}
.auth-split .auth-subtitle{max-width:46ch;margin:0 0 18px;font-size:14.5px;line-height:1.55;color:var(--a-muted)}
.auth-main>form{display:flex;flex-direction:column;flex:1;min-height:0}
.auth-main [data-auth-step]:not([hidden]),.auth-main [data-auth-sub]:not([hidden]){display:flex;flex-direction:column;flex:1}
.auth-split form label:not(.auth-consent):not(.sr-only){display:block;margin:0 0 7px;font-size:12.5px;font-weight:600;color:#2b4a45}
.auth-split .auth-input-wrap{position:relative;margin-bottom:14px}
.auth-split .auth-input-wrap>.icon{position:absolute;left:16px;top:16px;width:20px;height:20px;color:#6b7a73;pointer-events:none}
.auth-split .auth-panel-content input:not([type=checkbox]),.auth-split input:not([type=checkbox]){height:52px;min-height:52px;padding:0 16px;border:1.5px solid var(--a-line);border-radius:14px;font-size:15px;background:#fff}
.auth-split .auth-input-wrap input{padding-left:48px}
.auth-split .auth-password-wrap input{padding-right:52px}
.auth-split .auth-password-wrap [data-password-toggle]{position:absolute;right:6px;top:6px;display:grid;place-items:center;width:40px;height:40px;padding:0;border:0;border-radius:10px;background:none;color:#6b7a73;text-decoration:none}
.auth-split [data-password-toggle] .icon{position:static;width:20px;height:20px}
.auth-split [data-password-toggle] .icon-hide,.auth-split [data-password-toggle][aria-pressed=true] .icon-show{display:none}
.auth-split [data-password-toggle][aria-pressed=true] .icon-hide{display:block}
.auth-split .auth-field-note{display:flex;gap:8px;align-items:flex-start;margin:-6px 0 14px;font-size:12.5px;line-height:1.5;color:var(--a-muted)}
.auth-split .auth-field-note .icon{width:15px;height:15px;margin-top:2px;color:#7a8a83}
.auth-split .auth-note-center{justify-content:center;align-items:center;margin:12px 0 0;text-align:left}.auth-split .auth-note-center span{flex:0 1 auto;max-width:34ch}
.auth-legal-name{display:grid!important;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 14px!important;padding:0;border:0}
.auth-legal-name .auth-input-wrap{margin-bottom:0}
.auth-legal-name input,.auth-legal-name #panel-first{border-radius:14px!important;margin:0!important}
.auth-split .preferred-name{margin:0 0 14px}
.auth-split .preferred-name summary{display:flex;align-items:center;gap:8px;color:#2f6f57;font-size:13.5px;font-weight:600;text-decoration:none;cursor:pointer;list-style:none}
.auth-split .preferred-name summary::-webkit-details-marker{display:none}
.auth-split .preferred-name summary .icon{width:16px;height:16px}
.auth-split .preferred-name[open] summary{margin-bottom:10px}
.auth-split .auth-primary{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:54px;margin-top:auto;border-radius:14px;font-size:15.5px;font-weight:600;box-shadow:0 8px 18px #073f3e33}
.auth-split .auth-primary .icon{width:18px;height:18px}
.auth-split .auth-switch{margin:16px 0 0;padding:0;border:0;font-size:13.5px;color:var(--a-muted)}
.auth-split .auth-switch a{color:var(--a-brand);font-weight:600;text-decoration:none}
.auth-split .auth-email-summary{display:flex;align-items:center;gap:12px;width:100%;height:48px;margin:0 0 14px;padding:0 14px;border:0;border-radius:14px;background:var(--a-wash);color:var(--a-brand);font-size:14px;text-align:left}
.auth-split .auth-email-summary .icon{width:19px;height:19px}
.auth-split .auth-email-summary span:first-of-type{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--a-ink);font-weight:600;text-decoration:none}
.auth-split .auth-email-summary span:last-child{font-size:13px;font-weight:600;color:#2f6f57;text-decoration:none}
.auth-split .auth-email-change{justify-content:center;height:auto;margin:10px 0 0;background:none;color:var(--a-brand);font-weight:600}
.auth-split .forgot-password-row{margin:-6px 0 14px;padding:0}
.auth-split .forgot-password-link{padding:0!important;color:var(--a-brand)!important;font-weight:600;text-decoration:none!important}
.auth-split .google-signin{margin:0 0 16px}
.auth-split .google-signin-button{min-height:52px;border:1.5px solid var(--a-line);border-radius:14px;font-weight:600}
.auth-split .auth-or{margin:16px 0 0}
.auth-split .auth-or span{font-size:12.5px;color:#8a978f}
.auth-split .google-signin+form [data-auth-step="1"] label:first-child{margin-top:0}
.auth-split .auth-errors{margin:0 0 12px;padding:10px 14px;border:1px solid #f4c7c1;border-radius:12px;background:#fdecea;color:#7a1d15;font-size:13px}
/* password rules and strength */
.auth-meter{display:flex;gap:5px;margin:-4px 0 10px}
.auth-meter i{flex:1;height:4px;border-radius:4px;background:#e4e9e3;transition:background-color .2s}
.auth-meter i.is-on{background:var(--a-green)}
.auth-split .password-rules{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px;margin:0 0 14px;padding:0}
.auth-split .password-rules li{align-items:center;gap:8px;font-size:12.5px;line-height:1.35;color:var(--a-muted)}
.auth-split .password-rules li::before{content:"";width:15px;height:15px;border-radius:50%;background:#e9ece8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/9px no-repeat}
.auth-split .password-rules li.is-met{color:#17704a;font-weight:500}
.auth-split .password-rules li.is-met::before{content:"";background-color:var(--a-green)}
.auth-split .auth-promotions{margin:0 0 10px;padding:11px 14px;border:1px solid #e6e9e3;border-radius:14px;background:#fbfcfa;font-size:11.5px;line-height:1.5;color:var(--a-muted)}
.auth-split .auth-promotions label{flex-direction:row-reverse;justify-content:flex-end;gap:10px;margin:8px 0 0;font-size:12.5px;font-weight:500;color:var(--a-ink)}
.auth-split .auth-consent{margin:0 0 14px;font-size:12px;line-height:1.5;color:#4b5b54}
.auth-split .auth-panel-content input[type=checkbox],.auth-split input[type=checkbox]{width:20px;height:20px;min-height:20px;margin-top:1px;accent-color:var(--a-deep)}
/* verification code */
.auth-split .auth-otp-step{align-items:center;text-align:center}
.auth-mailc{display:grid;place-items:center;width:60px;height:60px;margin:0 0 12px;border-radius:19px;background:var(--a-wash);color:var(--a-brand)}
.auth-mailc .icon{width:26px;height:26px}
.auth-otp-lead{margin:0;font-size:14.5px;color:var(--a-muted)}
.auth-otp-lead strong{color:var(--a-ink)}
.auth-split .otp-notice{margin:10px 0 0;padding:0;border:0;background:none;color:var(--a-muted);font-size:13px}
.auth-split .otp-notice:empty{display:none}
.auth-cells{position:relative;display:flex;justify-content:center;gap:10px;margin:18px 0 0}
.auth-cells i{display:grid;place-items:center;width:52px;height:62px;border:1.5px solid var(--a-line);border-radius:14px;background:#fff;font-style:normal;font-size:24px;font-weight:600;font-variant-numeric:tabular-nums}
.auth-cells i.is-filled{background:#f8fbf9;border-color:#b9cfc6}
.auth-cells:focus-within i.is-active{border-color:var(--a-brand);box-shadow:0 0 0 1px var(--a-brand)}
.auth-split .auth-cells input.otp-input{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;border:0!important;border-radius:14px;background:transparent;color:transparent;caret-color:transparent;font-size:16px!important;opacity:.01;letter-spacing:0;cursor:text}
.auth-split .auth-cells input.otp-input:focus{outline:none!important;border:0!important;box-shadow:none!important}
.auth-split .otp-resend{justify-content:center;margin-top:16px;gap:10px}
.auth-split .otp-resend .outline-button{min-height:40px;padding:0 16px;border-radius:12px;font-size:13.5px}
/* shorter screens: tighten the rhythm instead of scrolling */
@media(max-height:720px){
  .auth-dialog:has(.auth-split){height:calc(100dvh - 16px)}
  .auth-main{padding-top:14px;padding-bottom:18px}
  .auth-split .auth-panel-heading{margin-bottom:8px}
  .auth-split h2{font-size:24px}
  .auth-split .auth-subtitle{margin-bottom:12px}
  .auth-split input:not([type=checkbox]){height:48px;min-height:48px}
  .auth-split .auth-input-wrap>.icon{top:14px}
  .auth-split .auth-primary{min-height:50px}
  .auth-split .auth-promotions p{display:none}
}
/* phones: a full-screen sheet with the action pinned to the bottom */
@media(max-width:720px){
  .auth-dialog:has(.auth-split){width:100vw;max-width:100vw;height:100dvh;margin:0;border-radius:0}
  .auth-split{grid-template-columns:1fr}
  .auth-side{display:none}
  .auth-main{padding:14px 22px 20px}
  .auth-dialog:has(.auth-split) .auth-dialog-top{top:14px;right:16px}
  .auth-cells i{width:44px;height:54px;font-size:21px}
  .auth-cells{gap:8px}
  .auth-legal-name{grid-template-columns:1fr 1fr}
}
@media(max-width:380px){.auth-legal-name{grid-template-columns:1fr}}
/* Without :has() support the dialog keeps its old size, so hide the brand pane. */
@supports not selector(:has(*)){.auth-split{grid-template-columns:1fr}.auth-side{display:none}.auth-main{padding:20px 24px}}
@media(prefers-reduced-motion:reduce){.auth-seg span,.auth-meter i{transition:none}}

/* Standalone /accounts/login and /accounts/signup pages share the same field and button rhythm. */
.auth-form-panel input:not([type=checkbox]):not([type=radio]){min-height:52px;padding:0 16px;border:1.5px solid #cfd6cf;border-radius:14px;font-size:15px;background:#fff}
.auth-form-panel form p{margin:16px 0}
.auth-form-panel label{margin-bottom:8px;font-size:12.5px;color:#2b4a45}
.auth-form-panel [type=submit]{min-height:54px;border-radius:14px;font-size:15.5px;font-weight:600}
.auth-form-panel h1{font-size:30px;letter-spacing:-.03em}
.auth-story{background:linear-gradient(160deg,#0a4f4a,#073f3e 60%,#05302f)}
