.account-page {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
    background: var(--cream);
    padding: 2.5rem 1.5rem 4rem;
}

.account-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.account-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1.5rem);
}

.profile-card {
    background: var(--navy);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    color: white;
    margin-bottom: 1rem;
}

.avatar-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255,255,255,0.2);
    font-family: 'Playfair Display', serif;
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.profile-email {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.2rem;
    word-break: break-all;
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(246,128,72,0.2);
    border: 1px solid var(--orange);
    color: var(--orange);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.sidebar-nav {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.2rem;
    color: var(--dark-gray);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    border-bottom: 1px solid #f5f5f5;
}

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

.sidebar-nav-item i {
    width: 20px;
    color: #aaa;
    font-size: 1rem;
    transition: var(--transition);
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: rgba(246,128,72,0.06);
    color: var(--navy);
    border-left-color: var(--orange);
}

.sidebar-nav-item:hover i,
.sidebar-nav-item.active i {
    color: var(--orange);
}

.account-main { min-width: 0; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy);
}

.section-heading p {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.3rem 1.2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.orange { background: rgba(246,128,72,0.12); color: var(--orange); }
.stat-icon.navy   { background: rgba(13,26,99,0.1);    color: var(--navy); }
.stat-icon.green  { background: rgba(76,175,80,0.12);  color: var(--success); }

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.2rem;
}

.profile-form-card {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.form-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1.4rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--cream);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.form-card-title i { color: var(--orange); }

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.profile-grid .full { grid-column: 1 / -1; }

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-group input,
.field-group select,
.field-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 0.93rem;
    font-family: inherit;
    color: var(--dark-gray);
    transition: var(--transition);
    background: #fafafa;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    background: white;
}

.field-group textarea { resize: vertical; min-height: 80px; }

.save-btn {
    background: var(--orange);
    color: var(--navy);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.save-btn:hover {
    background: var(--navy);
    color: white;
    transform: translateY(-2px);
}

.orders-list { display: flex; flex-direction: column; gap: 1rem; }

.order-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.order-card-header {
    background: var(--cream);
    padding: 1rem 1.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid #eee;
}

.order-number {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
}

.order-date {
    font-size: 0.82rem;
    color: #888;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.status-delivered  { background: rgba(76,175,80,0.12);  color: #2e7d32; }
.status-processing { background: rgba(255,152,0,0.12);  color: #e65100; }
.status-cancelled  { background: rgba(244,67,54,0.12);  color: #c62828; }

.order-items-preview {
    padding: 1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.order-item-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #eee;
}

.order-more-items {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: var(--navy);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-card-footer {
    padding: 0.9rem 1.3rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-total {
    font-weight: 700;
    color: var(--navy);
}

.order-total span {
    color: var(--orange);
    font-size: 1.05rem;
}

.view-order-btn {
    background: none;
    border: 2px solid var(--navy);
    color: var(--navy);
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.view-order-btn:hover {
    background: var(--navy);
    color: white;
}

.transactions-table-wrap {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tx-table thead {
    background: var(--navy);
    color: white;
}

.tx-table th {
    padding: 0.9rem 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tx-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid #f5f5f5;
    color: var(--dark-gray);
    vertical-align: middle;
}

.tx-table tr:last-child td { border-bottom: none; }
.tx-table tr:hover td { background: rgba(246,128,72,0.04); }

.tx-type {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.tx-purchase { background: rgba(13,26,99,0.08); color: var(--navy); }
.tx-refund   { background: rgba(244,67,54,0.1); color: var(--danger); }

.tx-amount-pos { color: var(--success); font-weight: 700; }
.tx-amount-neg { color: var(--danger);  font-weight: 700; }

.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.wishlist-card {
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.wishlist-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.wishlist-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.wishlist-card-body { padding: 0.9rem; }

.wishlist-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    margin-bottom: 0.3rem;
}

.wishlist-card-price {
    color: var(--orange);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.7rem;
}

.wishlist-card-btn {
    width: 100%;
    background: var(--navy);
    color: white;
    border: none;
    padding: 0.55rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.wishlist-card-btn:hover { background: var(--orange); color: var(--navy); }

.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: #aaa;
}

.empty-state i {
    font-size: 3.5rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

.empty-state p { font-size: 0.95rem; color: #999; margin-bottom: 1.2rem; }

.empty-state a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--orange);
    color: var(--navy);
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.empty-state a:hover { background: var(--navy); color: white; }

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 1rem;
}

.settings-row:last-child { border-bottom: none; }

.settings-row-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.2rem;
}

.settings-row-info p {
    font-size: 0.8rem;
    color: #999;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ddd;
    border-radius: 24px;
    cursor: pointer;
    transition: 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider { background: var(--orange); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

.danger-zone {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--danger);
}

.danger-title {
    color: var(--danger);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.danger-desc { font-size: 0.85rem; color: #888; margin-bottom: 1rem; }

.danger-btn {
    background: none;
    border: 2px solid var(--danger);
    color: var(--danger);
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.danger-btn:hover { background: var(--danger); color: white; }

.account-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--navy);
    color: white;
    padding: 0.9rem 1.4rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.account-toast.show { transform: translateY(0); opacity: 1; }
.account-toast i { color: var(--orange); }



@media (max-width: 1024px) {
    .account-container {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }

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

    .profile-form-card {
        padding: 1.4rem;
    }
}

@media (max-width: 900px) {
    .account-page {
        padding: 1.5rem 1rem 3rem;
    }

    .account-container {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .account-sidebar {
        position: static;
    }

    .profile-card {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        text-align: left;
        padding: 1.2rem 1.5rem;
    }

    .avatar-ring {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
        margin: 0;
        flex-shrink: 0;
    }

    .sidebar-nav {
        display: flex;
        border-radius: 40px;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.4rem;
        gap: 0.3rem;
        background: white;
        scrollbar-width: none;
        box-shadow: var(--shadow-sm);
    }

    .sidebar-nav::-webkit-scrollbar { display: none; }

    .sidebar-nav-item {
        border-left: none;
        border-bottom: none;
        border-radius: 30px;
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        flex-shrink: 0;
        justify-content: center;
        gap: 0.5rem;
    }

    .sidebar-nav-item:hover,
    .sidebar-nav-item.active {
        background: var(--orange);
        color: white;
        border-left-color: transparent;
    }

    .sidebar-nav-item:hover i,
    .sidebar-nav-item.active i {
        color: white;
    }

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

    .stat-card {
        padding: 1rem;
        gap: 0.7rem;
    }

    .stat-value { font-size: 1.3rem; }
}

@media (max-width: 768px) {
    .account-page {
        padding: 1.2rem 0.9rem 3rem;
    }

    .profile-card {
        padding: 1rem 1.2rem;
        gap: 1rem;
    }

    .profile-name { font-size: 1rem; }

    .profile-email {
        font-size: 0.78rem;
        margin-bottom: 0.6rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.9rem 0.8rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .stat-value { font-size: 1.2rem; }
    .stat-label { font-size: 0.72rem; }

    .profile-form-card {
        padding: 1.2rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid .full {
        grid-column: 1;
    }

    .order-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .view-order-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: flex;
    }

    .transactions-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tx-table {
        min-width: 480px;
    }

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

    .account-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .account-page {
        padding: 1rem 0.75rem 3rem;
    }

    .profile-card {
        padding: 0.9rem 1rem;
    }

    .avatar-ring {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
    }

    .member-badge { font-size: 0.7rem; }

    .sidebar-nav-item span {
        display: none;
    }

    .sidebar-nav-item {
        padding: 0.6rem 0.85rem;
        font-size: 0;          
    }

    .sidebar-nav-item i {
        width: auto;
        font-size: 1rem;
        color: inherit;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .stat-card {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0.9rem 1rem;
    }

    .stat-value { font-size: 1.4rem; }
    .stat-label { font-size: 0.78rem; }

    .profile-form-card {
        padding: 1rem;
    }

    .form-card-title {
        font-size: 0.92rem;
    }

    .save-btn {
        width: 100%;
        justify-content: center;
    }

    .order-card-header {
        padding: 0.8rem 1rem;
    }

    .order-items-preview {
        padding: 0.8rem 1rem;
    }

    .order-card-footer {
        padding: 0.8rem 1rem;
    }

    .wishlist-grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        margin-inline: auto;
    }

    .danger-zone {
        padding: 1.2rem;
    }

    .danger-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .settings-row {
        gap: 0.8rem;
    }

    .settings-row-info p {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .profile-card {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .avatar-ring {
        margin: 0 auto;
    }

    .section-heading h2 {
        font-size: 1.1rem;
    }
}