.auth-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 48px 16px; background: rgba(0,0,0,.6); }
.auth-modal[hidden] { display: none; }
.auth-modal-dialog { position: relative; width: min(508px,100%); max-height: calc(100dvh - 96px); }
.auth-frame-scroll { overflow-y: auto; max-height: calc(100dvh - 96px); min-height: min(640px,calc(100dvh - 96px)); scrollbar-width: thin; border-radius: 16px; }
#kc-iframe { visibility: hidden; display: block; width: 100%; height: min(740px,calc(100dvh - 96px)); border: 0; background: transparent; }
#kc-iframe.ready { visibility: visible; }
.auth-close { position: absolute; z-index: 2; top: 0; right: -40px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: #061c3d; color: #fff; cursor: pointer; }
.auth-close:focus-visible, .auth-external:focus-visible { outline: 3px solid #54d9de; outline-offset: 3px; }
.auth-loader { position: absolute; left: calc(50% - 24px); top: calc(50% - 24px); width: 48px; height: 48px; border: 4px solid #ffffff40; border-top-color: #0097a7; border-radius: 50%; animation: auth-spin .8s linear infinite; }
.auth-loader[hidden] { display: none; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-status { position: absolute; top: 45%; left: 16px; right: 16px; background: #fff; border-radius: 12px; padding: 20px; color: #061c3d; text-align: center; font: 14px/1.5 Inter,sans-serif; }
.auth-status[hidden] { display: none; }
.auth-external { position: absolute; top: 100%; left: 0; right: 0; padding-top: 10px; color: #fff; text-align: center; text-decoration: underline; text-underline-offset: 3px; font: 12px/18px Inter,sans-serif; }
@media (max-width:600px) { .nav-actions .login { display: inline-flex; } .nav-actions .btn-small { display: none; } .auth-close { top: -40px; right: 0; } }
@media (prefers-reduced-motion:reduce) { .auth-loader { animation: none; } }
.auth-modal-dialog { display: flex; flex-direction: column; }
.auth-frame-scroll { min-height: 0; flex-shrink: 1; }
#kc-iframe { height: min(740px,calc(100dvh - 220px)); }
.auth-status { position: static; flex-shrink: 0; margin-top: 12px; }
.auth-external { position: static; display: block; flex-shrink: 0; }
