/* K Access 0.9.05 — unified pre-login flow pane.
   Forgot/Register/Reset/Authenticator Repair render inside the canonical
   portal login pane. No standalone outer cards and no nested card-in-card
   shells are permitted on these flows. */
.auth-login-view,.auth-flow-view{min-width:0}
.auth-flow-view[hidden]{display:none!important}
.login-card.auth-flow-active{display:block}
.auth-flow-heading{margin:0 0 22px}
.auth-flow-heading .login-title-row{display:flex!important}
.auth-flow-heading .login-title-row .ui-icon{color:var(--p-accent)}
.auth-flow-heading p{font-size:14px!important;line-height:1.5!important;font-weight:400!important;letter-spacing:0!important;color:var(--p-muted)!important;margin:10px 0 0!important}
.auth-flow-heading--compact{margin-bottom:18px}
.auth-flow-kicker{font-size:11px;font-weight:650;letter-spacing:.18em;line-height:1.45;text-transform:uppercase;color:var(--p-accent);margin:0 0 10px}
.auth-flow-title{font-size:26px;line-height:1.3;font-weight:650;letter-spacing:-.015em;margin:0}
.auth-flow-copy{font-size:14px;line-height:1.55;color:var(--p-muted);margin:8px 0 20px}
.auth-flow-links{display:flex;align-items:center;justify-content:space-between;gap:12px 18px;margin-top:16px;padding-top:14px;border-top:1px solid var(--p-line)}
.auth-flow-links .link-btn{text-align:center}
.auth-flow-view .checks{margin:2px 0 16px}
.auth-flow-view .btn+.btn{margin-top:10px}
.auth-flow-view .msg{margin-top:12px}
.auth-flow-view .small{font-size:12px;color:var(--p-muted)}
.auth-flow-section{min-width:0;margin:0;padding:0;border:0;background:transparent;border-radius:0}
.auth-flow-section+.auth-flow-section{margin-top:18px;padding-top:18px;border-top:1px solid var(--p-line)}
.auth-flow-section p{font-size:14px;line-height:1.55;color:var(--p-muted);margin:0 0 16px}
.auth-flow-section h3{font-size:18px;line-height:1.3;font-weight:650;margin:0 0 8px}
.auth-flow-field{display:grid;gap:6px;margin:0 0 var(--kg-field-gap);min-width:0}
.auth-flow-field label{font-size:13px;line-height:1.45;color:var(--p-muted)}
.auth-flow-field input{width:100%;height:var(--kg-control-h);min-width:0;padding:9px 12px;border:1px solid #52647a;border-radius:var(--kg-control-radius);background:var(--p-field);color:var(--p-text);font-size:16px;outline:none}
.auth-flow-field input:focus{border-color:var(--p-accent);box-shadow:0 0 0 2px var(--p-line)}
.auth-flow-field input.k-input-warn{border-color:#d87c84}
.auth-flow-field.code-field input,.auth-flow-view .k-auth-code-input{text-align:center;font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1;letter-spacing:.18em;font-weight:700;padding-left:calc(12px + .18em)}
.auth-flow-view .k-auth-code-input::placeholder{letter-spacing:0;font-weight:400}
.auth-flow-status{font-size:13px;line-height:1.5;color:var(--p-muted);margin:0 0 14px}
.auth-flow-status.ok{color:#9ed5be}.auth-flow-status.bad{color:#ed9ca4}.auth-flow-status.warn{color:#d9bd88}
html[data-portal-theme="light"] .auth-flow-status.ok{color:#236347}html[data-portal-theme="light"] .auth-flow-status.bad{color:#a92d3e}html[data-portal-theme="light"] .auth-flow-status.warn{color:#80600d}

/* Authenticator repair / TOTP: controls may have borders; layout containers do not. */
.totp-setup-layout{display:grid;grid-template-columns:minmax(0,1fr) 208px;grid-template-areas:"details qr";gap:22px;align-items:center;min-width:0}
.totp-setup-details{grid-area:details;display:grid;gap:13px;min-width:0;align-content:start}.totp-setup-details .auth-flow-field{margin:0}
.totp-qr-panel{grid-area:qr;display:grid;place-items:center;gap:8px;min-width:0}.totp-qr-frame{width:200px;height:200px;max-width:100%;display:grid;place-items:center;padding:8px;border:1px solid var(--p-line);border-radius:12px;background:#fff}.totp-qr-canvas{display:block;width:184px;height:184px;max-width:100%;aspect-ratio:1/1;image-rendering:pixelated}.totp-qr-caption{font-size:11px;line-height:1.3;text-align:center;color:var(--p-muted);max-width:200px}
.manual-key{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;border:1px dashed var(--p-line);border-radius:var(--kg-control-radius);padding:11px 12px;margin:0;font-size:13px;line-height:1.45;text-align:center;overflow-wrap:anywhere;word-break:break-word;background:rgba(0,0,0,.06);min-width:0}.manual-key strong{display:block;font-family:inherit;font-size:11px;line-height:1.35;margin:0 0 6px;color:var(--p-muted)}.manual-key span{display:block;font-size:14px;line-height:1.45;font-weight:750;letter-spacing:.045em}
.repair-recovery-intro{margin:0 0 12px!important;text-align:center}.repair-recovery-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0 0}.repair-recovery-code{display:flex;align-items:center;justify-content:center;min-width:0;min-height:var(--kg-button-h);padding:8px 10px;border:1px dashed var(--p-line);border-radius:var(--kg-control-radius);background:rgba(0,0,0,.06);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.2;font-weight:700;letter-spacing:.08em;text-align:center;overflow-wrap:anywhere}

/* Account/request forms keep the main portal control rhythm. */
.auth-flow-view .compact-checks{margin-top:0}.auth-flow-view .check{font-size:13px}

@media(min-width:900px) and (max-height:900px){
  .auth-flow-heading{margin-bottom:16px}.auth-flow-heading p{font-size:13px!important;margin-top:6px!important}.auth-flow-title{font-size:23px}.auth-flow-copy{font-size:13px;margin:6px 0 14px}.auth-flow-kicker{font-size:10px;margin-bottom:7px}
  .auth-flow-field{gap:4px}.auth-flow-field label{font-size:12px}.auth-flow-field input{height:var(--kg-control-h);padding:7px 11px;font-size:var(--kg-control-font)}
  .auth-flow-links{margin-top:11px;padding-top:10px}.auth-flow-section+.auth-flow-section{margin-top:12px;padding-top:12px}.auth-flow-section p{font-size:13px;margin-bottom:12px}.totp-setup-layout{gap:18px}.totp-setup-details{gap:10px}.totp-qr-frame{width:188px;height:188px}.totp-qr-canvas{width:172px;height:172px}.totp-qr-caption{max-width:188px}
}
@media(max-width:1100px) and (min-width:900px){.totp-setup-layout{grid-template-columns:1fr;grid-template-areas:"qr" "details";gap:16px}.totp-qr-frame{width:188px;height:188px}.totp-qr-canvas{width:172px;height:172px}}
@media(max-width:899px){.auth-flow-heading{margin-bottom:18px}.totp-setup-layout{grid-template-columns:1fr;grid-template-areas:"qr" "details";gap:16px}.totp-qr-frame{width:188px;height:188px}.totp-qr-canvas{width:172px;height:172px}.repair-recovery-codes{grid-template-columns:1fr}}
@media(max-width:540px){.auth-flow-title{font-size:24px}.auth-flow-copy{font-size:13px}.auth-flow-links{flex-direction:row;gap:10px}.manual-key span{font-size:13px}.repair-recovery-code{font-size:12px}}
@media(max-width:359px){.auth-flow-links{flex-direction:column;align-items:stretch}.auth-flow-links .link-btn{text-align:center}}
