.native-security{margin:18px auto 8px;max-width:640px;color:#29455d}
.manage-refresh main.admin-shell>.native-security{order:4;flex:0 0 auto;align-self:center;width:min(640px,100%);margin:auto auto 0}
.native-security .native-dock{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.native-security button{width:auto;min-height:30px;margin:0;padding:5px 13px;border:1px solid #d5e0ea;border-radius:999px;background:#f7fafc;color:#37516a;font-size:12px;font-weight:500;line-height:1.4;box-shadow:none}
.native-security button:hover:not(:disabled){background:#edf4fa;border-color:#b6cadc}.native-security button:focus-visible{outline:2px solid #437daf;outline-offset:3px}
.native-security .native-auth-panel{margin:12px 0 0;padding:16px;border:1px solid #d5e0ea;border-radius:14px;background:#fff;box-shadow:0 6px 22px #1b3b5910}
.native-security .native-heading,.native-security .native-master-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.native-security h2,.native-security h3{margin:0;font-size:15px}.native-security .help{font-size:12px;line-height:1.6}
.native-security .native-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.native-security code{display:block;overflow-wrap:anywhere;font:11px/1.65 ui-monospace,Consolas,monospace;padding:7px 9px;border-radius:6px;background:#f2f6fa;color:#29455d}
.native-security [hidden],#device-security[hidden]{display:none!important}
.native-security .native-devices{list-style:none;padding:0;margin:10px 0 0}.native-security .native-devices li{border-top:1px solid #e1e8ee;padding:12px 0}
.native-security .native-devices p{font-size:11px;overflow-wrap:anywhere;margin:5px 0}.native-security .native-devices button{margin:7px 7px 0 0}
@media(max-width:480px){.native-security .native-auth-panel{padding:12px}.native-security .native-dock{gap:6px}}


/* Phone passkey module appended; current native prefix remains byte exact. */
.phone-security{display:none}
.phone-checking #native-security,.phone-checking #device-security{display:none!important}
.phone-bootstrap{order:4;margin:20px auto 0;max-width:620px;font-size:13px;color:#5e6e7e}
.phone-mode #native-security,.phone-mode #device-security{display:none!important}
.phone-mode #login-form{display:block!important}
.phone-mode .phone-security:not([hidden]){display:block;order:4;align-self:center;max-width:100%;margin:20px auto 0}
.phone-mode .phone-security [hidden]{display:none!important}
.phone-dock{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px}
.phone-dock>button{width:auto;min-height:28px;margin:0;padding:3px 10px;border:1px solid #dce1e6;border-radius:999px;background:#f7f9fc;color:#263340;font-size:11px;line-height:1.4}
.phone-panel{width:min(620px,calc(100vw - 32px));margin-top:12px;padding:18px;border:1px solid #dce3eb;border-radius:14px;background:#fff;color:#263340;font-size:14px;line-height:1.6}
.phone-panel header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.phone-panel h2{margin:0;font-size:18px}.phone-panel h3{margin:0;font-size:16px}
.phone-panel button{width:auto;min-height:34px;margin:4px 0;padding:6px 10px;font-size:13px;border-radius:8px}
.phone-panel .phone-label{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:13px}
.phone-panel input{min-width:0;flex:1;max-width:360px;min-height:34px;font-size:14px}
.phone-detail{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6}
.phone-note{color:#5e6e7e;font-size:13px}.phone-error{color:#b42318}
.phone-panel ul{list-style:none;margin:12px 0;padding:0}.phone-panel li{padding:12px 0;border-bottom:1px solid #edf0f4}
.phone-badge{display:inline-block;margin-left:8px;padding:1px 6px;border:1px solid #dce3eb;border-radius:999px;font-size:12px}
@media(max-width:640px){.phone-panel{padding:14px}.phone-panel .phone-label{align-items:stretch;flex-direction:column;gap:4px}}


/* Phone passkey module appended; current native prefix remains byte exact. */
/* Scan first: original authentication assets remain above this override. */
#phone-security,#phone-bootstrap-status{display:none!important}
body.phone-checking #native-security,body.phone-checking #device-security,body.phone-mode #native-security,body.phone-mode #device-security{display:none!important}
body.phone-checking #login-form,body.phone-mode #login-form{display:block!important}
body.phone-checking #login-form>label,body.phone-mode #login-form>label{display:none!important}
body.phone-password-step #login-form>label,body.phone-inactive #login-form>label{display:block!important}
#login-form>label[hidden]{display:none!important}
body.phone-mode:not(.phone-login-error):not(.phone-owner-active) #admin-message,body.phone-checking:not(.phone-login-error) #admin-message{display:none!important}

/* A master-only approval view reuses the existing verified phone panel. */
#phone-approval-open[hidden],#phone-approval-feedback[hidden]{display:none!important}
body.phone-approval-open #phone-security:not([hidden]){display:block!important;order:4;align-self:center;margin:14px auto 0;max-width:100%}
body.phone-approval-open #phone-panel{margin-top:0}
body.phone-approval-open #phone-security .phone-dock,body.phone-approval-open #phone-panel>section[aria-live],body.phone-approval-open #phone-reverify,body.phone-approval-open #phone-next-controls,body.phone-approval-open #phone-details>summary,body.phone-approval-open #phone-details>.phone-note,body.phone-approval-open #phone-message,body.phone-approval-open #phone-pending,body.phone-approval-open #phone-status-refresh,body.phone-approval-open #phone-master>.phone-note{display:none!important}
body.phone-approval-open #phone-details{display:block}
#phone-approval-feedback{order:5;max-width:620px;margin:10px auto;color:#29455d;font-size:13px;line-height:1.6;overflow-wrap:anywhere}

/* Keep refresh and close together in the approval header. */
.phone-panel-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}

/* The existing master-only request entry sits beside the home overview title. */
.manage-refresh .overview-heading.phone-authorization-heading{justify-content:flex-start;flex-wrap:wrap;gap:8px 12px}
.manage-refresh .overview-heading.phone-authorization-heading>div{min-width:0}
.manage-refresh .overview-heading.phone-authorization-heading h2{margin-bottom:0}
#phone-approval-open{flex:0 0 auto;width:auto;min-height:34px;margin:0;padding:6px 12px;border:1px solid #c9d8e5;border-radius:8px;background:#f4f8fc;color:#244b70;font-size:13px;line-height:1.4;white-space:nowrap}
#phone-approval-open:hover:not(:disabled){background:#e9f2fa}
#phone-approval-open:focus-visible{outline:2px solid #437daf;outline-offset:3px}
@media(max-width:620px){.manage-refresh .overview-heading.phone-authorization-heading{gap:8px}#phone-approval-open{padding:6px 10px;font-size:12px}}
#phone-authorization-request[hidden],#phone-authorization-request [hidden]{display:none!important}
#phone-authorization-request{margin-top:16px;padding-top:14px;border-top:1px solid #e1e8ee}
#phone-request-open{width:auto;min-height:34px;padding:6px 12px;border:1px solid #c9d8e5;border-radius:8px;background:#f4f8fc;color:#244b70}
#phone-request-panel{margin-top:12px;text-align:left}
#phone-request-panel header{display:flex;align-items:center;justify-content:space-between;gap:10px}
#phone-request-panel h3,#phone-request-panel h4{margin:0;font-size:16px}
#phone-request-panel p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
#phone-request-form{display:grid;gap:12px;margin:14px 0}
#phone-request-form label{display:grid;gap:6px;font-size:13px}
#phone-request-form input{width:100%;min-width:0;box-sizing:border-box;min-height:38px}
#phone-request-panel button{width:auto;min-height:34px;margin:0;padding:6px 10px}
#phone-request-detail{white-space:pre-wrap}
.phone-request-error{color:#b42318}

/* SMS mode is the only ordinary-login surface when the server requires it. */
body.sms-checking #login-form,body.sms-checking #phone-authorization-request{display:none!important}
body.sms-mode:not(.sms-stepup) #login-form,body.sms-mode:not(.sms-stepup):not(.sms-phone-ready) #phone-security{display:none!important}
body.sms-mode.sms-stepup #login-form{display:block!important}
body.sms-mode.sms-stepup #phone-authorization-request{display:none!important}
body.sms-mode.sms-stepup #sms-login-section{display:none!important}
#sms-login-section[hidden],#sms-login-section [hidden],#sms-master-open[hidden],#sms-master-close[hidden]{display:none!important}
#sms-login-section{text-align:left;margin:12px 0}
#sms-login-section h3{margin:0 0 8px;font-size:18px}
#sms-login-section p{font-size:13px;line-height:1.65;overflow-wrap:anywhere}
#sms-login-section form{display:grid;gap:12px;margin:14px 0}
#sms-login-section form label{display:grid;gap:6px;font-size:13px}
#sms-login-section input{box-sizing:border-box;min-width:0;min-height:40px;width:100%}
#sms-login-section button{min-height:40px}
#sms-recipients{display:flex;flex-wrap:wrap;gap:10px;border:1px solid #d7e3ee;border-radius:10px;padding:12px;margin:14px 0}
#sms-recipients legend{font-size:13px;padding:0 4px}
#sms-recipients label{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid #d7e3ee;border-radius:8px;cursor:pointer}
#sms-recipients input{width:18px;min-height:18px;margin:0;accent-color:#2767a0}
#sms-login-section .sms-error{color:#b42318}
#sms-master-open,#sms-master-close{width:auto;min-height:34px;margin:4px 0;padding:6px 12px;border:1px solid #c9d8e5;border-radius:8px;background:#f4f8fc;color:#244b70;font-size:13px}
body.sms-mode.sms-stepup #admin-message{display:block!important}
#sms-master-feedback{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#sms-master-feedback.sms-error{color:#b42318}

/* Ordinary SMS login does not create a separate phone approval request. */
body.sms-mode #phone-authorization-request{display:none!important}
#sms-login-section .trusted-remember{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid #d7e3ee;border-radius:8px}
#sms-login-section .trusted-remember input{flex:0 0 18px;width:18px;min-height:18px;margin:2px 0 0}
#sms-login-section .trusted-remember small{display:block;color:#5e6e7e;line-height:1.6;margin-top:4px}
#trusted-computer-state{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:#486273;max-width:100%}
#trusted-computer-state[hidden],#trusted-computer-state [hidden]{display:none!important}
#trusted-revoke{width:auto;min-height:30px;margin:0;padding:4px 10px;border:1px solid #c9d8e5;border-radius:8px;background:#f4f8fc;color:#244b70}
#trusted-computer-devices{flex-basis:100%;display:grid;gap:8px;margin:4px 0;padding:0;list-style:none}
#trusted-computer-devices li{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 10px;border:1px solid #d7e3ee;border-radius:8px;background:#fff}
#trusted-computer-state button{width:auto;min-height:30px;margin:0;padding:4px 10px;font-size:13px}
