/* ─── Account Hub — mobile-app-style account area ─────────── */
.ah-page {
    padding: 0;
    background: var(--bg, var(--ah-bg, #fff));
    min-height: calc(100vh - var(--header-h, 64px));
}

.ah-hub {
    display: flex;
    flex-direction: column;
    max-width: 1180px;
    margin: 0 auto;
    min-height: inherit;
}

.ah-hub__aside {
    display: none;
}

.ah-hub__tabs {
    display: flex;
    gap: 8px;
    padding: 12px 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.ah-hub__tabs::-webkit-scrollbar {
    display: none;
}

.ah-hub__tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 10px 16px;
    border-radius: var(--radius, var(--badge-radius, 12px));
    font-size: 13px;
    font-weight: 600;
    color: var(--muted, #6b7280);
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.ah-hub__tab.is-active {
    background: var(--primary, var(--brand, var(--purple-700, #6d28d9)));
    border-color: var(--primary, var(--brand, var(--purple-700, #6d28d9)));
    color: #fff;
}

.ah-hub__tab--logout {
    color: #dc2626;
    border-color: #fecaca;
    background: #fff;
}

.ah-hub__tab--logout:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.ah-hub__main {
    flex: 1;
    min-width: 0;
    /* padding: 0 0 calc(var(--bottom-nav-h, 72px) + 16px + env(safe-area-inset-bottom)); */
}

.ah-hub__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 14px 8px;
}

.ah-hub__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text, #111827);
}

.ah-hub__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted, #6b7280);
    line-height: 1.45;
}

.ah-hub__body {
    padding: 0 14px 14px;
}

/* ─── Profile hero ─────────────────────────────────────────── */
.ah-profile-hero {
    position: relative;
    margin: 8px 0 14px;
    border-radius: var(--card-radius, var(--radius-lg, 0px));
    overflow: hidden;
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    box-shadow: none;
}

.ah-profile-hero__banner {
    height: 96px;
    background: linear-gradient(135deg,
            var(--primary-dark, var(--primary, #5b21b6)) 0%,
            var(--primary, #7c3aed) 52%,
            var(--accent, var(--primary-soft, #a78bfa)) 100%);
}

.ah-profile-hero__inner {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    text-align: left;
    padding: 18px 20px;
    /* margin-top: -40px; */
    gap: 10px;
}

.ah-profile-hero__avatar {
    flex-shrink: 0;
}

.ah-profile-hero__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg, #fff);
    box-shadow: none;
}

.ah-profile-hero__initial {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg,
            var(--primary-dark, var(--primary, #6d28d9)),
            var(--primary, #a78bfa));
    border: 4px solid var(--card-bg, #fff);
    box-shadow: none;
}

.ah-profile-hero__info h1 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
}

.ah-profile-hero__meta,
.ah-profile-hero__joined {
    margin: 0;
    font-size: 13px;
    color: var(--muted, #6b7280);
    display: flex;
    align-items: center;
    /* justify-content: center; */
    flex-wrap: wrap;
    gap: 6px;
}

.ah-profile-hero__meta i,
.ah-profile-hero__joined i {
    color: var(--primary, var(--purple-500, #8b5cf6));
    font-size: 12px;
}

.ah-profile-hero__joined {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted, var(--purple-400, #a78bfa));
}

.ah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--btn-radius, var(--radius, 12px));
    font-size: var(--btn-font-size, 13px);
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}

.ah-btn:active {
    transform: scale(0.98);
}

.ah-btn--primary {
    background: linear-gradient(135deg, var(--btn-filled-bg, var(--purple-600, #7c3aed)), var(--btn-filled-bg-2, var(--purple-500, #8b5cf6)));
    color: var(--btn-filled-text, #fff);
    border: 2px solid var(--btn-filled-border, transparent);
    box-shadow: var(--btn-shadow, 0 4px 14px rgba(124, 58, 237, 0.3));
}

.ah-btn--primary:hover {
    background: linear-gradient(135deg, var(--btn-filled-hover-bg, var(--purple-700, #6d28d9)), var(--btn-filled-hover-bg-2, var(--purple-600, #7c3aed)));
    color: var(--btn-filled-hover-text, #fff);
    border-color: var(--btn-filled-hover-border, transparent);
    box-shadow: var(--btn-hover-shadow, 0 8px 20px rgba(109, 40, 217, 0.35));
}

.ah-btn--soft {
    background: var(--btn-outline-bg, var(--purple-50, #f5f3ff));
    color: var(--btn-outline-text, var(--purple-700, #6d28d9));
    border: 2px solid var(--btn-outline-border, var(--purple-200, #ddd6fe));
    box-shadow: var(--btn-outline-shadow, none);
}

.ah-btn--soft:hover {
    background: linear-gradient(135deg, var(--btn-outline-hover-bg, var(--purple-800, #5b21b6)), var(--btn-outline-hover-bg-2, var(--purple-600, #7c3aed)));
    color: var(--btn-outline-hover-text, #fff);
    border-color: var(--btn-outline-hover-border, transparent);
}

.ah-btn--ghost {
    background: var(--btn-outline-bg, #fff);
    color: var(--btn-outline-text, var(--purple-700, #6d28d9));
    border: 2px solid var(--btn-outline-border, var(--border, #e5e7eb));
    box-shadow: var(--btn-outline-shadow, none);
}

.ah-btn--ghost:hover {
    background: linear-gradient(135deg, var(--btn-outline-hover-bg, var(--purple-800, #5b21b6)), var(--btn-outline-hover-bg-2, var(--purple-600, #7c3aed)));
    color: var(--btn-outline-hover-text, #fff);
    border-color: var(--btn-outline-hover-border, transparent);
}

.ah-btn--sm {
    min-height: 38px;
    padding: 8px 14px;
    font-size: calc(var(--btn-font-size, 13px) - 1px);
}

.ah-btn--block {
    width: 100%;
}

/* ─── Banners & stats ──────────────────────────────────────── */
.ah-banner {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: var(--radius, var(--card-radius, 0px));
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
}

.ah-banner--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #047857;
}

.ah-banner--error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.ah-banner.fade-out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s, transform 0.35s;
}

.ah-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ah-stat {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, var(--radius, 0px));
    padding: 14px 10px;
    text-align: center;
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    box-shadow: none;
}

.ah-stat__icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    border-radius: var(--radius, var(--card-radius, 0px));
    background: var(--primary-soft, var(--purple-50, #f5f3ff));
    color: var(--primary, var(--purple-600, #7c3aed));
    display: grid;
    place-items: center;
    font-size: 17px;
}

.ah-stat__value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.ah-stat__value.is-success {
    color: #15803d;
}

.ah-stat__label {
    font-size: 11px;
    color: var(--muted, #6b7280);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── Section cards ────────────────────────────────────────── */
.ah-section {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, var(--radius-lg, 0px));
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    margin-bottom: 12px;
    /* overflow: hidden; */
    box-shadow: none;
}

.ah-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line, #f3f4f6);
    flex-wrap: wrap;
}

.ah-section__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ah-section__title i {
    color: var(--purple-500, #8b5cf6);
}

.ah-section__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ah-section__link {
    font-size: 12px;
    font-weight: 600;
    color: var(--btn-filled-bg, var(--purple-600, #7c3aed));
    text-decoration: none;
}

.ah-section__link:hover {
    color: var(--btn-filled-hover-bg, var(--btn-filled-bg, var(--purple-700, #6d28d9)));
}

.ah-section__body {
    padding: 12px 14px 14px;
}

.ah-empty {
    text-align: center;
    padding: 32px 16px;
}

.ah-empty__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--purple-50, #f5f3ff);
    color: var(--purple-400, #a78bfa);
    display: grid;
    place-items: center;
    font-size: 22px;
}

.ah-empty h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.ah-empty p {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--muted, #6b7280);
}

/* ─── Coupons / redemptions ────────────────────────────────── */
.ah-coupon-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ah-coupon {
    padding: 14px;
    border-radius: var(--card-radius, var(--radius, 0px));
    background: var(--purple-50, #faf5ff);
    border: 1px dashed var(--purple-200, #ddd6fe);
}

.ah-coupon__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ah-coupon__name {
    font-size: 14px;
    font-weight: 700;
}

.ah-coupon__code {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-sm, var(--radius, 0px));
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--purple-700, #6d28d9);
}

.ah-coupon__type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--purple-600, #7c3aed);
    background: #fff;
    padding: 4px 8px;
    border-radius: var(--badge-radius, var(--radius, 0px));
    white-space: nowrap;
}

.ah-coupon__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
}

.ah-coupon__meta div {
    min-width: 0;
}

.ah-coupon__meta dt {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted, #6b7280);
}

.ah-coupon__meta dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.ah-coupon__meta .is-success {
    color: #15803d;
}

.ah-coupon__meta a {
    color: var(--purple-700, #6d28d9);
    font-weight: 600;
}

/* ─── Addresses ──────────────────────────────────────────────── */
.ah-addr-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ah-addr {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: var(--card-radius, var(--shape-radius, var(--radius, 12px)));
    background: var(--card-bg, #fff);
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    position: relative;
}

.ah-addr__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm, var(--shape-radius, var(--card-radius, 12px)));
    background: var(--primary-soft, var(--purple-50, #f5f3ff));
    color: var(--primary, var(--purple-600, #7c3aed));
    display: grid;
    place-items: center;
    font-size: 17px;
}

.ah-addr__body {
    flex: 1;
    min-width: 0;
}

.ah-addr__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.ah-addr__name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ah-addr__name {
    font-size: 14px;
    font-weight: 700;
}

.ah-addr__type {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--chip-fg, var(--primary, var(--heading, #374151)));
    background: var(--primary-soft, var(--bg-soft, var(--card-bg, #f3f4f6)));
    padding: 2px 7px;
    border-radius: var(--badge-radius, var(--shape-radius, var(--card-radius, 8px)));
}

.ah-addr__badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-dark, var(--purple-700, #6d28d9));
    background: var(--primary-soft, var(--purple-50, #f5f3ff));
    padding: 3px 8px;
    border-radius: var(--badge-radius, var(--shape-radius, var(--card-radius, 8px)));
}

.ah-addr__lines {
    margin: 0;
    font-size: 13px;
    color: var(--text, #374151);
    line-height: 1.5;
}

.ah-addr__phone {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--muted, #6b7280);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ah-addr__menu {
    flex-shrink: 0;
    position: relative;
}

.ah-addr__menu-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm, var(--shape-radius, var(--card-radius, 10px)));
    background: #f9fafb;
    color: var(--muted, #6b7280);
    cursor: pointer;
    display: grid;
    place-items: center;
}

.ah-addr__menu-btn:hover,
.ah-addr__menu.is-open .ah-addr__menu-btn {
    background: var(--purple-50, #f5f3ff);
    color: var(--purple-700, #6d28d9);
}

.ah-addr__menu-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--card-radius, var(--shape-radius, var(--radius, 12px)));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 20;
}

.ah-addr__menu-panel form {
    margin: 0;
}

.ah-addr__menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text, #111827);
}

.ah-addr__menu-item:hover {
    background: var(--purple-50, #f5f3ff);
}

.ah-addr__menu-item--danger {
    color: #dc2626;
}

/* ─── Orders (simple list) ───────────────────────────────── */
.ah-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ah-order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px;
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, 12px);
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ah-order-card:hover {
    border-color: color-mix(in srgb, var(--brand, var(--primary, #720d29)) 28%, #e5e7eb);
}
.ah-order-card__main {
    min-width: 0;
    flex: 1;
}
.ah-order-card__row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}
.ah-order-card__no {
    font-size: .95rem;
    color: var(--brand, var(--primary, #720d29));
}
.ah-order-card__status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    text-transform: capitalize;
}
.ah-order-card__meta {
    margin: 0;
    font-size: .82rem;
    color: var(--muted, #6b7280);
}
.ah-order-card__aside {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ah-order-card__total {
    font-size: .95rem;
}
.ah-order-card__go {
    color: var(--muted, #9ca3af);
    font-size: .75rem;
}

/* legacy status color hooks reused by new cards */
.ah-order__status--pending,
.ah-order__status--confirmed,
.ah-order-card__status.ah-order__status--pending,
.ah-order-card__status.ah-order__status--confirmed {
    background: #ffedd5;
    color: #9a3412;
}
.ah-order__status--processing,
.ah-order__status--packed,
.ah-order-card__status.ah-order__status--processing,
.ah-order-card__status.ah-order__status--packed {
    background: #e0e7ff;
    color: #3730a3;
}
.ah-order__status--shipped,
.ah-order__status--out-for-delivery,
.ah-order-card__status.ah-order__status--shipped,
.ah-order-card__status.ah-order__status--out-for-delivery {
    background: #dbeafe;
    color: #1d4ed8;
}
.ah-order__status--delivered,
.ah-order-card__status.ah-order__status--delivered {
    background: #d1fae5;
    color: #065f46;
}
.ah-order__status--cancelled,
.ah-order__status--returned,
.ah-order__status--failed,
.ah-order-card__status.ah-order__status--cancelled,
.ah-order-card__status.ah-order__status--returned,
.ah-order-card__status.ah-order__status--failed {
    background: #fee2e2;
    color: #991b1b;
}

/* ─── Orders (legacy compact list kept for safety) ───────────────────────────────── */
.ah-order {
    position: relative;
    display: flex;
    align-items: stretch;
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, 12px);
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.ah-order:hover {
    border-color: color-mix(in srgb, var(--brand, var(--primary, #720d29)) 28%, #e5e7eb);
}

.ah-order__link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
    flex: 1;
}

.ah-order__thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.ah-order__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ah-order__body {
    min-width: 0;
}

.ah-order__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.ah-order__no {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.ah-order__status {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    line-height: 1.3;
}

.ah-order__status--pending,
.ah-order__status--confirmed {
    background: #fef3c7;
    color: #92400e;
}

.ah-order__status--processing,
.ah-order__status--packed {
    background: #dbeafe;
    color: #1d4ed8;
}

.ah-order__status--shipped,
.ah-order__status--out-for-delivery {
    background: #e0e7ff;
    color: #4338ca;
}

.ah-order__status--delivered {
    background: #dcfce7;
    color: #15803d;
}

.ah-order__status--cancelled,
.ah-order__status--returned,
.ah-order__status--failed {
    background: #fee2e2;
    color: #b91c1c;
}

.ah-order__meta,
.ah-order__ship {
    margin: 0;
    font-size: 12px;
    color: var(--muted, #6b7280);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-order__ship {
    margin-top: 2px;
}

.ah-order__ship i {
    font-size: 10px;
    margin-right: 4px;
    color: var(--brand, var(--primary, #720d29));
    opacity: 0.85;
}

.ah-order__coupon {
    display: none;
}

.ah-order__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    flex-shrink: 0;
}

.ah-order__total {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.2;
}

.ah-order__cta {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand, var(--purple-600, #720d29));
}

.ah-order__invoice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 0 12px;
    border-left: 1px solid var(--line, #f3f4f6);
    color: var(--brand, var(--primary, #720d29));
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: color-mix(in srgb, var(--brand, #720d29) 4%, #fff);
}

.ah-order__invoice:hover {
    background: color-mix(in srgb, var(--brand, #720d29) 9%, #fff);
}

.ah-order__footer {
    display: none;
}

/* ─── Order detail (compact) ──────────────────────────────── */
.ah-od {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ah-od.is-placed .ah-od__head {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #fff 70%);
}

.ah-od__crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    color: var(--muted, #6b7280);
}

.ah-od__crumb a {
    color: inherit;
    text-decoration: none;
}

.ah-od__crumb a:hover {
    color: var(--brand, var(--primary, #720d29));
}

.ah-od__crumb-current {
    color: var(--text, #111827);
    font-weight: 600;
}

.ah-od__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--card-radius, var(--shape-radius, var(--radius, 12px)));
}

/* Customer order tracking */
.ah-track {
    /* margin: 12px 0 18px; */
    padding: 16px 14px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--card-radius, var(--shape-radius, var(--radius, 12px)));
    background: #fff;
}
.ah-track__title {
    margin: 0 0 14px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
}
.ah-track__cancel {
    margin: 0;
    font-size: .92rem;
    color: #991b1b;
}
.ah-track__rail {
    position: relative;
    padding-top: 2px;
}
.ah-track__rail::before,
.ah-track__rail::after {
    content: "";
    position: absolute;
    top: 13px;
    left: 16.666%;
    right: 16.666%;
    height: 3px;
    border-radius: 999px;
    background: #e5e7eb;
    z-index: 0;
}
.ah-track__rail::after {
    right: auto;
    width: calc((100% - 33.333%) * var(--ah-track-progress, 0) / 100);
    max-width: calc(100% - 33.333%);
    background: #22c55e;
}
.ah-track__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    position: relative;
    z-index: 1;
    gap: 8px;
}
.ah-track__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    min-width: 0;
}
.ah-track__dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    box-sizing: border-box;
}
.ah-track__step.is-done .ah-track__dot,
.ah-track__step.is-current .ah-track__dot {
    border-color: #22c55e;
    background: #22c55e;
}
.ah-track__step.is-current .ah-track__dot:empty {
    background: #fff;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .16);
}
.ah-track__label {
    font-size: .8rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.25;
}
.ah-track__date {
    font-size: .75rem;
    color: #9ca3af;
    line-height: 1.25;
}
.ah-track__note {
    font-size: .7rem;
    color: #9ca3af;
}
.ah-track.is-cancelled {
    border-color: #fecaca;
    background: #fff7f7;
}

@media (max-width: 520px) {
    .ah-track__label {
        font-size: .72rem;
    }
    .ah-track__date,
    .ah-track__note {
        font-size: .68rem;
    }
}

.ah-od__head-main {
    min-width: 0;
}

.ah-od__title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--brand, var(--text, #111827));
}

.ah-od__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted, #6b7280);
}

.ah-od__dot {
    opacity: 0.5;
}

.ah-od__status {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: capitalize;
    line-height: 1.3;
}

.ah-od__status--pending,
.ah-od__status--confirmed {
    background: #fef3c7;
    color: #92400e;
}

.ah-od__status--processing,
.ah-od__status--packed {
    background: #dbeafe;
    color: #1d4ed8;
}

.ah-od__status--shipped,
.ah-od__status--out-for-delivery {
    background: #e0e7ff;
    color: #4338ca;
}

.ah-od__status--delivered {
    background: #dcfce7;
    color: #15803d;
}

.ah-od__status--cancelled,
.ah-od__status--returned,
.ah-od__status--failed {
    background: #fee2e2;
    color: #b91c1c;
}

.ah-od__pay {
    text-transform: capitalize;
}

.ah-od__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 12px;
    align-items: start;
}

@media (max-width: 900px) {
    .ah-od__grid {
        grid-template-columns: 1fr;
    }
}

.ah-od__aside {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ah-od__panel {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--card-radius, var(--shape-radius, var(--radius, 12px)));
    padding: 12px 14px;
}

.ah-od__panel-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ah-od__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 10px;
    letter-spacing: 0;
}

.ah-od__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.ah-od__item+.ah-od__item {
    border-top: 1px solid var(--line, #f3f4f6);
}

.ah-od__item-link {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    color: inherit;
    text-decoration: none;
}

.ah-od__item-link.is-static {
    cursor: default;
}

.ah-od__item-link:not(.is-static):hover .ah-od__item-name {
    color: var(--brand, var(--primary, #720d29));
}

.ah-od__item:first-child .ah-od__item-link {
    padding-top: 0;
}

.ah-od__item:last-child .ah-od__item-link {
    padding-bottom: 0;
}

.ah-od__item-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm, var(--shape-radius, var(--card-radius, 8px)));
    overflow: hidden;
    background: #f3f4f6;
    display: block;
}

.ah-od__item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ah-od__item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ah-od__item-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ah-od__item-meta {
    font-size: 11px;
    color: var(--muted, #6b7280);
    line-height: 1.35;
}

.ah-od__item-total {
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ah-od__addr {
    font-size: 13px;
    line-height: 1.4;
    color: #374151;
}

.ah-od__addr-name {
    margin: 0 0 4px;
    font-weight: 700;
    color: var(--brand, var(--text, #111827));
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.ah-od__addr-type {
    font-size: 10px;
    font-weight: 700;
    text-transform: capitalize;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
}

.ah-od__addr-line {
    margin: 0 0 2px;
}

.ah-od__addr-line.muted {
    color: var(--muted, #6b7280);
}

.ah-od__addr-phone {
    margin: 6px 0 0;
    font-size: 12px;
    color: #4b5563;
}

.ah-od__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    font-size: 13px;
    padding: 4px 0;
    color: #4b5563;
}

.ah-od__row span:last-child,
.ah-od__row strong {
    color: #111827;
    white-space: nowrap;
}

.ah-od__save {
    color: #15803d !important;
    font-weight: 600;
}

.ah-od__row--total {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid var(--line, #f3f4f6);
    font-size: 14px;
    color: #111827;
    font-weight: 600;
}

.ah-od__panel--summary .ah-od__row:first-of-type {
    padding-top: 0;
}


/* ─── Wishlist ─────────────────────────────────────────────── */
.ah-wish-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ah-wish-card {
    background: var(--card-bg, #fff);
    border-radius: var(--card-radius, var(--radius, 0px));
    border: 1px solid var(--card-border, var(--border, #e5e7eb));
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.ah-wish-card__media {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #f9fafb;
}

.ah-wish-card__media a {
    display: block;
    height: 100%;
}

.ah-wish-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ah-wish-card__heart {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 16px;
    display: grid;
    place-items: center;
}

.ah-wish-card__body {
    padding: 10px 10px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
}

.ah-wish-card__brand {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted, #6b7280);
}

.ah-wish-card__name {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text, #111827);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ah-wish-card__name:hover {
    color: var(--purple-700, #6d28d9);
}

.ah-wish-card__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    padding-top: 6px;
}

.ah-wish-card__price strong {
    font-size: 14px;
}

.ah-wish-card__price del {
    font-size: 11px;
    color: var(--muted, #6b7280);
}

.ah-wish-card__bag {
    margin-top: 8px;
    width: 100%;
}

.ah-wish-card__offline {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #64748b;
}

/* ─── Offcanvas (account forms) ──────────────────────────────── */
.oc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.oc-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.oc-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(440px, 92vw);
    height: 100%;
    background: var(--card-bg, var(--panel, var(--bg, #fff)));
    color: var(--text);
    z-index: 1010;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.12);
}

.oc-panel.is-open {
    right: 0;
}

.oc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line, var(--border, #eee));
    background: var(--card-bg, var(--panel, transparent));
    color: var(--heading, var(--text));
}

.oc-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oc-header h3 i {
    color: var(--purple-500, #8b5cf6);
}

.oc-close {
    background: color-mix(in srgb, var(--btn-filled-bg, #6d28d9) 10%, #fff);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius, 10px);
    font-size: 18px;
    cursor: pointer;
    color: var(--btn-filled-bg, var(--muted, #6b7280));
    display: grid;
    place-items: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.oc-close:hover,
.oc-close:focus-visible {
    background: var(--btn-filled-bg, var(--purple-700, #6d28d9));
    color: var(--btn-filled-text, #fff);
    outline: none;
}

.oc-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.oc-form .field {
    margin-bottom: 16px;
}

.oc-footer {
    padding: 14px 0 0;
    border-top: 1px solid var(--line, #eee);
    margin-top: 10px;
}

.phone-prefix {
    padding: 10px 12px;
    background: var(--purple-50, #f5f3ff);
    border: 1px solid var(--line, #e5e7eb);
    border-right: none;
    border-radius: var(--radius-sm, var(--radius, 0px)) 0 0 var(--radius-sm, var(--radius, 0px));
    font-size: 14px;
    font-weight: 600;
    color: var(--purple-700, #6d28d9);
}

.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-upload-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--purple-200, #ddd6fe);
}

.avatar-upload-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--purple-50, #f5f3ff);
    border: 2px dashed var(--purple-300, #c4b5fd);
    display: grid;
    place-items: center;
    font-size: 28px;
    color: var(--purple-400, #a78bfa);
}

.avatar-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.address-location-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.address-default-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px;
    font-size: 14px;
}

.address-default-check input {
    accent-color: var(--purple-600, #7c3aed);
}

.address-form-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 639px) {

    .address-location-grid,
    .oc-form .grid-2 {
        grid-template-columns: 1fr;
    }

    .ah-stats {
        grid-template-columns: 1fr;
    }

    .ah-stat {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 12px 14px;
    }

    .ah-stat__icon {
        margin: 0;
    }

    .ah-coupon__meta {
        grid-template-columns: 1fr;
    }

    .ah-order {
        flex-direction: column;
    }

    .ah-order__link {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        padding: 10px;
        gap: 8px;
    }

    .ah-order__thumb {
        width: 44px;
        height: 44px;
    }

    .ah-order__invoice {
        border-left: 0;
        border-top: 1px solid var(--line, #f3f4f6);
        padding: 8px 12px;
        justify-content: flex-start;
    }

    .ah-od__grid {
        grid-template-columns: 1fr;
    }

    .ah-od__head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .ah-od__meta-row .ah-od__pay {
        flex-basis: 100%;
    }

    .ah-od__meta-row .ah-od__dot:last-of-type {
        display: none;
    }
}


@media (max-width: 1023px) {
    .ah-page {
        min-height: calc(50vh - var(--header-h, 64px));
    }

    .ah-hub__body {
        padding-top: 14px;
    }
}

@media (min-width: 1024px) {
    .ah-page {
        padding: 24px 20px 48px;
    }

    .ah-hub {
        flex-direction: row;
        align-items: flex-start;
        gap: 28px;
    }

    .ah-hub__aside {
        display: block;
        width: 250px;
        flex-shrink: 0;
        position: sticky;
        top: calc(var(--header-h, 64px) + 16px);
    }

    .ah-hub__nav {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: var(--card-bg, #fff);
        border: 1px solid var(--card-border, var(--border, #e5e7eb));
        border-radius: var(--card-radius, var(--radius-lg, 16px));
        padding: 14px 12px;
        box-shadow: none;
    }

    .ah-hub__aside-head {
        margin: 0 0 8px;
        padding: 2px 6px 6px;
    }

    .ah-hub__aside-label {
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--primary-dark, var(--primary, var(--text, #1e1233)));
    }

    .ah-hub__nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 10px;
        border-radius: var(--radius, 10px);
        font-size: 14px;
        font-weight: 600;
        color: var(--primary-dark, var(--text, #1e1233));
        text-decoration: none;
        border: 1px solid transparent;
        background: transparent;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
    }

    .ah-hub__nav-link:hover {
        border-color: var(--border, #e5e7eb);
        background: transparent;
        color: var(--primary-dark, var(--text, #1e1233));
    }

    .ah-hub__nav-link.is-active {
        border-color: var(--primary, var(--primary-dark, #6d28d9));
        background: transparent;
        color: var(--primary-dark, var(--primary, #5b21b6));
    }

    .ah-hub__nav-link--logout {
        margin-top: 2px;
    }

    .ah-hub__nav-icon {
        width: 34px;
        height: 34px;
        border-radius: var(--radius-sm, 8px);
        background: color-mix(in srgb, var(--primary, #6d28d9) 12%, #fff);
        color: var(--primary-dark, var(--primary, #5b21b6));
        display: grid;
        place-items: center;
        font-size: 14px;
        flex-shrink: 0;
    }

    .ah-hub__nav-link.is-active .ah-hub__nav-icon,
    .ah-hub__nav-link:hover .ah-hub__nav-icon {
        background: color-mix(in srgb, var(--primary, #6d28d9) 16%, #fff);
        color: var(--primary-dark, var(--primary, #5b21b6));
    }

    .ah-hub__tabs {
        display: none;
    }

    .ah-hub__main {
        padding-bottom: 24px;
    }

    .ah-hub__header {
        padding: 0 0 16px;
    }

    .ah-hub__body {
        padding: 0;
        /* padding-top: 14px; */
    }

    .ah-order-detail-crumb {
        margin: 0 0 10px;
    }

    .ah-od__grid {
        grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    }

    .ah-profile-hero__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 24px 22px;
    }

    .ah-profile-hero__meta,
    .ah-profile-hero__joined {
        justify-content: flex-start;
    }

    .ah-wish-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1200px) {
    .ah-hub__main {
        padding-bottom: 0;
    }

    .ah-wish-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}