.account-page { background: var(--paper); color: var(--ink); }
.account-masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 15px max(24px, calc((100vw - 1180px) / 2)); background: var(--panel); border-bottom: 1px solid var(--rule); }
.account-brand { display: flex; gap: 14px; align-items: center; text-decoration: none; }
.account-brand img { display: block; width: 48px; height: auto; }
.account-brand > span { font-size: 15px; font-weight: 650; }
.account-brand small { display: block; color: var(--ink-3); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; margin-top: 3px; }
.account-masthead nav { display: flex; align-items: center; gap: 22px; }
.dashboard-return { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--ink-2); padding: 9px 0; }
.dashboard-return svg { width: 16px; height: 16px; }
.dashboard-return:hover { color: var(--red); }
.account-masthead .btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.account-masthead .btn svg { width: 16px; height: 16px; }
.account-shell { max-width: 1180px; margin: 0 auto; padding: 38px 24px 24px; }
.account-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.eyebrow { font-size: 10px; letter-spacing: .14em; color: var(--red); font-weight: 700; margin-bottom: 9px; }
.account-page-heading h1 { font-size: 32px; margin-bottom: 9px; }
.account-page-heading p:not(.eyebrow) { color: var(--ink-2); font-size: 14px; }
.access-label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 6px; color: var(--basil); background: var(--basil-soft); font-size: 11px; font-weight: 600; }
.access-label svg { width: 16px; height: 16px; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 24px; }
.account-stats > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; padding: 18px 22px; border: 1px solid var(--rule); border-radius: 10px; }
.account-stats span { font-size: 12px; color: var(--ink-2); }
.account-stats strong { font-size: 27px; font-weight: 600; }
.account-columns { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
.account-panel { background: white; border: 1px solid var(--rule); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 12px; padding-bottom: 21px; border-bottom: 1px solid var(--rule-2); margin-bottom: 20px; }
.panel-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: var(--red-soft); color: var(--red); border-radius: 9px; flex: none; }
.panel-title h2 { font-size: 17px; margin: 0; }
.panel-title p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.account-shell label:not(.check) { display: grid; gap: 7px; margin: 16px 0; font-size: 12px; font-weight: 600; }
.account-shell input:not([type=checkbox]), .account-shell select { width: 100%; font-size: 13px; min-height: 43px; }
.account-shell input::placeholder { color: #89918b; font-weight: 400; }
.role-note { padding: 10px 12px; background: var(--paper); color: var(--ink-2); border-radius: 7px; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.account-shell fieldset { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; margin: 20px 0; }
.account-shell legend { padding: 0 6px; font-size: 12px; font-weight: 600; }
#store-options { max-height: 222px; overflow-y: auto; scrollbar-width: thin; }
.check { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 12px; cursor: pointer; }
.check input { width: 14px; height: 14px; margin: 0; flex: none; }
.disable-check { margin-bottom: 17px; align-items: flex-start; }
.disable-check input { margin-top: 3px; }
.disable-check small { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rule-2); }
.form-actions button[type=submit] { flex: 1; }
.user-card { padding: 20px 0; border-bottom: 1px solid var(--rule-2); overflow-wrap: anywhere; }
.user-card:first-child { padding-top: 0; }
.user-card:last-child { border-bottom: 0; padding-bottom: 0; }
.user-heading { display: flex; align-items: center; gap: 11px; }
.user-heading .account-avatar { width: 38px; height: 38px; background: var(--paper); color: var(--ink-2); }
.user-heading > div { flex: 1; min-width: 0; }
.user-heading b { font-size: 14px; }
.user-heading p { color: var(--ink-3); font-size: 12px; margin-top: 1px; }
.user-role { font-size: 10px; font-weight: 600; background: var(--red-soft); color: var(--red); border-radius: 5px; padding: 4px 7px; }
.user-role.store { background: var(--paper); color: var(--ink-2); }
.user-scope { color: var(--ink-2); font-size: 12px; margin: 14px 0 10px; }
.user-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--ink-3); font-size: 11px; }
.user-status { display: inline-flex; align-items: center; gap: 5px; color: var(--basil); }
.user-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.user-status.disabled { color: var(--red); }.user-status.pending { color: #806014; }
.user-actions { display: flex; gap: 8px; margin-top: 14px; }
.user-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; min-height: 34px; background: white; border: 1px solid var(--rule); border-radius: 6px; font-size: 11px; cursor: pointer; }
.user-actions button:hover { background: var(--paper); border-color: #bcc7bf; }
.user-actions svg { width: 14px; height: 14px; }
.account-shell #message:empty { display: none; }
.account-shell #message { padding: 12px 15px; background: var(--mustard-soft); border: 1px solid #e9dab6; color: #725522; border-radius: 8px; font-size: 13px; margin-bottom: 20px; }
.account-shell #message.success { color: var(--basil); background: var(--basil-soft); border-color: #cbded0; }
.account-shell #temporary { background: var(--basil-soft); border: 1px solid #b8d5c0; border-radius: 10px; padding: 20px; margin-bottom: 24px; }
#temporary p { font-size: 13px; margin: 8px 0 12px; }
#temporary button, #temporary a { display: inline-block; border: 1px solid #b8d5c0; background: white; padding: 7px 12px; border-radius: 6px; cursor: pointer; text-decoration: none; font-size: 12px; }
.account-shell code { display: block; overflow-wrap: anywhere; font-size: 16px; margin-bottom: 12px; }
.activity-panel { margin-top: 24px; }
.activity-panel > summary { list-style: none; display: flex; align-items: center; gap: 16px; cursor: pointer; font-weight: 600; font-size: 15px; }
.activity-panel > summary::-webkit-details-marker { display: none; }
.activity-panel > summary small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
#audit { max-height: 340px; overflow-y: auto; margin-top: 18px; }
.audit-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; border-top: 1px solid var(--rule-2); padding: 12px 0; font-size: 12px; overflow-wrap: anywhere; }
.audit-row time { color: var(--ink-3); font-size: 11px; }
.audit-row small { display: block; color: var(--ink-3); margin-top: 2px; }
.account-footer { text-align: center; color: var(--ink-3); font-size: 11px; margin-top: 24px; }
.account-shell.narrow { width: calc(100% - 32px); max-width: 430px; margin: 42px auto 20px; padding: 30px 36px; border: 1px solid var(--rule); border-top: 3px solid var(--red); border-radius: 14px; background: white; box-shadow: 0 8px 32px rgba(32,41,35,.04); }
.login-brand img { display: block; width: 68px; height: auto; margin: 0 auto 19px; }
.narrow > .eyebrow, .narrow h1, .narrow #intro { text-align: center; }
.narrow h1 { font-size: 27px; margin-bottom: 10px; }
.narrow #intro { color: var(--ink-3); font-size: 13px; margin-bottom: 24px; }
.narrow form .btn { width: 100%; margin-top: 8px; min-height: 43px; }
.login-help { font-size: 11px; color: var(--ink-3); text-align: center; margin-top: 20px; line-height: 1.7; }
.login-back { display: block; text-align: center; color: var(--ink-2); font-size: 12px; margin-top: 16px; }
.login-footer { color: var(--ink-3); font-size: 10px; text-align: center; padding-bottom: 24px; }
.account-shell button:disabled { opacity: .55; cursor: wait; }
#mfa-challenge > .btn, #security-settings > .btn { width: 100%; min-height: 43px; margin-bottom: 16px; }
#mfa-challenge details { margin-top: 24px; font-size: 12px; }
#mfa-challenge summary { cursor: pointer; color: var(--ink-2); }
#recovery-codes { font-size: 11px; line-height: 1.9; overflow-x: auto; background: var(--paper); padding: 12px; border-radius: 8px; user-select: all; }
#recovery-count { margin: 20px 0 12px; font-size: 12px; color: var(--ink-2); }
/* Authenticator setup keeps the code and confirmation together. */
.login-page .account-shell.narrow:has(#totp-enroll:not([hidden])) { max-width: 680px; padding: 26px 28px 24px; margin-top: 28px; }
.narrow:has(#totp-enroll:not([hidden])) .login-brand img { width: 44px; margin-bottom: 12px; }
.narrow:has(#totp-enroll:not([hidden])) > .eyebrow { font-size: 9px; margin-bottom: 7px; }
.narrow:has(#totp-enroll:not([hidden])) h1 { font-size: 26px; margin-bottom: 7px; }
.narrow:has(#totp-enroll:not([hidden])) #intro { margin-bottom: 24px; line-height: 1.5; }
.totp-start { padding: 24px; border: 1px solid var(--rule); border-radius: 12px; background: #FAFBF8; text-align: center; }
.totp-start-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); }
.totp-start-icon svg { width: 26px; height: 26px; }
.totp-start h2 { font-size: 16px; }
.totp-start p { color: var(--ink-2); font-size: 13px; margin: 8px auto 18px; max-width: 290px; }
.totp-start .btn { min-height: 44px; }
.totp-setup { display: grid; grid-template-columns: 248px minmax(0, 1fr); align-items: start; gap: 0 28px; }
.totp-scan-panel { border: 1px solid var(--rule); border-radius: 12px; padding: 15px; background: #FAFBF8; text-align: center; }
.totp-scan-caption { display: none; }
.totp-qr-frame { width: 216px; max-width: 100%; margin: 0 auto 12px; padding: 0; background: #fff; border-radius: 6px; }
.totp-qr { display: block; width: 216px; height: auto; max-width: 100%; aspect-ratio: 1; margin: 0; }
.totp-manual { color: var(--ink-2); font-size: 11px; text-align: left; }
.totp-manual summary { cursor: pointer; text-align: center; padding: 5px 0; }
.totp-manual summary:hover { color: var(--ink); }
.totp-manual p { margin-top: 10px; line-height: 1.5; }
.account-shell .totp-secret { display: block; padding: 10px; margin: 8px 0 2px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; overflow-wrap: anywhere; user-select: all; font-size: 12px; line-height: 1.7; letter-spacing: .06em; }
.totp-text-button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font-size: 11px; font-weight: 500; cursor: pointer; padding: 7px 4px; text-underline-offset: 3px; }
.totp-text-button:hover { text-decoration: underline; color: var(--red); }
#restart-totp { margin-top: 5px; }
.totp-instructions { padding-top: 5px; }
.totp-step { display: flex; gap: 11px; align-items: flex-start; }
.totp-step + .totp-step { margin-top: 25px; }
.totp-step-number { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 11px; font-weight: 700; }
.totp-step h2 { font-size: 15px; line-height: 24px; letter-spacing: -.01em; }
.totp-step p { margin-top: 5px; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
#totp-confirm { margin-left: 35px; }
#totp-confirm label { margin: 13px 0 0; font-size: 11px; gap: 6px; }
.account-shell input.totp-code-input { min-height: 48px; font-size: 22px; letter-spacing: .28em; text-align: center; font-variant-numeric: tabular-nums; padding-left: calc(11px + .28em); }
.account-shell input.totp-code-input:focus { outline: 2px solid var(--red); outline-offset: 2px; border-color: var(--red); }
#totp-confirm .btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 12px; min-height: 44px; padding: 9px 10px; }
#totp-confirm .btn svg { width: 15px; height: 15px; }
.totp-footnote { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: center; gap: 7px; border-top: 1px solid var(--rule-2); padding-top: 15px; margin-top: 20px; color: var(--ink-3); font-size: 10px; line-height: 1.6; }
.totp-footnote svg { width: 13px; height: 13px; margin-top: 1px; }
.totp-cancel { display: block; margin: 12px auto 0; }
#security-settings > button { margin-top: 14px; }
@media(max-width:620px) {
  .login-page .account-shell.narrow:has(#totp-enroll:not([hidden])) { max-width: 430px; padding: 22px; margin-top: 20px; }
  .narrow:has(#totp-enroll:not([hidden])) .login-brand { display: none; }
  .narrow:has(#totp-enroll:not([hidden])) h1 { font-size: 23px; }
  .narrow:has(#totp-enroll:not([hidden])) #intro { font-size: 12px; margin-bottom: 18px; }
  .totp-setup { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .totp-scan-panel { width: 100%; padding: 12px; }
  .totp-scan-caption { display: block; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
  .totp-qr-frame, .totp-qr { width: 184px; }
  .totp-manual { max-width: 260px; margin: 0 auto; }
  .totp-instructions { padding-top: 0; }
  .totp-step + .totp-step { margin-top: 16px; }
  .totp-step:first-child { display: none; }
  .totp-step + .totp-step { margin-top: 0; }
  .totp-step-number { display: none; }
  #totp-confirm { margin-left: 0; }
  .totp-footnote { margin-top: 0; padding-top: 14px; justify-content: flex-start; }
}
@media(max-width:800px) { .account-columns { grid-template-columns: 1fr; }.account-page-heading { align-items: flex-start; }.access-label { display: none; }.account-stats > div { display: grid; gap: 4px; padding: 14px; }.account-masthead nav { gap: 12px; }.account-brand > span { font-size: 12px; }.account-masthead .account-trigger-copy { display: none; } }
@media(max-width:500px) { .account-masthead { padding: 12px 16px; gap: 12px; }.account-brand > span { display: none; }.account-shell { padding: 28px 16px; }.account-page-heading h1 { font-size: 28px; }.account-panel { padding: 20px; }.account-stats { gap: 8px; }.account-stats span { font-size: 10px; }.account-stats strong { font-size: 24px; }.account-shell.narrow { padding: 28px 24px; margin-top: 28px; }.audit-row { grid-template-columns: 1fr; gap: 4px; }.user-heading { flex-wrap: wrap; }.user-role { margin-left: auto; } }

.confirm-admin { width: calc(100% - 32px); max-width: 420px; border: 1px solid var(--rule); border-radius: 14px; padding: 28px; color: var(--ink); }.confirm-admin::backdrop { background: rgba(20,30,24,.4); }.confirm-admin h2 { margin-bottom: 8px; }.confirm-admin p { font-size: 13px; color: var(--ink-2); }.confirm-admin label { display: grid; gap: 8px; margin: 20px 0; font-size: 13px; }.confirm-admin #confirm-admin-error { color: var(--red); margin-bottom: 12px; }

/* Account surfaces share the dashboard's warm, high-contrast system. */
.account-page { min-height: 100vh; background: var(--paper); }
.account-masthead { padding-block: 13px; border: 0; background: #242321; color: #fff; }
.account-brand img { width: 42px; padding: 5px; border-radius: 10px; background: #fff; }
.account-brand small { color: #97938C; }
.account-masthead .dashboard-return { color: #D8D4CC; }
.account-masthead .dashboard-return:hover { color: #fff; }
.account-masthead .btn.secondary { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff; }
.account-shell { padding-top: 48px; }
.account-page-heading { margin-bottom: 32px; }
.account-page-heading h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -.05em; }
.eyebrow { font-size: 9px; letter-spacing: .17em; }
.account-stats { gap: 14px; }
.account-stats > div { min-height: 108px; padding: 22px; border: 0; border-radius: 18px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); }
.account-stats > div:first-child { background: #242321; color: #fff; }
.account-stats > div:first-child span { color: #AAA69F; }
.account-stats strong { font-size: 32px; letter-spacing: -.05em; }
.account-columns { gap: 22px; }
.account-panel { padding: 27px; border: 0; border-radius: 24px; background: rgba(255,255,255,.84); }
.panel-icon { width: 42px; height: 42px; border-radius: 12px; background: #242321; color: #fff; }
.role-note, #recovery-codes { border-radius: 11px; background: #F2F0EB; }
.user-heading .account-avatar { border-radius: 11px; background: #242321; color: #fff; }
.user-actions button { border-radius: 9px; }
.account-shell.narrow { position: relative; overflow: hidden; max-width: 460px; margin-top: 7vh; padding: 38px 40px; border: 0; border-radius: 26px; background: rgba(255,255,255,.88); box-shadow: 0 28px 80px rgba(36,35,33,.11); }
.account-shell.narrow::after { content: ""; position: absolute; top: -105px; right: -102px; width: 180px; height: 180px; border: 28px solid var(--red); border-radius: 50%; pointer-events: none; }
.login-brand img { width: 62px; margin-bottom: 24px; }
.narrow h1 { font-size: 32px; letter-spacing: -.05em; }
.narrow #intro { margin-bottom: 29px; }
.totp-start, .totp-scan-panel { border: 0; border-radius: 16px; background: #F4F2ED; }
.totp-start-icon, .totp-step-number { background: #242321; color: #fff; }
.confirm-admin { border: 0; border-radius: 22px; box-shadow: 0 24px 70px rgba(36,35,33,.18); }
@media(max-width:500px) {
  .account-shell { padding-top: 34px; }
  .account-shell.narrow { width: calc(100% - 24px); padding: 32px 24px; margin-top: 24px; border-radius: 22px; }
  .account-shell.narrow::after { top: -120px; right: -120px; }
}

/* Impeccable account surfaces. */
.account-masthead { padding-block: 16px; border-bottom: 4px solid var(--primary); background: var(--secondary); }
.account-brand img { width: 44px; border: 2px solid var(--ink); border-radius: 4px; }
.account-brand > span { font-size: 16px; }
.account-brand small { color: #D9F7E8; font-size: 12px; }
.account-masthead .dashboard-return { color: #fff; font-size: 14px; }
.account-masthead .btn.secondary { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.account-page-heading h1 { font-size: 32px; text-transform: uppercase; }
.account-page-heading p:not(.eyebrow), .panel-title p, .role-note { font-size: 14px; }
.eyebrow { color: #8F5E00; font-size: 12px; letter-spacing: .12em; }
.access-label { border: 1px solid var(--success); border-radius: 4px; font-size: 12px; }
.account-stats > div { min-height: 112px; padding: 24px; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); box-shadow: var(--shadow); }
.account-stats > div:first-child { background: var(--secondary); }
.account-stats > div:first-child span { color: #D9F7E8; }
.account-stats span { font-size: 12px; }
.account-stats strong { font-family: "JetBrains Mono", monospace; font-size: 32px; }
.account-panel { padding: 24px; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); box-shadow: var(--shadow); }
.panel-icon { width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 4px; background: var(--primary); color: #fff; }
.panel-title h2 { font-size: 20px; text-transform: uppercase; }
.account-shell label:not(.check), .check, .user-scope, .user-heading p, .user-meta { font-size: 12px; }
.role-note, #recovery-codes { border: 1px solid var(--rule); border-radius: 4px; background: #F7EEDC; }
.user-heading .account-avatar { border: 2px solid var(--ink); border-radius: 4px; background: var(--primary); color: #fff; }
.user-role, .user-actions button { border-radius: 4px; }
.user-actions button { border: 1px solid var(--ink); background: var(--paper); font-size: 12px; }
.account-shell.narrow { max-width: 480px; padding: 40px; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); box-shadow: 10px 10px 0 var(--primary); }
.account-shell.narrow::after { border-color: var(--primary); }
.narrow h1 { font-size: 32px; text-transform: uppercase; }
.narrow #intro, .login-help { font-size: 14px; }
.totp-start, .totp-scan-panel { border: 2px solid var(--ink); border-radius: 4px; background: #F7EEDC; }
.totp-start-icon, .totp-step-number { border: 1px solid var(--ink); border-radius: 4px; background: var(--primary); color: #fff; }
.confirm-admin { border: 2px solid var(--ink); border-radius: 4px; box-shadow: 8px 8px 0 var(--primary); }
@media(max-width:500px) {
  .account-shell.narrow { border-radius: 4px; }
}

/* Refined account surfaces: calm hierarchy, neutral type, restrained brand color. */
.account-page { background: var(--paper); }
.account-masthead { padding-block: 13px; border: 0; border-bottom: 1px solid var(--rail-rule); background: var(--rail-bg); color: var(--rail-text); }
.account-brand img { width: 42px; padding: 5px; border: 0; border-radius: 10px; background: #fff; }
.account-brand > span { font-size: 14px; }
.account-brand small { color: var(--rail-muted); font-size: 9px; }
.account-masthead .dashboard-return { color: var(--rail-muted); font-size: 12px; }
.account-masthead .dashboard-return:hover { color: var(--rail-text); }
.account-masthead .btn.secondary { border: 1px solid var(--rail-rule); border-radius: 9px; background: var(--rail-hover); color: var(--rail-text); }
.account-shell { padding-top: 42px; }
.account-page-heading { margin-bottom: 28px; }
.account-page-heading h1 { font-size: clamp(32px, 4vw, 44px); text-transform: none; letter-spacing: -.045em; }
.account-page-heading p:not(.eyebrow), .panel-title p, .role-note { font-size: 12px; }
.eyebrow { color: var(--primary); font-size: 9px; letter-spacing: .14em; }
.access-label { border: 1px solid #CFDCD2; border-radius: 8px; background: var(--basil-soft); color: #3D604C; font-size: 10px; }
.account-stats { gap: 13px; }
.account-stats > div { min-height: 104px; padding: 21px; border: 1px solid var(--rule); border-radius: 15px; background: color-mix(in srgb, var(--panel) 95%, var(--paper)); box-shadow: var(--shadow); }
.account-stats > div:first-child { border-color: #363A35; background: #30342F; color: #fff; }
.account-stats > div:first-child span { color: #C9CEC7; }
.account-stats span { font-size: 11px; }
.account-stats strong { font-family: inherit; font-size: 30px; letter-spacing: -.045em; }
.account-columns { gap: 20px; }
.account-panel { padding: 25px; border: 1px solid var(--rule); border-radius: 18px; background: color-mix(in srgb, var(--panel) 95%, var(--paper)); box-shadow: var(--shadow); }
.panel-icon { width: 40px; height: 40px; border: 0; border-radius: 11px; background: #30342F; color: #fff; }
.panel-title h2 { font-size: 17px; text-transform: none; }
.account-shell label:not(.check), .check, .user-scope, .user-heading p, .user-meta { font-size: 11px; }
.role-note, #recovery-codes { border: 1px solid var(--rule); border-radius: 10px; background: #F4F2EC; }
.user-heading .account-avatar { border: 0; border-radius: 10px; background: #30342F; color: #fff; }
.user-role, .user-actions button { border-radius: 8px; }
.user-actions button { border: 1px solid var(--rule); background: var(--panel); font-size: 11px; }
.account-shell.narrow { max-width: 470px; padding: 38px 40px; border: 1px solid var(--rule); border-radius: 22px; background: color-mix(in srgb, var(--panel) 96%, var(--paper)); box-shadow: 0 24px 70px rgba(36,39,35,.09); }
.account-shell.narrow::after { top: -110px; right: -108px; border-width: 24px; border-color: var(--primary); opacity: .48; }
.narrow h1 { font-size: 31px; text-transform: none; }
.narrow #intro, .login-help { font-size: 12px; }
.totp-start, .totp-scan-panel { border: 1px solid var(--rule); border-radius: 14px; background: #F4F2EC; }
.totp-start-icon, .totp-step-number { border: 0; border-radius: 10px; background: #30342F; color: #fff; }
.confirm-admin { border: 1px solid var(--rule); border-radius: 18px; box-shadow: 0 20px 60px rgba(36,39,35,.16); }
@media(max-width:500px) {
  .account-shell { padding-top: 32px; }
  .account-shell.narrow { width: calc(100% - 24px); padding: 32px 24px; margin-top: 24px; border-radius: 18px; }
}

/* Authenticator codes: six boxes, the familiar one-time-code layout. */
/* Three boxes, a small break, three boxes: the way authenticator apps show a code. */
.otp-boxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 4px repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 356px; margin: 8px auto 0; }
.account-shell .otp-boxes input { width: 100%; min-width: 0; min-height: 56px; padding: 0; border: 1px solid var(--rule); border-radius: 10px; background: #fff; font-size: 24px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.account-shell .otp-boxes input:nth-child(4) { grid-column: 5; }
.account-shell .otp-boxes input:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
@media (max-width: 420px) { .otp-boxes { gap: 6px; } .account-shell .otp-boxes input { min-height: 50px; font-size: 21px; } }
.account-shell .remember-device { min-height: 44px; font-size: 14px; line-height: 1.5; align-items: flex-start; }
.remember-device input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--red); }
#remember-device-help { margin: 0 0 20px; text-align: start; font-size: 14px; color: var(--ink-2); }
.remembered-section { border-top: 1px solid var(--rule); margin-top: 28px; padding-top: 24px; }
.remembered-section h2 { font-size: 19px; margin-bottom: 8px; }
.remembered-section .login-help { font-size: 14px; color: var(--ink-2); text-align: start; margin-top: 0; }
.remembered-devices { list-style: none; padding: 0; margin: 16px 0; }
.remembered-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding: 14px 0; overflow-wrap: anywhere; }
.remembered-devices strong { font-size: 14px; font-weight: 600; }
.remembered-devices p { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.remembered-devices .btn { min-height: 44px; flex: none; }
.devices-empty { font-size: 14px; color: var(--ink-2); }
.remembered-section > .btn { width: 100%; min-height: 44px; }

/* Sign-in and account pages share the dashboard's typeface, palette and light header. */
.account-page {
  --paper: #f8f7f6; --panel: #fff; --ink: #24232a; --ink-2: #514f58; --ink-3: #68656e; --rule: #dad8dc; --rule-2: #eae8eb;
  --red: #c7202b; --red-soft: #faedef; --primary: #c7202b; --primary-strong: #a41b25;
  --rail-bg: #f4f2f0; --rail-text: #24232a; --rail-muted: #625e63; --rail-rule: #e4e0de; --rail-hover: #e9e5e4;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}
.account-page h1, .account-page h2, .account-page h3 { font-family: inherit; letter-spacing: -.025em; }
.account-page .btn { border-color: var(--primary); background: var(--primary); }
.account-page .btn:hover { border-color: var(--primary-strong); background: var(--primary-strong); }
.account-page .btn.secondary { border-color: var(--rule); background: var(--panel); color: var(--ink); }
.account-page .btn.secondary:hover { border-color: #aaa4aa; background: #f5f3f3; }
.account-masthead { border-bottom: 1px solid var(--rail-rule); background: var(--rail-bg); color: var(--rail-text); }
.account-masthead .account-brand, .account-masthead .account-brand > span { color: var(--rail-text); }
.account-masthead .account-brand small { color: var(--rail-muted); }
.account-masthead .btn.secondary, .account-masthead .dashboard-return { border-color: var(--rule); background: var(--panel); color: var(--ink); }
.account-shell.narrow::after { opacity: 1; border-color: var(--red-soft); }

/* Role settings extend the existing JCP form, with native selects and labelled access. */
.account-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.role-permissions { margin: 20px 0; border-block: 1px solid var(--rule); }
.role-permissions > summary { cursor: pointer; padding: 14px 0; font-weight: 600; }
.role-permissions-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.role-permissions-table caption { text-align: left; padding: 8px 0; color: var(--ink-2); }
.role-permissions-table th, .role-permissions-table td { padding: 10px 6px; border-bottom: 1px solid var(--rule); text-align: left; }
.role-permissions-table tbody th { font-weight: 500; }
.role-permissions-table td { white-space: nowrap; color: var(--ink-2); }
#employee-options label small, #employee-link-status { font-size: 12px; line-height: 1.6; font-weight: 400; color: var(--ink-2); }
#employee-options select { min-height: 44px; }
@media (max-width: 800px) { .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
