/* Wallet top-up CTA: scoped to avoid changing other theme buttons. */
.uh-wallet .uh-wallet-form > button[type="submit"] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    background: var(--uh-primary, #4f46e5);
    background: linear-gradient(135deg, var(--uh-primary, #4f46e5), #3730a3);
    color: #fff;
    box-shadow: 0 5px 14px rgba(79, 70, 229, .24);
    font: inherit;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.uh-wallet .uh-wallet-form > button[type="submit"]::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    font-size: 20px;
    line-height: 1;
}
.uh-wallet .uh-wallet-form > button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, .32);
    filter: brightness(1.08);
}
.uh-wallet .uh-wallet-form > button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}
.uh-wallet .uh-wallet-form > button[type="submit"]:focus-visible {
    outline: 3px solid var(--uh-accent, #0ea5e9);
    outline-offset: 3px;
}
.uh-wallet .uh-wallet-form > button[type="submit"]:disabled {
    opacity: .65;
    cursor: wait;
    box-shadow: none;
}
@media (max-width: 600px) {
    .uh-wallet .uh-wallet-form > button[type="submit"] {
        width: 100%;
        margin-top: 12px;
        box-sizing: border-box;
    }
}
/* Owner-scoped order explorer: usable without scripts and on narrow screens. */
.uh-dashboard .uh-order-filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:20px 0;padding:16px;border:1px solid var(--uh-line);border-radius:14px;background:var(--uh-bg)}
.uh-dashboard .uh-order-filters label{display:flex;flex:1 1 140px;flex-direction:column;gap:6px;min-width:0;color:var(--uh-ink)}
.uh-dashboard .uh-order-filters input,.uh-dashboard .uh-order-filters select{width:100%;min-width:0;min-height:44px;box-sizing:border-box;background:var(--uh-surface,#fff);color:var(--uh-ink);border:1px solid var(--uh-line);border-radius:9px;padding:8px}
.uh-dashboard .uh-order-explorer .uh-order-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.uh-dashboard .uh-order-primary{display:flex;flex:1 1 150px;flex-direction:column;gap:6px;min-width:0;min-height:44px;text-decoration:none;color:var(--uh-ink);overflow-wrap:anywhere}
.uh-dashboard .uh-order-actions,.uh-dashboard .uh-order-pagination{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.uh-dashboard .uh-order-actions a,.uh-dashboard .uh-order-pagination a{display:inline-flex;min-height:44px;align-items:center}
.uh-dashboard .uh-order-pagination{justify-content:center;margin-top:20px}
.uh-dashboard .uh-order-primary:focus-visible,.uh-dashboard .uh-order-filters a:focus-visible,.uh-dashboard .uh-order-pagination a:focus-visible{outline:3px solid var(--uh-accent);outline-offset:3px;border-radius:6px}
@media(max-width:600px){.uh-dashboard .uh-order-filters{padding:12px}.uh-dashboard .uh-order-filters label{flex-basis:100%}.uh-dashboard .uh-order-actions{flex-basis:100%}.uh-dashboard .uh-order-explorer .uh-section-heading{flex-wrap:wrap;gap:8px}}

.uh-dashboard .uh-notification-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-block: 18px;
    padding: 14px;
    border: 1px solid var(--uh-line);
    border-radius: 14px;
    background: var(--uh-bg);
}
.uh-dashboard .uh-notification-filters label { display: flex; flex: 1 1 160px; flex-direction: column; gap: 6px; min-width: 0; }
.uh-dashboard .uh-notification-filters select {
    width: 100%; min-width: 0; min-height: 44px; padding: 8px;
    color: var(--uh-ink); background: var(--uh-surface, #fff);
    border: 1px solid var(--uh-line); border-radius: 9px;
}
.uh-dashboard .uh-notification-center .uh-section-heading { flex-wrap: wrap; gap: 12px; }
.uh-dashboard .uh-notification-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.uh-dashboard .uh-notification-pagination a { display: inline-flex; min-height: 44px; align-items: center; }
.uh-dashboard .uh-session-list { display: grid; gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.uh-dashboard .uh-session-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--uh-line); border-radius: 12px; overflow-wrap: anywhere; background: var(--uh-bg); color: var(--uh-ink); }
.uh-dashboard .uh-session-current { display: inline-block; margin-inline-start: 8px; padding: 3px 8px; border: 1px solid currentColor; border-radius: 8px; color: var(--uh-primary); font-size: 12px; }
.uh-dashboard .uh-account-security .uh-button,
.uh-dashboard .uh-notification-center .uh-button { min-height: 44px; white-space: normal; }
.uh-dashboard .uh-notification-filters a:focus-visible,
.uh-dashboard .uh-notification-pagination a:focus-visible,
.uh-dashboard .uh-account-security button:focus-visible { outline: 3px solid var(--uh-accent); outline-offset: 3px; }
.uh-dashboard .uh-account-security button[hidden],
.uh-dashboard .uh-notification-center button[hidden] { display: none !important; }
@media (max-width: 600px) {
    .uh-dashboard .uh-notification-filters label { flex-basis: 100%; }
    .uh-dashboard .uh-mark-all-notifications,
    .uh-dashboard .uh-end-other-sessions { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .uh-wallet .uh-wallet-form > button[type="submit"] {
        transition: none;
        transform: none !important;
    }
}

.uh-dashboard {
    color: var(--uh-ink);
    color-scheme: light;
}

/* Strict inverse text contrast for the two dashboard themes. */
.uh-dashboard[data-uh-theme="light"] {
    --uh-ink: #000;
    --uh-muted: #000;
    --uh-bg: #fff;
    --uh-surface: #fff;
    --uh-notification-surface: #fff;
    --uh-notification-unread: #eef2ff;
    --uh-notification-border: #e2e8f0;
    --uh-notification-unread-border: #a5b4fc;
    --uh-notification-text: #111827;
    --uh-notification-muted: #475569;
    --uh-notification-link: #4338ca;
    --uh-notification-read: #15803d;
    --uh-notification-icon-bg: #e0e7ff;
    --uh-notification-icon: #4338ca;
    background: #fff;
    color: #000;
}

.uh-dashboard[data-uh-theme="light"] .uh-card,
.uh-dashboard[data-uh-theme="light"] .uh-welcome,
.uh-dashboard[data-uh-theme="light"] .uh-referral-card,
.uh-dashboard[data-uh-theme="light"] .uh-notifications-card,
.uh-dashboard[data-uh-theme="light"] .uh-browser-push,
.uh-dashboard[data-uh-theme="light"] .uh-points-redeem-card,
.uh-dashboard[data-uh-theme="light"] .uh-benefits-card,
.uh-dashboard[data-uh-theme="light"] .uh-onboarding-card,
.uh-dashboard[data-uh-theme="light"] .uh-cashback-banner,
.uh-dashboard[data-uh-theme="light"] .uh-native-form,
.uh-dashboard[data-uh-theme="light"] .uh-address-card,
.uh-dashboard[data-uh-theme="light"] .uh-native-product,
.uh-dashboard[data-uh-theme="light"] .woocommerce-MyAccount-content,
.uh-dashboard[data-uh-theme="light"] .woocommerce form,
.uh-dashboard[data-uh-theme="light"] .woocommerce table.shop_table {
    background: #fff;
    color: #000;
}

.uh-dashboard[data-uh-theme="light"] :where(h1,h2,h3,h4,h5,h6,p,label,small,strong,li,th,td),
.uh-dashboard[data-uh-theme="light"] .uh-muted,
.uh-dashboard[data-uh-theme="light"] .uh-empty,
.uh-dashboard[data-uh-theme="light"] .uh-dashboard-nav a,
.uh-dashboard[data-uh-theme="light"] .uh-section-heading a,
.uh-dashboard[data-uh-theme="light"] a:not(.uh-button):not(.button),
.uh-dashboard[data-uh-theme="light"] input,
.uh-dashboard[data-uh-theme="light"] select,
.uh-dashboard[data-uh-theme="light"] textarea {
    color: #000;
}

.uh-dashboard[data-uh-theme="light"] input,
.uh-dashboard[data-uh-theme="light"] select,
.uh-dashboard[data-uh-theme="light"] textarea,
.uh-dashboard[data-uh-theme="light"] .uh-product-tool {
    background: #fff;
}

.uh-dashboard[data-uh-theme="light"] .uh-button,
.uh-dashboard[data-uh-theme="light"] .uh-button *,
.uh-dashboard[data-uh-theme="light"] button[type="submit"] {
    color: #fff;
}

.uh-dashboard,
.uh-dashboard .uh-card,
.uh-dashboard input,
.uh-dashboard select,
.uh-dashboard textarea,
.uh-dashboard button,
.uh-dashboard table,
.uh-dashboard th,
.uh-dashboard td {
    transition: background-color .22s ease, border-color .22s ease, color .22s ease, box-shadow .22s ease;
}

.uh-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: 1px solid var(--uh-line);
    border-radius: 11px;
    padding: 10px 12px;
    background: var(--uh-bg);
    color: var(--uh-ink);
    font: inherit;
    cursor: pointer;
}

.uh-theme-toggle:hover {
    border-color: var(--uh-primary);
    color: var(--uh-primary);
}

.uh-theme-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--uh-accent) 42%, transparent);
    outline-offset: 2px;
}

.uh-dashboard[data-uh-theme="dark"] {
    --uh-ink: #fff;
    --uh-muted: #fff;
    --uh-line: #334155;
    --uh-bg: #000;
    --uh-surface: #000;
    --uh-notification-surface: #0f172a;
    --uh-notification-unread: #172554;
    --uh-notification-border: #334155;
    --uh-notification-unread-border: #6366f1;
    --uh-notification-text: #f8fafc;
    --uh-notification-muted: #cbd5e1;
    --uh-notification-link: #c7d2fe;
    --uh-notification-read: #86efac;
    --uh-notification-icon-bg: #312e81;
    --uh-notification-icon: #e0e7ff;
    background: #000;
    color: #fff;
    color-scheme: dark;
}

.uh-dashboard[data-uh-theme="dark"] .uh-card,
.uh-dashboard[data-uh-theme="dark"] .woocommerce-MyAccount-content,
.uh-dashboard[data-uh-theme="dark"] .woocommerce table.shop_table,
.uh-dashboard[data-uh-theme="dark"] .woocommerce form {
    background: #000;
    border-color: var(--uh-line);
    color: #fff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
}

.uh-dashboard[data-uh-theme="dark"] :where(h1,h2,h3,h4,h5,h6,p,label,small,strong,li,th,td),
.uh-dashboard[data-uh-theme="dark"] .uh-muted,
.uh-dashboard[data-uh-theme="dark"] .uh-empty,
.uh-dashboard[data-uh-theme="dark"] .uh-dashboard-nav a,
.uh-dashboard[data-uh-theme="dark"] .uh-section-heading a,
.uh-dashboard[data-uh-theme="dark"] a:not(.uh-button):not(.button),
.uh-dashboard[data-uh-theme="dark"] input,
.uh-dashboard[data-uh-theme="dark"] select,
.uh-dashboard[data-uh-theme="dark"] textarea {
    color: #fff;
}

.uh-dashboard[data-uh-theme="dark"] .uh-dashboard-nav a,
.uh-dashboard[data-uh-theme="dark"] .uh-onboarding-list a,
.uh-dashboard[data-uh-theme="dark"] .uh-section-heading a,
.uh-dashboard[data-uh-theme="dark"] a:not(.uh-button):not(.button) {
    color: #cbd5e1;
}

.uh-dashboard[data-uh-theme="dark"] .uh-dashboard-nav a.active,
.uh-dashboard[data-uh-theme="dark"] .uh-dashboard-nav a:hover {
    background: #312e81;
    color: #eef2ff;
}

.uh-dashboard[data-uh-theme="dark"] .uh-dashboard-nav a em {
    background: #3730a3;
    color: #eef2ff;
}

.uh-dashboard[data-uh-theme="dark"] .uh-welcome,
.uh-dashboard[data-uh-theme="dark"] .uh-referral-card,
.uh-dashboard[data-uh-theme="dark"] .uh-onboarding-card,
.uh-dashboard[data-uh-theme="dark"] .uh-notifications-card,
.uh-dashboard[data-uh-theme="dark"] .uh-browser-push,
.uh-dashboard[data-uh-theme="dark"] .uh-points-redeem-card,
.uh-dashboard[data-uh-theme="dark"] .uh-benefits-card,
.uh-dashboard[data-uh-theme="dark"] .uh-cashback-banner {
    background: #000;
}

.uh-dashboard[data-uh-theme="dark"] .uh-browser-push {
    background: #000;
    border-color: #334155;
}

.uh-dashboard[data-uh-theme="dark"] .uh-announcement {
    background: #082f49;
    color: #bae6fd;
}

.uh-dashboard[data-uh-theme="dark"] .uh-onboarding-list a,
.uh-dashboard[data-uh-theme="dark"] input,
.uh-dashboard[data-uh-theme="dark"] select,
.uh-dashboard[data-uh-theme="dark"] textarea,
.uh-dashboard[data-uh-theme="dark"] .uh-profile-form input,
.uh-dashboard[data-uh-theme="dark"] .uh-wallet-withdraw-form input,
.uh-dashboard[data-uh-theme="dark"] .uh-wallet-withdraw-form select {
    background: #0f172a;
    border-color: #475569;
    color: var(--uh-ink);
}

.uh-dashboard[data-uh-theme="dark"] input::placeholder,
.uh-dashboard[data-uh-theme="dark"] textarea::placeholder {
    color: #64748b;
}

.uh-dashboard[data-uh-theme="dark"] input[readonly],
.uh-dashboard[data-uh-theme="dark"] .uh-profile-form input[readonly] {
    background: #1e293b;
    color: var(--uh-muted);
}

.uh-dashboard[data-uh-theme="dark"] .uh-theme-toggle {
    background: #1e293b;
    border-color: #475569;
    color: #f8fafc;
}

.uh-dashboard[data-uh-theme="dark"] .uh-progress,
.uh-dashboard[data-uh-theme="dark"] .uh-status,
.uh-dashboard[data-uh-theme="dark"] .woocommerce table.shop_table th,
.uh-dashboard[data-uh-theme="dark"] .woocommerce table.shop_table td {
    background-color: #1e293b;
    border-color: #334155;
    color: var(--uh-ink);
}

.uh-dashboard[data-uh-theme="dark"] .uh-wallet-history > div,
.uh-dashboard[data-uh-theme="dark"] .uh-wallet-withdrawal-row,
.uh-dashboard[data-uh-theme="dark"] .uh-order-row {
    border-color: #334155;
}

.uh-dashboard[data-uh-theme] .uh-notifications-card {
    background: var(--uh-notification-surface);
    border-color: var(--uh-notification-border);
}

.uh-dashboard[data-uh-theme] .uh-notification-item,
.uh-dashboard[data-uh-theme] .uh-notification-item.is-unread {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    min-width: 0;
    background: var(--uh-notification-surface);
    border-color: var(--uh-notification-border);
    color: var(--uh-notification-text);
}

.uh-dashboard[data-uh-theme] .uh-notification-item.is-unread {
    background: var(--uh-notification-unread);
    border-color: var(--uh-notification-unread-border);
    box-shadow: inset 3px 0 0 var(--uh-primary, #4f46e5);
}

.uh-dashboard[data-uh-theme] .uh-notification-icon {
    background: var(--uh-notification-icon-bg);
    color: var(--uh-notification-icon);
}

.uh-dashboard[data-uh-theme] .uh-notification-content {
    min-width: 0;
    overflow: hidden;
}

.uh-dashboard[data-uh-theme] .uh-notification-content strong,
.uh-dashboard[data-uh-theme] .uh-notification-content p,
.uh-dashboard[data-uh-theme] .uh-notification-content small {
    max-width: 100%;
    color: var(--uh-notification-text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.uh-dashboard[data-uh-theme] .uh-notification-content p,
.uh-dashboard[data-uh-theme] .uh-notification-content small {
    color: var(--uh-notification-muted);
}

.uh-dashboard[data-uh-theme] .uh-notification-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

.uh-dashboard[data-uh-theme] .uh-notification-link,
.uh-dashboard[data-uh-theme] .uh-notification-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--uh-notification-border);
    border-radius: 999px;
    background: var(--uh-notification-surface);
    color: var(--uh-notification-link) !important;
    line-height: 1.4;
}

.uh-dashboard[data-uh-theme] .uh-notification-read {
    color: var(--uh-notification-read) !important;
}

@media (max-width: 680px) {
    .uh-dashboard[data-uh-theme] .uh-notification-item,
    .uh-dashboard[data-uh-theme] .uh-notification-item.is-unread {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .uh-dashboard[data-uh-theme] .uh-notification-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-inline-start: 42px;
    }
}

.uh-dashboard[data-uh-theme="dark"] .uh-native-form,
.uh-dashboard[data-uh-theme="dark"] .uh-address-card,
.uh-dashboard[data-uh-theme="dark"] .uh-native-product,
.uh-dashboard[data-uh-theme="dark"] .uh-product-tool {
    background: #000;
    border-color: #334155;
    color: #fff;
}

.uh-dashboard[data-uh-theme="dark"] .uh-native-empty,
.uh-dashboard[data-uh-theme="dark"] .uh-compare-table th,
.uh-dashboard[data-uh-theme="dark"] .uh-compare-table td {
    border-color: #334155;
}

.uh-dashboard[data-uh-theme="dark"] .uh-button,
.uh-dashboard[data-uh-theme="dark"] .uh-button *,
.uh-dashboard[data-uh-theme="dark"] button[type="submit"] {
    color: #fff;
}

.uh-dashboard[data-uh-theme="dark"] .uh-referral-card code {
    background: #082f49;
    border-color: #0ea5e9;
    color: #bae6fd;
}

.uh-dashboard[data-uh-theme="dark"] .uh-logout-link {
    color: #fca5a5;
}

/* Account actions belong beside the user, not at the end of the tab list. */
.uh-dashboard .uh-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    order: -3;
    box-sizing: border-box;
}
.uh-dashboard .uh-sidebar-header .uh-profile-mini {
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.uh-dashboard .uh-sidebar-header .uh-profile-mini > div:last-child {
    min-width: 0;
    overflow: hidden;
}
.uh-dashboard .uh-sidebar-header .uh-profile-mini strong,
.uh-dashboard .uh-sidebar-header .uh-profile-mini small {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.uh-dashboard .uh-sidebar-header .uh-logout-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #fecaca;
    border-radius: 11px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
}
.uh-dashboard .uh-sidebar-header .uh-logout-link:hover {
    background: #fee2e2;
    border-color: #f87171;
}
.uh-dashboard .uh-sidebar-header .uh-logout-link .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}
.uh-dashboard[data-uh-theme="dark"] .uh-sidebar-header .uh-logout-link {
    background: #450a0a;
    border-color: #991b1b;
    color: #fecaca;
}
.uh-dashboard[data-uh-theme="dark"] .uh-sidebar-header .uh-logout-link:hover {
    background: #7f1d1d;
    border-color: #f87171;
}
@media (max-width: 420px) {
    .uh-dashboard .uh-sidebar-header .uh-avatar {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .uh-dashboard .uh-sidebar-header .uh-profile-mini { gap: 7px; }
}


@media (prefers-reduced-motion: reduce) {
    .uh-dashboard,
    .uh-dashboard * {
        transition: none !important;
    }
}
