/* Page styles: account section enhancements. */

/* استایل جدید برای بخش حساب کاربری */
.user-profile {
    background-color: var(--white);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
}

.user-avatar {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-left: 20px;
    background-color: rgba(94, 114, 228, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.user-info {
    flex: 1;
}

.user-info h2 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: #1f2937;
}

.user-info p {
    color: var(--dark-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.account-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.account-name-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.account-name-edit-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 2px;
}

.account-theme-toggle-btn {
    width: 26px;
    height: 26px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.account-wallet-wrap {
    position: relative;
    z-index: 6;
}

.account-wallet-btn {
    min-height: 34px;
    border: 1px solid var(--medium-gray);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-color);
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px 5px 10px;
    cursor: pointer;
    direction: rtl;
    font-weight: 400;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.account-wallet-btn:hover,
.account-wallet-btn:focus {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}

.account-wallet-icon {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    background: var(--light-gray);
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.account-wallet-icon svg {
    margin: 0;
    width: 16px;
    height: 16px;
    color: inherit;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-wallet-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.25;
    text-align: right;
}

.account-wallet-title {
    color: var(--dark-gray);
    font-size: 0.68rem;
    font-weight: 400;
}

.account-wallet-copy strong {
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.account-wallet-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(86vw, 290px);
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--medium-gray);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    direction: rtl;
}

.account-wallet-panel.hidden {
    display: none;
}

.account-wallet-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 14px;
    background: var(--light-gray);
    color: var(--dark-gray);
    font-size: 0.82rem;
    font-weight: 400;
}

.account-wallet-panel-head strong {
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

.account-wallet-action {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 13px;
    background: var(--light-gray);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    margin-top: 8px;
    cursor: pointer;
    font-weight: 400;
    transition: background .2s ease, color .2s ease;
}

.account-wallet-action:hover,
.account-wallet-action:focus {
    background: var(--accent-color);
    color: var(--white);
}

.account-wallet-action i,
.account-wallet-action svg {
    margin: 0;
    width: 18px;
    height: 18px;
    color: inherit;
    font-size: 0.92rem;
    flex: 0 0 auto;
}

.account-wallet-action svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-wallet-transactions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--medium-gray);
}

.wallet-empty-state,
.wallet-loading-state {
    min-height: 54px;
    border-radius: 14px;
    background: var(--light-gray);
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 400;
}

.wallet-empty-state i,
.wallet-loading-state i {
    margin: 0;
    width: auto;
    color: var(--text-color);
    font-size: 0.95rem;
}

.wallet-transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--medium-gray);
    color: var(--text-color);
}

.wallet-transaction-item:last-child {
    border-bottom: 0;
}

.wallet-transaction-item > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.wallet-transaction-item strong {
    font-size: 0.78rem;
    font-weight: 500;
}

.wallet-transaction-item small {
    color: var(--dark-gray);
    font-size: 0.68rem;
}

.wallet-transaction-item > span {
    flex: 0 0 auto;
    color: #16803c;
    font-size: 0.76rem;
    font-weight: 500;
}

.account-name-edit-btn svg {
    width: 14px;
    height: 14px;
}

.account-name-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.account-name-popup-card {
    width: min(92vw, 360px);
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.2);
}

.account-name-popup-card h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.account-name-popup-card input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
}

.account-name-popup-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

.account-name-popup-btn {
    flex: 1;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px;
    cursor: pointer;
    background: #fff;
}

.account-name-popup-save {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.account-options {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.option-item {
    padding: 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--medium-gray);
    cursor: pointer;
    transition: var(--transition);
}

.account-external-option {
    color: inherit;
    text-decoration: none;
}

.option-item:last-child {
    border-bottom: none;
}

/* Store-management empty state */
.manage-stores-empty-state {
    position: relative;
    isolation: isolate;
    width: min(100%, 680px);
    min-height: 390px;
    margin: clamp(22px, 6vh, 64px) auto 24px;
    padding: clamp(28px, 5vw, 50px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(245, 247, 255, 0.64));
    box-shadow:
        0 24px 60px rgba(39, 52, 96, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(24px) saturate(145%);
    backdrop-filter: blur(24px) saturate(145%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: var(--text-color);
    text-align: center;
    direction: rtl;
}

.manage-stores-empty-state::before,
.manage-stores-empty-state::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.manage-stores-empty-state::before {
    inset: -110px -75px auto auto;
    background: rgba(59, 86, 201, 0.13);
}

.manage-stores-empty-state::after {
    inset: auto auto -130px -65px;
    background: rgba(45, 206, 137, 0.12);
}

.manage-stores-empty-art {
    position: relative;
    width: 126px;
    height: 126px;
    border: 1px solid rgba(59, 86, 201, 0.14);
    border-radius: 36px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 240, 255, 0.72));
    box-shadow: 0 18px 40px rgba(59, 86, 201, 0.14), inset 0 1px 0 #fff;
    display: grid;
    place-items: center;
}

.manage-stores-empty-art svg {
    position: relative;
    z-index: 1;
    width: 88px;
    height: 88px;
    overflow: visible;
}

.manage-stores-empty-art path {
    fill: none;
    stroke: #3b56c9;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.manage-stores-empty-art .manage-stores-empty-roof {
    fill: rgba(59, 86, 201, 0.12);
}

.manage-stores-empty-art .manage-stores-empty-spark {
    fill: #2dce89;
    stroke: #2dce89;
    stroke-width: 2;
}

.manage-stores-empty-orbit {
    position: absolute;
    inset: 11px;
    border: 1px dashed rgba(59, 86, 201, 0.2);
    border-radius: 29px;
}

.manage-stores-empty-copy {
    max-width: 500px;
}

.manage-stores-empty-copy h2 {
    margin: 0;
    color: var(--text-color);
    font-size: clamp(1.25rem, 3.6vw, 1.65rem);
    font-weight: 800;
    line-height: 1.5;
}

.manage-stores-empty-copy p {
    margin: 9px 0 0;
    color: var(--dark-gray);
    font-size: clamp(0.88rem, 2.4vw, 1rem);
    line-height: 1.9;
}

.manage-stores-empty-cta {
    min-height: 50px;
    padding: 0 20px;
    border: 1px solid rgba(59, 86, 201, 0.2);
    border-radius: 15px;
    background: linear-gradient(135deg, #3b56c9, #2945bd);
    color: #fff;
    box-shadow: 0 12px 26px rgba(59, 86, 201, 0.26);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, box-shadow 180ms ease;
}

.manage-stores-empty-cta svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.manage-stores-empty-cta:hover {
    color: #fff;
    box-shadow: 0 15px 32px rgba(59, 86, 201, 0.32);
}

.manage-stores-empty-cta:focus-visible {
    outline: 3px solid rgba(59, 86, 201, 0.3);
    outline-offset: 4px;
}

body.theme-dark .manage-stores-empty-state {
    border-color: rgba(255, 255, 255, 0.12);
    background: linear-gradient(145deg, rgba(29, 34, 47, 0.88), rgba(20, 24, 34, 0.7));
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark .manage-stores-empty-art {
    border-color: rgba(132, 151, 255, 0.2);
    background: linear-gradient(145deg, rgba(48, 57, 83, 0.88), rgba(27, 33, 49, 0.8));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.theme-dark .manage-stores-empty-art path {
    stroke: #9aabff;
}

body.theme-dark .manage-stores-empty-art .manage-stores-empty-spark {
    fill: #55dca1;
    stroke: #55dca1;
}

body.theme-dark .manage-stores-empty-copy h2 {
    color: #f4f6ff;
}

body.theme-dark .manage-stores-empty-copy p {
    color: #aeb7c8;
}

@media (max-width: 600px) {
    .manage-stores-empty-state {
        width: 100%;
        min-height: 365px;
        margin-block: 14px 18px;
        padding: 28px 20px;
        border-radius: 22px;
        gap: 19px;
    }

    .manage-stores-empty-art {
        width: 108px;
        height: 108px;
        border-radius: 30px;
    }

    .manage-stores-empty-art svg {
        width: 76px;
        height: 76px;
    }

    .manage-stores-empty-cta {
        width: 100%;
        min-height: 52px;
        padding-inline: 14px;
    }
}

.option-item:hover {
    background-color: var(--light-gray);
}

.option-item i {
    margin-left: 15px;
    font-size: 1.3rem;
    color: var(--primary-color);
    width: 25px;
    text-align: center;
    transition: color 0.3s;
}

.option-item .option-icon {
    margin-left: 15px;
    width: 25px;
    height: 25px;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: color 0.3s, fill 0.3s, stroke 0.3s;
}

/* Account option hover feedback may change color/background, but its artwork
   must never shift, scale, rotate, or otherwise animate. */
#account-section .option-item:hover :is(i, svg, .option-icon),
#account-section .option-item:focus-visible :is(i, svg, .option-icon) {
    transform: none;
    animation: none;
}

@media (max-width: 520px) {
    .account-name-row {
        align-items: flex-start;
        gap: 10px;
    }

    .account-name-actions {
        max-width: 100%;
    }

    .account-wallet-btn {
        min-height: 32px;
        padding-inline: 7px;
    }

    .account-wallet-icon {
        width: 22px;
        height: 22px;
    }

    .account-wallet-title {
        display: none;
    }

    .account-wallet-panel {
        left: 0;
        width: min(88vw, 280px);
    }
}

body.theme-dark #accountWalletBtn.account-wallet-btn {
    background: #1f2937 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

body.theme-dark #accountWalletPanel.account-wallet-panel {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: #f8fafc !important;
    box-shadow: none !important;
}

/* Account dashboard visual system */
#account-section.active-section {
    min-height: 100vh;
    background: #f5f7fb;
}

.account-dashboard-shell {
    --account-bg: #f5f7fb;
    --account-surface: #ffffff;
    --account-surface-muted: #f8f9fd;
    --account-surface-hover: #f7f7ff;
    --account-border: #e4e8f1;
    --account-border-strong: #d7ddea;
    --account-text: #182033;
    --account-text-muted: #647087;
    --account-primary: var(--primary-color, #5e72e4);
    --account-primary-action: #5266d4;
    --account-primary-soft: rgba(94, 114, 228, .1);
    --account-danger: #d8445c;
    --account-danger-soft: rgba(216, 68, 92, .08);
    --account-radius-sm: 8px;
    --account-radius-md: 12px;
    --account-radius-lg: 16px;
    --account-radius-xl: 20px;
    --account-shadow-sm: 0 1px 2px rgba(32, 41, 70, .04), 0 8px 24px rgba(32, 41, 70, .05);
    width: min(calc(100% - 32px), 1380px);
    margin: 20px auto 40px;
    color: var(--account-text);
}

.account-hero,
.account-options,
.account-summary-card,
.account-store-promo {
    border: 1px solid var(--account-border);
    background: var(--account-surface);
    box-shadow: var(--account-shadow-sm);
}

.account-hero {
    min-height: 116px;
    padding: 20px 24px;
    border-radius: var(--account-radius-xl);
}

.account-profile-card {
    min-width: 0;
    min-height: 76px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.account-profile-card .user-avatar {
    width: 68px;
    height: 68px;
    margin-inline-end: 16px;
    margin-inline-start: 0;
    border: 3px solid var(--account-primary-soft);
    background: var(--account-primary-soft);
    color: var(--account-primary);
    font-size: 2.5rem;
    flex: 0 0 auto;
}

.account-profile-card .user-info {
    min-width: 0;
}

#account-section .account-theme-toggle-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--account-border-strong);
    border-radius: var(--account-radius-md);
    background: var(--account-surface-muted);
    color: var(--account-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    cursor: pointer;
    box-shadow: none;
    touch-action: manipulation;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

#account-section .account-theme-toggle-btn svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

#account-section .account-theme-toggle-btn:hover {
    border-color: rgba(94, 114, 228, .42);
    background: var(--account-primary-soft);
    color: var(--account-primary);
}

.account-profile-card .account-name-row {
    min-width: 0;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.account-profile-card .user-info h2 {
    min-width: 0;
    max-width: min(100%, 420px);
    margin: 0;
    overflow: hidden;
    color: var(--account-text);
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    font-weight: 700;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-profile-card .user-info p {
    margin: 4px 0 0;
    color: var(--account-text-muted);
    font-size: .82rem;
    line-height: 1.7;
}

.account-name-actions {
    flex: 0 0 auto;
}

.account-name-edit-btn,
.account-avatar-edit-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--account-border-strong);
    border-radius: 10px;
    background: var(--account-surface);
    color: var(--account-primary);
    box-shadow: 0 2px 8px rgba(32, 41, 70, .08);
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.account-avatar-edit-btn {
    inset-block-start: auto;
    inset-block-end: -4px;
    inset-inline-start: -4px;
    inset-inline-end: auto;
    border-radius: 50%;
}

.account-name-edit-btn svg,
.account-avatar-edit-btn svg {
    width: 14px;
    height: 14px;
}

.account-name-edit-btn:hover,
.account-avatar-edit-btn:hover {
    border-color: var(--account-primary);
    background: var(--account-primary-soft);
}

.account-profile-controls {
    min-width: 0;
    margin-inline-start: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.account-wallet-mount {
    width: auto;
    min-width: 0;
}

.account-wallet-btn {
    width: auto;
    max-width: min(38vw, 320px);
    min-width: 0;
    min-height: 40px;
    border: 1px solid var(--account-border);
    border-radius: 11px;
    background: var(--account-surface-muted);
    box-shadow: none;
    padding: 5px 9px;
    gap: 8px;
    color: var(--account-text);
    font: inherit;
    text-align: start;
    touch-action: manipulation;
}

.account-wallet-btn:hover,
.account-wallet-btn:focus-visible {
    border-color: rgba(94, 114, 228, .42);
    background: var(--account-surface-hover);
    box-shadow: none;
    outline: none;
}

.account-wallet-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--account-primary-soft);
    color: var(--account-primary);
}

.account-wallet-icon svg {
    width: 16px;
    height: 16px;
}

.account-wallet-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.account-wallet-title {
    color: var(--account-text-muted);
    font-size: .7rem;
    font-weight: 500;
}

.account-wallet-copy strong {
    max-width: 100%;
    overflow: hidden;
    color: var(--account-text);
    font-size: .78rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-overflow: ellipsis;
}

.account-option-icon svg,
.account-option-chevron,
.account-stat-icon svg,
.account-store-cta svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.account-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
    margin-block-start: 20px;
}

.account-options {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: var(--account-radius-lg);
    overflow: hidden;
}

#account-section .option-item {
    position: relative;
    width: 100%;
    min-height: 76px;
    padding: 10px 14px;
    border: 1px solid var(--account-border);
    border-radius: var(--account-radius-md);
    background: var(--account-surface-muted);
    color: var(--account-text);
    display: flex;
    align-items: center;
    gap: 12px;
    font: inherit;
    text-align: start;
    text-decoration: none;
    touch-action: manipulation;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

#account-section .option-item:hover,
#account-section .option-item:focus-visible {
    z-index: 1;
    border-color: rgba(94, 114, 228, .38);
    background: var(--account-surface-hover);
    color: var(--account-text);
    outline: none;
}

#account-section .option-item:focus-visible,
#account-section .account-theme-toggle-btn:focus-visible,
.account-wallet-btn:focus-visible,
.account-name-edit-btn:focus-visible,
.account-avatar-edit-btn:focus-visible,
#account-section .account-store-cta:focus-visible {
    outline: 3px solid rgba(94, 114, 228, .24);
    outline-offset: 2px;
}

.account-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--account-primary-soft);
    color: var(--account-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background-color .18s ease, color .18s ease;
}

.account-option-icon svg,
#account-section .account-option-icon .option-icon {
    width: 21px;
    height: 21px;
    margin: 0;
    color: inherit;
}

.account-option-copy {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.account-option-copy strong {
    color: inherit;
    font-size: .93rem;
    font-weight: 700;
    line-height: 1.6;
}

.account-option-copy small {
    overflow: hidden;
    color: var(--account-text-muted);
    font-size: .76rem;
    line-height: 1.65;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#account-section .account-option-chevron {
    width: 18px;
    height: 18px;
    margin: 0;
    color: #8d98ac;
    flex: 0 0 auto;
    transition: color .18s ease;
}

#account-section .option-item:hover .account-option-chevron,
#account-section .option-item:focus-visible .account-option-chevron {
    color: var(--account-primary);
}

#account-section :is(
    .option-item,
    .account-wallet-btn,
    .account-wallet-action,
    .account-theme-toggle-btn,
    .account-name-edit-btn,
    .account-avatar-edit-btn,
    .account-store-cta
):is(:hover, :active, :focus-visible) {
    transform: none !important;
    animation: none !important;
}

#account-section .account-logout-option {
    margin-block-start: 4px;
    border-color: rgba(216, 68, 92, .18);
    background: var(--account-danger-soft);
    color: var(--account-danger);
}

#account-section .account-logout-option .account-option-icon {
    background: var(--account-danger-soft);
    color: var(--account-danger);
}

#account-section .account-logout-option:hover,
#account-section .account-logout-option:focus-visible {
    border-color: rgba(216, 68, 92, .34);
    background: rgba(216, 68, 92, .1);
    color: var(--account-danger);
}

.account-side-column {
    display: grid;
    gap: 20px;
}

#account-section .account-summary-card,
#account-section .account-store-promo {
    border-radius: var(--account-radius-lg);
}

.account-summary-inner,
.account-store-promo-inner {
    width: 100%;
    min-width: 0;
    margin-inline: 0;
    padding-inline: 26px;
    box-sizing: border-box;
}

.account-summary-card h2,
.account-store-promo h2 {
    margin: 0;
    color: var(--account-text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}

.account-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-block-start: 20px;
}

.account-summary-stat {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-inline: 2px;
    text-align: center;
}

.account-summary-stat + .account-summary-stat {
    border-inline-start: 1px solid var(--account-border);
}

.account-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--account-primary-soft);
    color: var(--account-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.account-stat-icon.is-support {
    background: rgba(13, 159, 120, .1);
    color: #0a8b69;
}

.account-stat-icon.is-favorite {
    background: rgba(216, 68, 92, .09);
    color: var(--account-danger);
}

.account-stat-icon svg {
    width: 19px;
    height: 19px;
}

.account-summary-stat strong {
    color: var(--account-text);
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.4;
}

.account-summary-stat small {
    color: var(--account-text-muted);
    font-size: .68rem;
    line-height: 1.55;
}

.account-store-promo-inner {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    background:
        linear-gradient(145deg, rgba(94, 114, 228, .07), transparent 58%),
        var(--account-surface);
}

.account-promo-art {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.account-promo-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.account-store-promo p {
    margin: 4px 0 0;
    color: var(--account-text-muted);
    font-size: .74rem;
    line-height: 1.85;
    text-align: start;
}

#account-section .account-store-cta {
    grid-column: 1 / -1;
    min-height: 46px;
    margin-block-start: 4px;
    padding-inline: 16px;
    border: 1px solid #dc2626;
    border-radius: var(--account-radius-md);
    background: #dc2626;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
    font-weight: 700;
    touch-action: manipulation;
    transition: background-color .18s ease, border-color .18s ease;
}

#account-section .account-store-cta:hover {
    border-color: #b91c1c;
    background: #b91c1c;
}

#account-section .account-store-cta:active {
    border-color: #991b1b;
    background: #991b1b;
}

#account-section .account-store-cta:focus-visible {
    outline-color: rgba(220, 38, 38, .28);
}

#account-section .account-store-cta svg {
    width: 18px;
    height: 18px;
}

body.theme-dark #account-section.active-section {
    background: #0b1120;
}

body.theme-dark .account-dashboard-shell {
    --account-bg: #0b1120;
    --account-surface: #111827;
    --account-surface-muted: #182235;
    --account-surface-hover: #1b2740;
    --account-border: rgba(148, 163, 184, .16);
    --account-border-strong: rgba(148, 163, 184, .26);
    --account-text: #f8fafc;
    --account-text-muted: #a7b3c6;
    --account-primary: #8e9cff;
    --account-primary-action: #596bd9;
    --account-primary-soft: rgba(126, 142, 255, .13);
    --account-danger: #fb7185;
    --account-danger-soft: rgba(251, 113, 133, .08);
    --account-shadow-sm: 0 1px 2px rgba(0, 0, 0, .14);
}

body.theme-dark #account-section .account-hero,
body.theme-dark #account-section .account-options,
body.theme-dark #account-section .account-summary-card,
body.theme-dark #account-section .account-store-promo {
    border-color: var(--account-border) !important;
    background-color: var(--account-surface) !important;
    box-shadow: var(--account-shadow-sm) !important;
}

body.theme-dark #account-section .account-profile-card {
    background: transparent !important;
}

body.theme-dark #account-section .account-wallet-btn {
    border-color: var(--account-border) !important;
    background: var(--account-surface-muted) !important;
    color: var(--account-text) !important;
    box-shadow: none !important;
}

body.theme-dark #account-section .account-wallet-btn:hover,
body.theme-dark #account-section .account-wallet-btn:focus-visible,
body.theme-dark #account-section .option-item:hover,
body.theme-dark #account-section .option-item:focus-visible {
    border-color: rgba(142, 156, 255, .42) !important;
    background: var(--account-surface-hover) !important;
}

body.theme-dark #account-section .account-wallet-icon {
    background: var(--account-primary-soft) !important;
    color: var(--account-primary) !important;
}

body.theme-dark #account-section .account-wallet-title {
    color: var(--account-text-muted) !important;
}

body.theme-dark #account-section .account-wallet-copy strong {
    color: var(--account-text) !important;
}

body.theme-dark #account-section .account-theme-toggle-btn {
    border-color: var(--account-border-strong);
    background: var(--account-surface-muted);
    color: var(--account-text-muted);
}

body.theme-dark #account-section .account-theme-toggle-btn:hover {
    border-color: rgba(142, 156, 255, .42);
    background: var(--account-primary-soft);
    color: var(--account-primary);
}

body.theme-dark #account-section .account-name-edit-btn,
body.theme-dark #account-section .account-avatar-edit-btn {
    border-color: var(--account-border-strong) !important;
    background: var(--account-surface-muted) !important;
    color: var(--account-primary) !important;
}

body.theme-dark #account-section .option-item {
    border-color: var(--account-border) !important;
    background: var(--account-surface-muted) !important;
    color: var(--account-text) !important;
}

body.theme-dark #account-section .account-logout-option {
    border-color: rgba(251, 113, 133, .2) !important;
    background: var(--account-danger-soft) !important;
    color: var(--account-danger) !important;
}

body.theme-dark #account-section .account-store-promo {
    background:
        linear-gradient(145deg, rgba(126, 142, 255, .08), transparent 58%),
        var(--account-surface) !important;
}

@media (max-width: 1100px) {
    .account-hero {
        padding-inline: 20px;
    }

    .account-dashboard-grid {
        grid-template-columns: minmax(0, 1fr) 316px;
    }
}

@media (max-width: 768px) {
    .account-dashboard-shell {
        width: min(calc(100% - 24px), 560px);
        margin-block: 12px 88px;
    }

    .account-hero {
        min-height: 0;
        padding: 16px;
        border-radius: var(--account-radius-lg);
    }

    .account-profile-card {
        min-height: 64px;
        flex-wrap: wrap;
    }

    .account-profile-card .user-avatar {
        width: 60px;
        height: 60px;
        margin-inline-end: 12px;
        font-size: 2.2rem;
    }

    .account-profile-controls {
        width: 100%;
        margin-block-start: 12px;
        margin-inline-start: 0;
        padding-block-start: 10px;
        border-block-start: 1px solid var(--account-border);
        justify-content: space-between;
    }

    .account-wallet-btn {
        max-width: calc(100vw - 112px);
        min-height: 38px;
        padding: 5px 8px;
        border-radius: 10px;
        display: flex;
        gap: 7px;
    }

    .account-wallet-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .account-wallet-icon svg {
        width: 15px;
        height: 15px;
    }

    .account-wallet-title {
        font-size: .65rem;
    }

    .account-wallet-copy strong {
        font-size: .72rem;
    }

    .account-dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin-block-start: 16px;
    }

    .account-side-column {
        display: contents;
    }

    .account-summary-card {
        order: 1;
        width: 100%;
    }

    .account-store-promo {
        order: 2;
        width: 100%;
    }

    .account-options {
        order: 3;
        width: 100%;
        gap: 8px;
        padding: 10px;
    }

    #account-section .option-item {
        min-height: 68px;
        padding: 8px 12px;
    }

    .account-option-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 430px) {
    .account-dashboard-shell {
        width: calc(100% - 20px);
    }

    .account-hero {
        padding: 14px;
    }

    .account-profile-card .user-avatar {
        width: 56px;
        height: 56px;
        margin-inline-end: 10px;
    }

    .account-profile-card .user-info h2 {
        font-size: .95rem;
    }

    .account-profile-card .user-info p {
        font-size: .72rem;
    }

    .account-name-edit-btn,
    .account-avatar-edit-btn {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
    }

    #account-section .account-theme-toggle-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin: 0;
    }

    .account-summary-inner,
    .account-store-promo-inner {
        padding-inline: 20px;
    }

    .account-summary-stats {
        margin-block-start: 16px;
    }

    .account-summary-stat small {
        font-size: .63rem;
    }

    .account-stat-icon {
        width: 36px;
        height: 36px;
    }

    .account-store-promo-inner {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .account-promo-art {
        width: 52px;
        height: 52px;
    }

    .account-option-copy strong {
        font-size: .88rem;
    }

    .account-option-copy small {
        font-size: .7rem;
    }
}

@media (max-width: 350px) {
    .account-wallet-btn {
        max-width: calc(100vw - 100px);
        min-height: 36px;
        padding-inline: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #account-section *, #account-section *::before, #account-section *::after { transition-duration: .01ms !important; }
}

body.theme-dark #accountWalletBtn .account-wallet-copy strong,
body.theme-dark #accountWalletPanel .account-wallet-panel-head strong {
    color: #ffffff !important;
}
