:root {
    --primary: #1fa37a;
    --primary-dark: #178f68;
    --text: #222;
    --text-light: #666;
    --bg: #f9fafb;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --bg: #1a1a1a;
    --white: #2a2a2a;
    --border-color: #444;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--bg);
    padding-top: 85px;
}

.orders-container {
    padding: 4rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

.orders-header {
    text-align: center;
    margin-bottom: 3rem;
}

.orders-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.orders-header p {
    color: var(--text-light);
    font-size: 1.125rem;
}

.orders-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out both;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, #4fd4a8 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.order-card:hover::before {
    transform: scaleY(1);
}

.order-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 32px rgba(31, 163, 122, 0.2);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.order-header h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.order-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.order-card:hover .status-badge {
    transform: scale(1.1);
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid {
    background: #dbeafe;
    color: #1e40af;
}

.status-processing {
    background: #e0e7ff;
    color: #4338ca;
}

.status-shipped {
    background: #ddd6fe;
    color: #6b21a8;
}

.status-delivered {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.item-name {
    font-weight: 500;
    color: var(--text);
}

.item-qty {
    color: var(--text-light);
    font-size: 0.875rem;
}

.item-price {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.order-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    flex: 1;
}

.order-address i {
    color: var(--primary);
}

.order-total {
    font-size: 1.125rem;
    color: var(--text);
}

.order-total strong {
    margin-right: 0.5rem;
}

.loading, .error, .no-orders {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-orders {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.no-orders i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-orders h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.no-orders p {
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    .orders-container {
        padding: 3rem 4%;
    }

    .orders-header h1 {
        font-size: 2rem;
    }
    
    .orders-header p {
        font-size: 1rem;
    }

    .order-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .status-badge {
        align-self: flex-start;
    }

    .order-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .item-price {
        text-align: left;
        font-size: 1rem;
    }

    .order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .order-address {
        width: 100%;
    }
    
    .order-total {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .orders-container {
        padding: 2rem 3%;
    }
    
    .orders-header h1 {
        font-size: 1.75rem;
    }
    
    .orders-header p {
        font-size: 0.875rem;
    }
    
    .order-card {
        padding: 1.25rem;
    }
    
    .order-header h3 {
        font-size: 1.125rem;
    }
    
    .order-date {
        font-size: 0.75rem;
    }
    
    .status-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.75rem;
    }
    
    .item-name {
        font-size: 0.875rem;
    }
    
    .item-qty,
    .order-address {
        font-size: 0.75rem;
    }
    
    .order-total {
        font-size: 1rem;
    }
    
    .no-orders i {
        font-size: 3rem;
    }
    
    .no-orders h3 {
        font-size: 1.25rem;
    }
}
