/* Shared profile and account state presentation for desktop and touch templates. */
.account-profile-summary { box-sizing: border-box; margin-bottom: 20px; padding: 20px; border: 1px solid var(--dm-line, var(--dz-BOR-ed, #d8e0e8)); border-radius: 10px; background: var(--dm-surface, var(--dz-BG-0, #fff)); color: var(--dm-text, var(--dz-FC-333, #333)); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.account-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.account-profile-summary img.account-profile-avatar { flex: none; width: 72px; height: 72px; border-radius: 12px; object-fit: contain; }
.account-profile-name { flex: 1 1 180px; min-width: 0; }
.account-profile-name h1 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.35; }
.account-profile-summary .account-profile-meta { margin-top: 6px; color: var(--dm-muted, var(--dz-FC-666, #5d6875)); font-size: 13px; }
.account-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.account-profile-actions a, .account-credit-link { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--dm-line, var(--dz-BOR-ed, #c5d2df)); border-radius: 6px; font-size: 14px; line-height: 22px; }
.account-profile-actions .account-profile-edit { color: var(--dm-primary-text, var(--dz-FC-fff, #fff)); background: var(--dm-primary, var(--dz-BG-color, #286bb2)); border-color: var(--dm-primary, var(--dz-BG-color, #286bb2)); }
.account-profile-bio { margin-top: 16px; }
.account-profile-bio .profile-label { margin-bottom: 4px; color: var(--dm-muted, var(--dz-FC-666, #5d6875)); font-size: 13px; }
.account-profile-bio .profile-value { color: var(--dm-text, var(--dz-FC-333, #444)); }
.account-profile-summary img:not(.account-profile-avatar) { max-width: 100%; height: auto; }
.account-profile-stats { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; }
.account-profile-stats:empty { display: none; }
.account-profile-stats a { display: inline-flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 4px 0; }
.account-profile-stats strong { font-size: 22px; font-weight: 600; }
.account-profile-stats span { color: var(--dm-muted, var(--dz-FC-666, #5d6875)); font-size: 13px; }
.account-profile-summary a:focus-visible, .account-credit-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.account-layout .u_profile { font-size: 14px; line-height: 1.8; }
.account-layout .u_profile h2 { margin-bottom: 12px; font-size: 18px; font-weight: 600; }
.account-layout .u_profile .av-profile-entry { margin-bottom: 20px; font-size: 13px; }
.account-layout #uhd.account-profile-menu { padding-top: 0; }
.account-layout #uhd.account-profile-menu .h { padding: 12px; }
.account-layout #uhd.account-profile-menu > .tb { padding-left: 12px !important; }
.account-layout #uhd.account-profile-menu .mn { float: none; margin: 0; padding: 8px 12px; }

.userinfo.account-profile { padding-top: 12px; }
.userinfo.account-profile .account-profile-summary { margin: 0 15px 12px; padding: 16px; background: var(--dm-surface, var(--dz-BG-0)); color: var(--dm-text, var(--dz-FC-333)); border-color: var(--dm-line, var(--dz-BOR-ed)); }
.userinfo.account-profile .account-profile-heading { align-items: center; gap: 12px; }
.userinfo.account-profile .account-profile-avatar { width: 64px; height: 64px; }
.userinfo.account-profile .account-profile-name { flex: 1 1 140px; }
.userinfo.account-profile .account-profile-name h1 { font-size: 20px; }
.userinfo.account-profile .account-profile-actions { flex-basis: 100%; }
.userinfo.account-profile .account-profile-actions a { flex: 1; }
.userinfo.account-profile .account-profile-actions .account-profile-edit { background: var(--dm-primary, var(--dz-BG-color)); border-color: var(--dm-primary, var(--dz-BG-color)); color: var(--dm-primary-text, var(--dz-FC-fff)); }
.userinfo.account-profile > .av-profile-entry { margin: 0 15px 12px; padding: 0; font-size: 13px; }
.userinfo.account-profile .user_box { margin: 0 15px 12px; padding: 12px; }
.userinfo.account-profile .user_box ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.userinfo.account-profile .user_box li { float: none; width: auto; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.userinfo.account-profile .user_box .account-credit-link { display: flex; margin-top: 12px; color: var(--dm-accent, var(--dz-FC-color)); border-color: var(--dm-line, var(--dz-BOR-ed)); }

.account-empty-state { max-width: 740px; margin: 16px 0; padding: 24px; border: 1px solid var(--dm-line, var(--dz-BOR-ed, #d8e0e8)); border-radius: 10px; background: var(--dm-soft, var(--dz-BG-5, #f7f9fb)); line-height: 1.8; }
.account-empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.account-empty-state p { margin-bottom: 12px; color: var(--dm-muted, var(--dz-FC-666, #5d6875)); font-size: 14px; }
.account-empty-state > a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dm-accent, var(--dz-FC-color, #286bb2)); text-decoration: underline; }
.settings-content .account-empty-state { margin: 0; padding: 16px; }

.account-settings .tb .account-group-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.account-group-label { padding: 0 6px; font-size: 13px; color: var(--dm-muted, var(--dz-FC-666, #5d6875)); }
.account-group-controls button { box-sizing: border-box; min-height: 44px; max-width: 100%; padding: 9px 24px 9px 12px; border: 1px solid var(--dm-line, var(--dz-BOR-ed, #c5d2df)); border-radius: 6px; background-color: var(--dm-surface, var(--dz-BG-0, #fff)); font: inherit; line-height: 24px; cursor: pointer; }
.account-group-controls button.a { font-weight: 600; color: var(--dm-accent, var(--dz-FC-color, #336699)); background-color: var(--dm-active, var(--dz-BG-5, #f1f5f9)); }
.account-group-popup { box-sizing: border-box; max-width: calc(100vw - 24px); max-height: 65vh; overflow: auto; }
.account-group-popup a { box-sizing: border-box; min-height: 44px; padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; }
.account-group-popup a:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }

.account-state { box-sizing: border-box; margin: 10px 0; padding: 12px 14px; border: 1px solid; border-radius: 8px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.account-state.account-state-success, .account-settings .tfm .account-state-success, .settings-content .account-state.account-state-success { background: #eff9f3; border-color: #bbdfca; color: #24653f; }
.account-state.account-state-pending, .account-settings .tfm .account-state-pending, .settings-content .account-state.account-state-pending { background: #fff8e8; border-color: #e8d39f; color: #805c13; }
.account-state.account-state-danger, .account-settings .tfm .account-state-danger, .settings-content .account-state.account-state-danger { background: #fff2f2; border-color: #e9bfc3; color: #a52d37; }
.account-state .xi1, .account-state .fc-v, .account-state .fc-i { color: inherit; }
.account-state a { text-decoration: underline; }
.account-security-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.account-settings .account-security-actions .pn { margin: 0; }
.account-settings .pn.account-secondary, .settings-content .totp_settings .pn.account-secondary { border: 1px solid var(--dm-field-line, var(--dz-BOR-ccc, #9aaec4)); background: var(--dm-surface, var(--dz-BG-0, #fff)); color: var(--dm-text, var(--dz-FC-333, #334e69)); }
.account-settings .pn.account-danger, .settings-content .totp_settings .pn.account-danger { border: 1px solid #cd8c94; background: #fff2f2; color: #a52d37; }
.account-settings .pn.account-danger:hover, .settings-content .totp_settings .pn.account-danger:hover { background: #fce4e6; }
.settings-content .account-security-actions .pn { flex: 1 1 200px; width: auto; margin: 0; }
@media (max-width: 700px) {
  .account-profile-summary { padding: 14px; }
  .account-profile-actions { flex-basis: 100%; }
  .account-profile-actions a { flex: 1; }
  .account-settings .tb .account-group-controls { margin-left: 0; }
  .account-group-label { flex-basis: 100%; }
}
/* Order status and payment actions remain explicit on small screens. */
.account-orders { padding: 12px; }
.account-order { margin-bottom: 12px; padding: 16px; border: 1px solid var(--dm-line, var(--dz-BOR-ed, #d8e0e8)); border-radius: 10px; background: var(--dm-surface, var(--dz-BG-0, #fff)); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.account-order .order-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.account-order .order-amount { font-size: 18px; font-weight: 600; }
.account-order .order-state { display: inline-block; margin: 10px 0; padding: 3px 10px; border-radius: 5px; background: var(--dm-soft, var(--dz-BG-5, #f0f3f6)); color: var(--dm-muted, var(--dz-FC-666, #56616b)); }
.account-order .order-state-0 { background: #fff1d9; color: #8a4c00; }
.account-order .order-state-1 { background: #e6f3e8; color: #246332; }
.account-order h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.account-order .order-description, .account-order time { display: block; color: var(--dm-muted, var(--dz-FC-666, #666)); }
.account-order time { margin-top: 12px; font-size: 13px; }
.account-order .order-pay { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; margin-top: 12px; padding: 8px 16px; border-radius: 6px; color: var(--dm-primary-text, var(--dz-FC-fff, #fff)); background: var(--dm-primary, var(--dz-BG-color, #2b7acd)); }
.account-order .order-pay:focus-visible { outline: 2px solid var(--dm-accent, var(--dz-FC-color, #2b7acd)); outline-offset: 3px; }
.account-order-empty { padding: 40px 16px; background: var(--dm-surface, var(--dz-BG-0, #fff)); color: var(--dm-muted, var(--dz-FC-666, #666)); text-align: center; }
