/* ============================================
   LERDOW CASA - Dashboard Styles
   ============================================ */

.dashboard-page {
    padding-top: calc(var(--header-height) + var(--space-xl));
    padding-bottom: var(--space-2xl);
    min-height: 100vh;
    background: var(--color-off-white);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-xl);
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (max-width: 968px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .dashboard-page {
        padding-top: calc(var(--header-height) + var(--space-md));
        padding-bottom: var(--space-xl);
    }
}

/* Sidebar */
.dashboard-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + var(--space-xl));
}

@media (max-width: 968px) {
    .dashboard-sidebar {
        position: static;
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-gray);
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--color-black);
}

.user-email {
    font-size: var(--text-sm);
    color: var(--color-dark-gray);
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    color: var(--color-charcoal);
    transition: all var(--transition-fast);
}

.dashboard-nav-link:hover {
    background: var(--color-light-gray);
    color: var(--color-primary);
}

.dashboard-nav-link.active {
    background: rgba(74, 93, 74, 0.1);
    color: var(--color-primary);
    font-weight: 500;
}

.dashboard-nav-link svg {
    flex-shrink: 0;
}

/* Content */
.dashboard-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-sm);
}

.dashboard-tab {
    display: none;
}

.dashboard-tab.active {
    display: block;
}

.dashboard-tab h1 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xl);
    color: var(--color-black);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.order-card {
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    background: var(--color-off-white);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.order-id {
    font-weight: 600;
    color: var(--color-black);
}

.order-date {
    font-size: var(--text-sm);
    color: var(--color-dark-gray);
}

.order-status {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.pending {
    background: #FFF3E0;
    color: #EF6C00;
}

.order-status.paid {
    background: #E3F2FD;
    color: #1565C0;
}

.order-status.processing {
    background: #E8F5E9;
    color: #2E7D32;
}

.order-status.shipped {
    background: #E8F5E9;
    color: #2E7D32;
}

.order-status.delivered {
    background: #E8F5E9;
    color: #2E7D32;
}

.order-body {
    padding: var(--space-lg);
}

.order-items {
    margin-bottom: var(--space-md);
}

.order-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    flex-wrap: wrap;
}

.order-item-image {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--color-light-gray);
    flex-shrink: 0;
}

.order-item-info {
    flex: 1;
    min-width: 120px;
}

.order-item-name {
    font-weight: 500;
    font-size: var(--text-sm);
    word-break: break-word;
}

.order-item-details {
    font-size: var(--text-xs);
    color: var(--color-dark-gray);
}

@media (max-width: 500px) {
    .order-item {
        gap: var(--space-xs);
    }
    
    .order-item-image {
        width: 40px;
        height: 50px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .dashboard-content {
        padding: var(--space-md);
    }
    
    .dashboard-sidebar {
        padding: var(--space-md);
    }
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-light-gray);
    font-weight: 600;
}

.no-orders {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--color-dark-gray);
}

.no-orders p {
    margin-bottom: var(--space-lg);
}

/* Profile Form */
.profile-form {
    max-width: 500px;
}

.profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

@media (max-width: 600px) {
    .profile-form .form-row {
        grid-template-columns: 1fr;
    }
}

/* Addresses */
.addresses-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.address-card {
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.address-card.add-new {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    border-style: dashed;
}

.address-name {
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.address-text {
    font-size: var(--text-sm);
    color: var(--color-dark-gray);
    line-height: 1.6;
}

.address-actions {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-light-gray);
    display: flex;
    gap: var(--space-md);
}

.address-actions button {
    font-size: var(--text-sm);
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.address-actions button:hover {
    text-decoration: underline;
}

.address-actions button.delete {
    color: var(--color-error);
}