.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; }
