/* Account controls only. The practice layout and exam player remain unchanged. */
.portal-shell .app-header:has(.p99-account) { overflow:visible; z-index:45; }
.p99-account { position:relative; flex:0 0 auto; font-family:Inter,system-ui,sans-serif; }
.p99-account [hidden],.p99-password-dialog [hidden] { display:none!important; }
.portal-shell .p99-account-trigger,.portal-shell .p99-account-signin { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:46px; padding:5px 12px 5px 6px; border:1px solid #353a43; border-radius:999px; background:linear-gradient(145deg,#272a30,#0c0d10 80%); box-shadow:inset 0 1px #ffffff15; color:#f5f6f8; cursor:pointer; font:650 13px/1.2 Inter,system-ui,sans-serif; }
.portal-shell .p99-account-signin { padding:11px 20px; }
.p99-account-trigger:hover,.p99-account-trigger[aria-expanded=true] { border-color:#89919e; background:linear-gradient(145deg,#30343b,#111318); }
.p99-account-avatar { display:grid; place-items:center; width:34px; height:34px; flex:0 0 auto; border-radius:50%; border:1px solid #bfc4cc66; background:linear-gradient(140deg,#e0e3e8,#a5aab3 44%,#656b76); color:#111318; font:800 12px/1 Inter,system-ui,sans-serif; letter-spacing:.01em; box-shadow:inset 0 1px #fff8; }
.p99-account-trigger>svg { width:17px; height:17px; color:#c5cad4; transition:transform .16s ease; }
.p99-account-trigger[aria-expanded=true]>svg { transform:rotate(180deg); }
.p99-account-menu { position:absolute; right:0; top:calc(100% + 12px); width:316px; max-width:calc(100vw - 28px); padding:10px; border:1px solid #666d7c; border-radius:16px; background:linear-gradient(145deg,#252931 0%,#15171d 48%,#090a0d 100%); color:#f5f7fa; box-shadow:0 22px 60px #0009,inset 0 1px #ffffff20; z-index:70; }
.p99-account-menu::before { content:''; position:absolute; right:24px; top:-6px; width:10px; height:10px; transform:rotate(45deg); background:#22262d; border-left:1px solid #666d7c; border-top:1px solid #666d7c; }
.p99-account-identity { display:flex; align-items:center; gap:13px; padding:12px 9px 20px; margin-bottom:9px; border-bottom:1px solid #ffffff19; }
.p99-account-avatar-large { width:48px; height:48px; border-radius:13px; font-size:17px; }
.p99-account-identity>div { min-width:0; flex:1; }
.p99-account-identity strong { display:block; color:#f5f6f9; font-size:15px; line-height:1.4; font-weight:700; overflow-wrap:anywhere; }
.p99-account-identity div>span { display:block; margin-top:4px; color:#b5bcc8; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.portal-shell .p99-account-option { display:flex; align-items:center; gap:12px; width:100%; min-height:50px; padding:12px; border:1px solid #454b56; border-radius:10px; background:linear-gradient(120deg,#323741,#1b1e25); color:#f9fafb; font:600 14px/1.4 Inter,system-ui,sans-serif; text-align:left; cursor:pointer; }
.p99-account-option>span:last-child { margin-left:auto; color:#c8cfda; }
.p99-account-option:hover { border-color:#a0a8b8; background:#353b46; }
.p99-account button:focus-visible,.p99-account-signin:focus-visible,.p99-password-dialog button:focus-visible { outline:2px solid #e5ebf5; outline-offset:3px; }
.p99-password-dialog { box-sizing:border-box; width:460px; max-width:calc(100vw - 28px); max-height:calc(100dvh - 32px); margin:auto; padding:28px; border:1px solid #6a7180; border-radius:20px; background:linear-gradient(145deg,#242831,#111318 50%,#08090c); color:#f4f6fa; box-shadow:0 32px 100px #000b,inset 0 1px #ffffff18; font:400 14px/1.5 Inter,system-ui,sans-serif; overflow:auto; overscroll-behavior:contain; color-scheme:dark; }
.p99-password-dialog::backdrop { background:#020306b8; backdrop-filter:blur(6px); }
.p99-password-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.p99-password-icon { width:44px; height:44px; display:grid; place-items:center; border:1px solid #6d7482; border-radius:12px; background:linear-gradient(140deg,#cdd2dc,#828a99); color:#161a21; }
.p99-password-dialog button { font-family:inherit; cursor:pointer; }
.p99-password-dialog .p99-password-close { display:grid; place-items:center; min-width:40px; height:40px; padding:0; color:#d3d9e3; border:1px solid #404652; border-radius:10px; background:#ffffff06; font-size:26px; line-height:1; }
.p99-password-eyebrow { margin:0 0 7px; font-size:10px; font-weight:700; letter-spacing:.16em; color:#afb8c7; }
.p99-password-dialog h2 { margin:0; font:750 27px/1.2 Inter,system-ui,sans-serif; color:#fff; letter-spacing:-.035em; }
#p99-password-subtitle { margin:10px 0 23px; color:#bfc6d3; font-size:13px; line-height:1.6; }
.p99-password-field { display:block; margin:17px 0 7px; color:#e7ebf2; font-size:13px; font-weight:600; }
.p99-password-input { position:relative; }
.p99-password-dialog input { box-sizing:border-box; display:block; width:100%; min-width:0; height:48px; padding:11px 68px 11px 13px; font:400 16px/1.4 Inter,system-ui,sans-serif; color:#fafbfe; background:#07090d; border:1px solid #48505d; border-radius:10px; box-shadow:inset 0 1px 4px #0004; }
.p99-password-dialog input:focus { outline:2px solid #b8c3d5; outline-offset:2px; border-color:#b8c3d5; }
.p99-password-dialog input[aria-invalid=true] { border-color:#ffb6ab; }
.p99-password-input button { position:absolute; right:5px; top:5px; height:38px; min-width:53px; padding:0 9px; border:0; border-radius:6px; background:transparent; color:#c8d0df; font:650 11px/1 Inter,system-ui,sans-serif; }
.p99-password-input button:hover { background:#ffffff12; }
#p99-password-hint { margin:8px 0 0; color:#aeb8c8; font-size:11.5px; line-height:1.5; }
.p99-password-status { margin:13px 0 0; color:#cbd5e5; font-size:12px; line-height:1.55; overflow-wrap:anywhere; }
.p99-password-status:empty { display:none; }
.p99-password-status[data-kind=error] { padding:10px 12px; border:1px solid #d8897b77; border-radius:8px; color:#ffd1c8; background:#4829233d; }
.p99-password-actions { display:grid; grid-template-columns:auto 1fr; gap:10px; margin-top:23px; }
.p99-password-actions button,.p99-password-done { min-height:47px; padding:11px 17px; border:1px solid #555e6b; border-radius:10px; color:#e4e9f2; background:#171b22; font-size:13px; font-weight:650; }
.p99-password-actions button[type=submit],.p99-password-done { background:linear-gradient(130deg,#f1f3f6,#aeb7c5); border-color:#c3cad5; color:#10141c; }
.p99-password-dialog button:disabled { cursor:wait; opacity:.65; }
.p99-password-dialog input:disabled { opacity:.7; }
.p99-password-code { margin-top:18px; padding-top:4px; border-top:1px solid #4b5463; }
.p99-password-code input { padding-right:13px; letter-spacing:.2em; }
.p99-password-resend { margin-top:10px; padding:8px 0; border:0; background:transparent; color:#dae1ed; font-size:12px; text-decoration:underline; }
.p99-password-success { text-align:center; padding:20px 0 25px; }
.p99-password-success>span { display:grid; place-items:center; width:52px; height:52px; margin:0 auto 16px; border-radius:50%; background:#dbe2ed; color:#141922; font-size:28px; }
.p99-password-success h3 { margin:0; font-size:20px; color:#fff; }
.p99-password-success p,.p99-password-provider { color:#c5cddd; font-size:13px; }
.p99-password-done { width:100%; }
@media(max-width:520px) { .portal-shell .p99-account-trigger { gap:6px; padding-right:8px; min-height:44px; }.p99-account-caption { display:none; }.p99-account-menu { width:292px; }.p99-password-dialog { padding:22px; border-radius:17px; }.p99-password-dialog h2 { font-size:25px; }.p99-password-actions { grid-template-columns:auto 1fr; }.p99-password-actions button { padding:11px 12px; } }
@media(prefers-reduced-motion:reduce) { .p99-account-trigger>svg { transition:none; } }
@media(forced-colors:active) { .p99-account-menu,.p99-password-dialog { background:Canvas; color:CanvasText; border:1px solid CanvasText; }.p99-account-avatar,.p99-password-icon,.p99-account-option { background:Canvas; color:CanvasText; border:1px solid CanvasText; } }

/* Sign out is separate from password settings, but stays in the same menu. */
.portal-shell .p99-account-option.p99-account-signout { margin-top:8px; color:#f0b8b8; border-color:#ffffff20; background:#ffffff04; }
.portal-shell .p99-account-option.p99-account-signout:hover { color:#ffe2e2; border-color:#885159; background:#44262b; }
.p99-account-signout>span:last-child { color:inherit; }
