/* =========================================================
   پنل حساب کاربری — برنج پارسی
   Account Dashboard styles
   از متغیرهای رنگی موجود در style.css استفاده می‌کند:
   --green-primary, --green-dark, --gold, --dark, --shadow, --error, --success, --warning, --info
   ========================================================= */

.acc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: rgba(45, 52, 54, 0.55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .25s ease;
}

.acc-overlay.active {
    display: flex;
    opacity: 1;
}

.acc-panel {
    width: 100%;
    max-width: 1180px;
    height: min(860px, 92vh);
    background: var(--off-white, #f8f9fa);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease;
}

.acc-overlay.active .acc-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ---------- Top bar ---------- */
.acc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    flex-shrink: 0;
}

.acc-topbar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}

.acc-topbar-title i {
    color: var(--green-primary);
}

.acc-menu-toggle,
.acc-close {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: var(--off-white);
    color: var(--dark);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .15s ease;
    flex-shrink: 0;
}

.acc-close {
    display: flex;
}

.acc-menu-toggle:hover,
.acc-close:hover {
    background: var(--green-primary);
    color: var(--white);
}

.acc-close:active,
.acc-menu-toggle:active {
    transform: scale(.92);
}

/* ---------- Body layout ---------- */
.acc-body {
    flex: 1;
    display: flex;
    min-height: 0;
    position: relative;
}

.acc-sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--white);
    border-left: 1px solid var(--light-gray);
    padding: 18px 14px;
    overflow-y: auto;
}

.acc-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.acc-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--dark);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: right;
    transition: background .18s ease, color .18s ease, padding-right .18s ease;
}

.acc-nav-item i {
    width: 20px;
    text-align: center;
    color: var(--light-text);
    transition: color .18s ease;
    font-size: .95rem;
}

.acc-nav-emoji {
    width: 20px;
    display: inline-flex;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
}

.acc-nav-count {
    margin-inline-start: auto;
    font-size: .78rem;
    font-weight: 700;
    opacity: .75;
}

.acc-nav-item:hover {
    background: rgba(0, 184, 148, .08);
}

.acc-nav-item.active {
    background: var(--green-gradient);
    color: var(--white);
    box-shadow: 0 8px 18px rgba(0, 184, 148, .28);
}

.acc-nav-item.active i {
    color: var(--white);
}

.acc-nav-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 10px 4px;
}

.acc-nav-item.acc-nav-logout {
    color: var(--error);
}

.acc-nav-item.acc-nav-logout i {
    color: var(--error);
}

.acc-nav-item.acc-nav-logout:hover {
    background: rgba(255, 118, 117, .1);
}

.acc-sidebar-backdrop {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(45, 52, 54, .35);
    z-index: 5;
}

.acc-main {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 26px 30px 40px;
}

/* ---------- Section heading ---------- */
.acc-view-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
}

.acc-view-title i {
    color: var(--green-primary);
}

/* ---------- Profile card ---------- */
.acc-profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.acc-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--green-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 184, 148, .3);
}

.acc-profile-info {
    flex: 1;
    min-width: 180px;
}

.acc-profile-greeting {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.acc-profile-sub {
    color: var(--light-text);
    font-size: .88rem;
    margin-bottom: 6px;
}

.acc-profile-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
}

.acc-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
}

.acc-profile-badge.active {
    color: var(--green-dark);
}

.acc-profile-badge.active i { color: var(--green-primary); }

.acc-profile-joined {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--light-text);
}

.acc-profile-joined i { color: var(--light-text); }

.acc-profile-mobile {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--dark);
    background: var(--off-white);
    padding: 4px 10px;
    border-radius: 20px;
    direction: ltr;
}

.acc-edit-btn {
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    color: var(--dark);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all .2s ease;
    flex-shrink: 0;
}

.acc-edit-btn:hover {
    background: var(--green-primary);
    color: var(--white);
    border-color: var(--green-primary);
    transform: translateY(-1px);
}

/* ---------- Completion banner ---------- */
.acc-completion {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(253, 203, 110, .16), rgba(253, 203, 110, .06));
    border: 1px solid rgba(253, 203, 110, .4);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.acc-completion i.acc-completion-icon {
    color: var(--gold-dark);
    font-size: 1.2rem;
}

.acc-completion-text {
    flex: 1;
    min-width: 200px;
    font-size: .9rem;
    color: var(--dark);
    font-weight: 600;
}

.acc-completion-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(253, 203, 110, .25);
    border-radius: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.acc-completion-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 10px;
    transition: width .5s ease;
}

.acc-completion-cta {
    background: var(--gold-dark);
    color: var(--white);
    border: none;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease;
}

.acc-completion-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(225, 112, 85, .3);
}

/* ---------- Stat cards ---------- */
.acc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.acc-stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.acc-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 184, 148, .25);
}

.acc-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--white);
}

.acc-stat-icon.orders { background: linear-gradient(135deg, #0984e3, #74b9ff); }
.acc-stat-icon.wishlist { background: linear-gradient(135deg, #fd79a8, #ff9fc4); }
.acc-stat-icon.points { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.acc-stat-icon.addresses { background: var(--green-gradient); }
.acc-stat-icon.processing { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.acc-stat-icon.cart { background: linear-gradient(135deg, #6c5ce7, #a29bfe); }

.acc-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.acc-stat-label {
    font-size: .8rem;
    color: var(--light-text);
}

/* ---------- Generic content card ---------- */
.acc-card {
    background: var(--white);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.acc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.acc-card-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--dark);
}

.acc-link-btn {
    color: var(--green-primary);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.acc-link-btn:hover {
    text-decoration: underline;
}

/* ---------- Info rows (اطلاعات شخصی) ---------- */
.acc-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.acc-info-row {
    background: var(--off-white);
    border-radius: 12px;
    padding: 12px 16px;
}

.acc-info-label {
    font-size: .78rem;
    color: var(--light-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acc-info-value {
    font-size: .95rem;
    font-weight: 600;
    color: var(--dark);
}

.acc-info-value.acc-empty-value {
    color: var(--light-text);
    font-weight: 500;
    font-style: normal;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.acc-info-value.acc-empty-value::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--light-gray);
    display: inline-block;
}

/* ---------- Orders table / cards ---------- */
.acc-table-wrap {
    overflow-x: auto;
}

.acc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.acc-table th {
    text-align: right;
    color: var(--light-text);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 2px solid var(--off-white);
    white-space: nowrap;
}

.acc-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--off-white);
    color: var(--dark);
    white-space: nowrap;
}

.acc-table tr:last-child td {
    border-bottom: none;
}

.acc-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.acc-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.acc-status.processing { background: rgba(9, 132, 227, .1); color: #0984e3; }
.acc-status.processing .acc-status-dot { background: #0984e3; }
.acc-status.shipped { background: rgba(253, 203, 110, .15); color: var(--gold-dark); }
.acc-status.shipped .acc-status-dot { background: var(--gold-dark); }
.acc-status.delivered { background: rgba(0, 184, 148, .12); color: var(--green-dark); }
.acc-status.delivered .acc-status-dot { background: var(--green-primary); }
.acc-status.cancelled { background: rgba(255, 118, 117, .12); color: var(--error); }
.acc-status.cancelled .acc-status-dot { background: var(--error); }

.acc-order-cards {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.acc-order-card {
    background: var(--off-white);
    border-radius: 14px;
    padding: 14px 16px;
}

.acc-order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.acc-order-card-num {
    font-weight: 700;
    color: var(--dark);
    font-size: .9rem;
}

.acc-order-card-row {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--light-text);
    padding: 3px 0;
}

.acc-order-card-row strong {
    color: var(--dark);
    font-weight: 600;
}

/* ---------- Wishlist grid ---------- */
.acc-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* ---------- Wishlist product cards (Premium / Minimal) ---------- */
.acc-wish-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
}

.acc-wish-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(45, 52, 54, .08);
}

.acc-wish-card.is-removing {
    opacity: .35;
    pointer-events: none;
    transform: scale(.97);
}

.acc-wish-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--off-white);
}

.acc-wish-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acc-wish-card-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-gradient-light);
    color: var(--white);
    font-size: 1.8rem;
}

.acc-wish-card-media-fallback.small { font-size: 1.2rem; }

.acc-wish-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold-dark);
    color: var(--white);
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
}

.acc-wish-heart {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .92);
    color: var(--error);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s cubic-bezier(.4, 0, .2, 1.4);
}

.acc-wish-heart:hover { transform: scale(1.08); }
.acc-wish-heart:active,
.acc-wish-heart.pop { animation: accHeartPop .32s ease; }

@keyframes accHeartPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.28); }
    100% { transform: scale(1); }
}

.acc-wish-heart:focus-visible,
.acc-nav-item:focus-visible,
.acc-btn-primary:focus-visible,
.acc-btn-secondary:focus-visible,
.acc-icon-btn:focus-visible,
.acc-qty-btn:focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: 2px;
}

.acc-wish-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.acc-wish-card-type {
    font-size: .72rem;
    font-weight: 600;
    color: var(--green-dark);
}

.acc-wish-card-name {
    font-size: .92rem;
    font-weight: 700;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.acc-wish-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--light-text);
}

.acc-wish-card-rating {
    color: var(--gold-dark);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.acc-wish-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 2px;
}

.acc-wish-card-price-old {
    font-size: .76rem;
    color: var(--light-text);
    text-decoration: line-through;
}

.acc-wish-card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--green-dark);
}

.acc-wish-card-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .76rem;
    font-weight: 600;
}

.acc-wish-card-stock.in { color: var(--green-dark); }
.acc-wish-card-stock.in .acc-status-dot { background: var(--green-primary); }
.acc-wish-card-stock.out { color: var(--error); }
.acc-wish-card-stock.out .acc-status-dot { background: var(--error); }

.acc-wish-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.acc-wish-card-actions .acc-btn-secondary,
.acc-wish-card-actions .acc-btn-primary {
    flex: 1;
    padding: 9px 10px;
    font-size: .78rem;
    justify-content: center;
}

/* ---------- Cart ---------- */
.acc-cart-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.acc-cart-item {
    display: grid;
    grid-template-columns: 56px 1fr auto auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border-radius: 14px;
    background: var(--off-white);
    transition: opacity .2s ease, transform .2s ease;
}

.acc-cart-item.is-removing {
    opacity: .35;
    transform: scale(.98);
    pointer-events: none;
}

.acc-cart-item-media {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.acc-cart-item-media img { width: 100%; height: 100%; object-fit: cover; }

.acc-cart-item-info { min-width: 0; }

.acc-cart-item-name {
    font-size: .88rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-cart-item-unit {
    font-size: .74rem;
    color: var(--light-text);
}

.acc-cart-item-price {
    font-size: .76rem;
    color: var(--green-dark);
    font-weight: 600;
}

.acc-cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border-radius: 10px;
    padding: 4px;
}

.acc-qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    border: none;
    background: var(--off-white);
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
}

.acc-qty-btn:hover { background: var(--green-gradient); color: var(--white); }

.acc-qty-value {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    font-size: .85rem;
}

.acc-cart-item-total {
    font-size: .88rem;
    font-weight: 800;
    color: var(--dark);
    white-space: nowrap;
}

.acc-cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--green-gradient);
    color: var(--white);
    border-radius: 16px;
    font-size: .95rem;
    font-weight: 700;
    margin-top: 16px;
}

.acc-cart-summary strong { font-size: 1.1rem; }

/* ---------- Notifications ---------- */
.acc-notif-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.acc-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    position: relative;
    transition: background .15s ease;
}

.acc-notif-item.unread { background: rgba(0, 184, 148, .06); }
.acc-notif-item:hover { background: var(--off-white); }

.acc-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--green-gradient-light);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .95rem;
}

.acc-notif-body { flex: 1; min-width: 0; }

.acc-notif-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}

.acc-notif-text {
    font-size: .8rem;
    color: var(--light-text);
    margin-bottom: 4px;
}

.acc-notif-time {
    font-size: .72rem;
    color: var(--light-text);
    opacity: .8;
}

.acc-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-primary);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ---------- Settings: toggle switches ---------- */
.acc-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
    font-size: .88rem;
    color: var(--dark);
    cursor: pointer;
}

.acc-switch-row:last-of-type { border-bottom: none; }

.acc-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.acc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.acc-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--light-gray);
    border-radius: 999px;
    transition: background .18s ease;
}

.acc-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    right: 3px;
    top: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: transform .18s ease;
}

.acc-switch input:checked + .acc-switch-slider { background: var(--green-primary); }
.acc-switch input:checked + .acc-switch-slider::before { transform: translateX(-18px); }

/* ---------- Address cards ---------- */
.acc-address-card {
    background: var(--off-white);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.acc-address-title {
    font-weight: 700;
    color: var(--dark);
    font-size: .92rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.acc-address-title i { color: var(--green-primary); }

.acc-address-detail {
    font-size: .85rem;
    color: var(--light-text);
    line-height: 1.8;
}

.acc-address-actions {
    display: flex;
    gap: 8px;
}

.acc-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--light-gray);
    background: var(--white);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .82rem;
    transition: all .15s ease;
}

.acc-icon-btn:hover {
    background: var(--error);
    border-color: var(--error);
    color: var(--white);
}

/* ---------- Forms ---------- */
.acc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.acc-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.acc-form-group.full { grid-column: 1 / -1; }

.acc-form-group label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.acc-form-group label i { color: var(--green-primary); font-size: .8rem; }

.acc-form-group input,
.acc-form-group select,
.acc-form-group textarea {
    padding: 11px 14px;
    border: 1.5px solid var(--light-gray);
    border-radius: 12px;
    font-family: inherit;
    font-size: .92rem;
    color: var(--dark);
    background: var(--white);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.acc-form-group input:focus,
.acc-form-group select:focus,
.acc-form-group textarea:focus {
    outline: none;
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, .12);
}

.acc-form-group input:disabled {
    background: var(--off-white);
    color: var(--light-text);
    cursor: not-allowed;
}

.acc-form-error {
    font-size: .78rem;
    color: var(--error);
    min-height: 16px;
}

.acc-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.acc-btn-primary {
    background: var(--green-gradient);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform .15s ease, box-shadow .15s ease;
}

.acc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(0, 184, 148, .3);
}

.acc-btn-primary:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.acc-btn-secondary {
    background: var(--off-white);
    color: var(--dark);
    border: 1.5px solid var(--light-gray);
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    transition: all .15s ease;
}

.acc-btn-secondary:hover {
    background: var(--light-gray);
}

/* ---------- Points / loyalty ---------- */
.acc-points-hero {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 18px;
    padding: 28px;
    color: var(--white);
    text-align: center;
    margin-bottom: 22px;
}

.acc-points-hero-value {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.acc-points-hero-label {
    font-size: .9rem;
    opacity: .9;
}

/* ---------- Empty / Error / Guest states ---------- */
.acc-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 50px 20px;
    color: var(--dark);
}

.acc-state-icon {
    font-size: 2.6rem;
    margin-bottom: 14px;
    opacity: .5;
}

.acc-state-icon.error { color: var(--error); opacity: .8; }

.acc-state-icon-emoji {
    font-size: 2.6rem;
    line-height: 1;
    opacity: 1;
}

.acc-state-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.acc-view-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.acc-view-title-row .acc-view-title { margin-bottom: 0; }

.acc-state-text {
    font-size: .95rem;
    color: var(--light-text);
    margin-bottom: 18px;
    max-width: 360px;
}

/* Guest full state */
.acc-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 400px;
    padding: 30px 20px;
}

.acc-guest-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--green-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.acc-guest-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.acc-guest-text {
    color: var(--light-text);
    font-size: .92rem;
    margin-bottom: 22px;
    max-width: 320px;
}

.acc-guest-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- Skeleton loading ---------- */
.acc-skel {
    background: linear-gradient(90deg, var(--off-white) 25%, #eef1f2 37%, var(--off-white) 63%);
    background-size: 400% 100%;
    animation: acc-shimmer 1.4s ease infinite;
    border-radius: 10px;
}

@keyframes acc-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.acc-skel-profile {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.acc-skel-avatar { width: 68px; height: 68px; border-radius: 50%; flex-shrink: 0; }
.acc-skel-line { height: 14px; margin-bottom: 8px; }
.acc-skel-line.w60 { width: 60%; }
.acc-skel-line.w40 { width: 40%; }
.acc-skel-line.w30 { width: 30%; }

.acc-skel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.acc-skel-stat { height: 82px; border-radius: 16px; }

.acc-skel-block { height: 180px; border-radius: 18px; margin-bottom: 22px; }

/* ---------- Notification toast (fallback if site notification missing) ---------- */
.acc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--dark);
    color: var(--white);
    padding: 12px 22px;
    border-radius: 12px;
    font-size: .88rem;
    z-index: 10001;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: none;
}

.acc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =========================================================
   RESPONSIVE — Mobile first adjustments
   ========================================================= */
@media (max-width: 900px) {
    .acc-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .acc-info-grid { grid-template-columns: 1fr; }
    .acc-form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .acc-overlay { padding: 0; }

    .acc-panel {
        max-width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .acc-menu-toggle { display: flex; }

    .acc-sidebar {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
        width: 78%;
        max-width: 300px;
        transform: translateX(100%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-lg);
    }

    .acc-sidebar.open { transform: translateX(0); }

    .acc-sidebar-backdrop.open { display: block; }

    .acc-main { padding: 18px 16px 34px; }

    .acc-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .acc-skel-stats { grid-template-columns: repeat(2, 1fr); }

    .acc-profile-card { padding: 18px; gap: 14px; }

    .acc-avatar { width: 56px; height: 56px; font-size: 1.25rem; }

    .acc-table-wrap { display: none; }

    .acc-order-cards { display: flex; }

    .acc-form-actions { flex-direction: column-reverse; }
    .acc-form-actions button { width: 100%; justify-content: center; }

    .acc-guest-actions { flex-direction: column; width: 100%; }
    .acc-guest-actions button,
    .acc-guest-actions a { width: 100%; justify-content: center; }

    .acc-wishlist-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .acc-cart-item {
        grid-template-columns: 48px 1fr auto;
        grid-template-areas:
            "media info remove"
            "qty qty total";
        row-gap: 8px;
    }
    .acc-cart-item-media { grid-area: media; }
    .acc-cart-item-info { grid-area: info; }
    .acc-cart-item-remove { grid-area: remove; }
    .acc-cart-item-qty { grid-area: qty; justify-self: start; }
    .acc-cart-item-total { grid-area: total; justify-self: end; }

    .acc-profile-meta-row { gap: 8px; }
}

@media (max-width: 520px) {
    .acc-wishlist-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
    .acc-stats-grid,
    .acc-skel-stats { grid-template-columns: 1fr; }
    .acc-profile-card { flex-direction: column; text-align: center; }
    .acc-profile-meta-row { justify-content: center; }
    .acc-edit-btn { width: 100%; justify-content: center; }
    .acc-wishlist-grid { grid-template-columns: 1fr; }
    .acc-wish-card-actions { flex-direction: column; }
}

/* ===== Orders 4.11 + Addresses 4.12 ===== */
.acc-status.pending { background: rgba(108, 117, 125, .12); color: #6c757d; }
.acc-status.pending .acc-status-dot { background: #6c757d; }

.acc-order-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.acc-chip {
    border: 1px solid rgba(31, 138, 95, 0.25);
    background: #fff;
    color: var(--dark, #232823);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.acc-chip.active,
.acc-chip:hover {
    background: var(--green-primary, #1f8a5f);
    color: #fff;
    border-color: var(--green-primary, #1f8a5f);
}
.acc-order-detail-btn {
    width: 100%;
    margin-top: 0.75rem;
    justify-content: center;
}
.acc-back-orders {
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.acc-timeline {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0 0.25rem;
}
.acc-timeline-step {
    flex: 1;
    min-width: 72px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--light-text, #6b736c);
    position: relative;
}
.acc-timeline-step .dot {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d0d5d2;
    margin: 0 auto 0.4rem;
}
.acc-timeline-step.done .dot { background: var(--green-primary, #1f8a5f); }
.acc-timeline-step.current { color: var(--green-dark, #145c3f); font-weight: 600; }
.acc-timeline-step.current .dot {
    box-shadow: 0 0 0 3px rgba(31, 138, 95, 0.25);
}
.acc-timeline-step.cancelled .dot { background: var(--error, #d64545); }
.acc-timeline-cancelled { justify-content: flex-start; gap: 2rem; }
.acc-order-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.acc-order-item-name { font-weight: 600; }
.acc-order-item-meta { display: flex; gap: 1rem; color: var(--light-text, #6b736c); }
.acc-order-totals { margin-top: 0.75rem; padding-top: 0.5rem; border-top: 1px dashed rgba(0,0,0,0.08); }
.acc-order-total { font-size: 1.05rem; }
.acc-orders-desktop { display: block; }
@media (max-width: 768px) {
    .acc-orders-desktop { display: none; }
    .acc-order-cards { display: flex; flex-direction: column; gap: 0.75rem; }
}

.acc-default-badge {
    display: inline-block;
    margin-right: 0.4rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(31, 138, 95, 0.12);
    color: var(--green-dark, #145c3f);
    font-size: 0.75rem;
    font-weight: 600;
}
.acc-address-card.is-default {
    border-color: var(--green-primary, #1f8a5f);
    box-shadow: 0 0 0 1px rgba(31, 138, 95, 0.15);
}
.acc-form-group.full { grid-column: 1 / -1; }

/* 4.15 / 4.16 — Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .acc-overlay,
    .acc-panel,
    .acc-chip,
    .acc-btn-primary,
    .acc-btn-secondary,
    .acc-order-card,
    .acc-address-card,
    .acc-wish-card,
    .acc-toast {
        transition: none !important;
        animation: none !important;
    }
}
