/* Orders Table */
.orders-table-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table thead {
    background: var(--bg);
}

.orders-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.orders-table tbody tr.order-row {
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.orders-table tbody tr.order-row:hover {
    background: var(--bg);
}

.orders-table td {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text);
}

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

.order-status {
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-processing { background: #dbeafe; color: #1e40af; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-shipped { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.btn-icon {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg);
}

.order-details {
    background: var(--bg);
}

.order-details td {
    padding: 0 !important;
}

.order-details-content {
    padding: 1.5rem;
}

.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.order-items-list h4,
.order-tracking-list h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.item-row img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

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

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

.tracking-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tracking-item {
    display: flex;
    gap: 0.75rem;
    position: relative;
    padding-bottom: 1.25rem;
}

.tracking-item:last-child { padding-bottom: 0; }

.tracking-item::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.tracking-item:last-child::before { display: none; }
.tracking-item.completed::before { background: var(--primary); }

.tracking-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 1;
}

.tracking-item.completed .tracking-icon {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tracking-item.active .tracking-icon {
    border-color: var(--primary);
    border-width: 3px;
    color: var(--primary);
}

.tracking-content { flex: 1; }

.tracking-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.tracking-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

@media (max-width: 968px) {
    .orders-table-wrapper {
        overflow-x: auto;
    }
    
    .orders-table {
        min-width: 800px;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
