/* ============================================
   MON MÉLANGE — Customer Account Styles
   ============================================ */

/* ---- Page Layout ---- */
.account-page {
    min-height: 100vh;
    padding: 120px 0 60px;
    background: var(--bg-dark, #0a0a14);
}

.account-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Auth Container (Login/Register/Reset) ---- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    padding: 40px 0;
}

.auth-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 460px;
    backdrop-filter: blur(20px);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    margin-bottom: 20px;
}

.auth-logo img {
    height: 50px;
    object-fit: contain;
}

.auth-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #c9a96e;
    margin: 0 0 8px;
}

.auth-header p {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.auth-footer p {
    color: #888;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #c9a96e;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    color: #dfc68e;
    text-decoration: underline;
}

/* ---- Form Styles ---- */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 8px;
    color: #e0d8cc;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s, background 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #c9a96e;
    background: rgba(201, 169, 110, 0.06);
}

.form-control::placeholder {
    color: #666;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.85rem;
}

.input-icon .form-control {
    padding-left: 40px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row.two-col .form-group {
    flex: 1;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.forgot-link {
    color: #c9a96e;
    font-size: 0.85rem;
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #999;
    font-size: 0.9rem;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #c9a96e;
}

.form-msg {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.form-msg.error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.form-msg.success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-gold {
    background: linear-gradient(135deg, #c9a96e, #a8893f);
    color: #fff;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #dfc68e, #c9a96e);
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: rgba(201, 169, 110, 0.1);
    color: #c9a96e;
    border: 1px solid rgba(201, 169, 110, 0.2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-sm:hover {
    background: rgba(201, 169, 110, 0.2);
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* ---- Dashboard Layout ---- */
.account-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    align-items: start;
}

/* ---- Sidebar ---- */
.account-sidebar {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 16px;
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.sidebar-user {
    padding: 30px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #c9a96e, #a8893f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.user-avatar i {
    font-size: 1.5rem;
    color: #fff;
}

.sidebar-user h3 {
    color: #e0d8cc;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0 0 4px;
}

.sidebar-user p {
    color: #888;
    font-size: 0.8rem;
    margin: 0;
    word-break: break-all;
}

.sidebar-nav {
    padding: 12px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: #e0d8cc;
    background: rgba(201, 169, 110, 0.05);
}

.sidebar-nav a.active {
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.08);
    border-left-color: #c9a96e;
}

.sidebar-nav a i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.sidebar-nav .logout-link {
    color: #e74c3c;
    margin-top: 8px;
    border-top: 1px solid rgba(201, 169, 110, 0.08);
    padding-top: 16px;
}

.sidebar-nav .logout-link:hover {
    color: #ff6b6b;
    background: rgba(231, 76, 60, 0.05);
}

/* ---- Content Area ---- */
.account-content {
    min-height: 400px;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.content-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #c9a96e;
    margin: 0;
}

.content-header h1 i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.back-link {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #c9a96e;
}

/* ---- Welcome Banner ---- */
.welcome-banner {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.12), rgba(201, 169, 110, 0.04));
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 30px;
}

.welcome-banner h2 {
    color: #e0d8cc;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin: 0 0 4px;
}

.welcome-banner p {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

/* ---- Dashboard Stats ---- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(201, 169, 110, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c9a96e;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0d8cc;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* ---- Section Title ---- */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title h3 {
    color: #e0d8cc;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0;
}

.section-subtitle {
    color: #e0d8cc;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 24px 0 16px;
}

.view-all {
    color: #c9a96e;
    text-decoration: none;
    font-size: 0.85rem;
}

.view-all:hover {
    text-decoration: underline;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(26, 26, 46, 0.5);
    border: 1px dashed rgba(201, 169, 110, 0.15);
    border-radius: 12px;
}

.empty-state i {
    font-size: 3rem;
    color: rgba(201, 169, 110, 0.3);
    margin-bottom: 16px;
}

.empty-state p {
    color: #888;
    margin: 0 0 20px;
    font-size: 0.95rem;
}

/* ---- Orders Table ---- */
.orders-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 110, 0.12);
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(26, 26, 46, 0.95);
}

.orders-table thead th {
    background: rgba(201, 169, 110, 0.08);
    color: #c9a96e;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    white-space: nowrap;
}

.orders-table tbody td {
    padding: 14px 16px;
    color: #ccc;
    font-size: 0.9rem;
    border-top: 1px solid rgba(201, 169, 110, 0.06);
}

.orders-table tbody tr:hover {
    background: rgba(201, 169, 110, 0.03);
}

.order-num {
    font-family: monospace;
    font-weight: 600;
    color: #e0d8cc;
}

.order-total {
    font-weight: 600;
    color: #c9a96e;
}

/* ---- Status Badges ---- */
.status-badge, .payment-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-pending { background: rgba(241, 196, 15, 0.12); color: #f1c40f; }
.status-confirmed { background: rgba(52, 152, 219, 0.12); color: #3498db; }
.status-processing { background: rgba(155, 89, 182, 0.12); color: #9b59b6; }
.status-shipped { background: rgba(230, 126, 34, 0.12); color: #e67e22; }
.status-delivered { background: rgba(46, 204, 113, 0.12); color: #2ecc71; }
.status-cancelled { background: rgba(231, 76, 60, 0.12); color: #e74c3c; }
.status-returned { background: rgba(149, 165, 166, 0.12); color: #95a5a6; }

.payment-pending { background: rgba(241, 196, 15, 0.12); color: #f1c40f; }
.payment-paid { background: rgba(46, 204, 113, 0.12); color: #2ecc71; }
.payment-refunded { background: rgba(155, 89, 182, 0.12); color: #9b59b6; }
.payment-failed { background: rgba(231, 76, 60, 0.12); color: #e74c3c; }

/* ---- Order Detail ---- */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.order-info-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    padding: 24px;
}

.order-info-card h3 {
    color: #c9a96e;
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin: 0 0 16px;
}

.order-meta .meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(201, 169, 110, 0.06);
}

.meta-label {
    color: #888;
    font-size: 0.85rem;
}

.address-text {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.7;
}

.tracking-num {
    font-family: monospace;
    color: #c9a96e;
    font-weight: 600;
}

/* ---- Order Items ---- */
.order-items-list {
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(26, 26, 46, 0.95);
    border-bottom: 1px solid rgba(201, 169, 110, 0.06);
}

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

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.03);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
}

.item-info h4 {
    color: #e0d8cc;
    font-size: 0.95rem;
    margin: 0 0 4px;
}

.item-qty {
    color: #888;
    font-size: 0.8rem;
}

.item-price {
    color: #c9a96e;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

/* ---- Order Summary ---- */
.order-summary {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 20px;
    max-width: 350px;
    margin-left: auto;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #999;
    font-size: 0.9rem;
}

.summary-row.total {
    border-top: 1px solid rgba(201, 169, 110, 0.15);
    margin-top: 8px;
    padding-top: 12px;
    color: #e0d8cc;
    font-weight: 700;
    font-size: 1.1rem;
}

.summary-row.total span:last-child {
    color: #c9a96e;
}

/* ---- Addresses Grid ---- */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.address-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.address-card.default {
    border-color: rgba(201, 169, 110, 0.3);
}

.default-badge {
    display: inline-block;
    padding: 2px 10px;
    background: rgba(201, 169, 110, 0.1);
    color: #c9a96e;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 10px;
}

.address-card h4 {
    color: #e0d8cc;
    font-size: 1rem;
    margin: 0 0 8px;
}

.address-card p {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

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

/* ---- Address Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #1a1a2e;
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    color: #c9a96e;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #e74c3c;
}

/* ---- Profile Sections ---- */
.profile-sections {
    display: grid;
    gap: 24px;
}

.profile-card {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(201, 169, 110, 0.12);
    border-radius: 12px;
    padding: 28px;
}

.profile-card h3 {
    color: #c9a96e;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

/* ---- Nav Account Icon ---- */
.nav-account {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0d8cc;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s;
    margin-right: 4px;
}

.nav-account:hover {
    color: #c9a96e;
}

.nav-account .fa-user-check {
    color: #c9a96e;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .account-page {
        padding: 100px 0 40px;
    }
    
    .account-layout {
        grid-template-columns: 1fr;
    }
    
    .account-sidebar {
        position: static;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px 12px;
        gap: 0;
    }
    
    .sidebar-nav a {
        flex-shrink: 0;
        padding: 10px 16px;
        border-left: none;
        border-bottom: 2px solid transparent;
        font-size: 0.8rem;
    }
    
    .sidebar-nav a.active {
        border-left: none;
        border-bottom-color: #c9a96e;
    }
    
    .sidebar-nav .logout-link {
        margin-top: 0;
        border-top: none;
        padding-top: 10px;
    }
    
    .auth-card {
        padding: 28px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .addresses-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .orders-table thead th,
    .orders-table tbody td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
